Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
*/
@Fluent
public final class DocumentModelBuildOperationDetails extends OperationDetails {
/*
* Type of operation.
*/
private String kind = "documentModelBuild";

/*
* Operation result upon success.
*/
Expand All @@ -27,7 +32,16 @@ public final class DocumentModelBuildOperationDetails extends OperationDetails {
* Creates an instance of DocumentModelBuildOperationDetails class.
*/
public DocumentModelBuildOperationDetails() {
setKind("documentModelBuild");
}

/**
* Get the kind property: Type of operation.
*
* @return the kind value.
*/
@Override
public String getKind() {
return this.kind;
}

/**
Expand Down Expand Up @@ -146,11 +160,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
? null
: DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getLastUpdatedDateTime()));
jsonWriter.writeStringField("resourceLocation", getResourceLocation());
jsonWriter.writeStringField("kind", getKind());
jsonWriter.writeNumberField("percentCompleted", getPercentCompleted());
jsonWriter.writeStringField("apiVersion", getApiVersion());
jsonWriter.writeMapField("tags", getTags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("error", getError());
jsonWriter.writeStringField("kind", this.kind);
jsonWriter.writeJsonField("result", this.result);
return jsonWriter.writeEndObject();
}
Expand Down Expand Up @@ -184,8 +198,6 @@ public static DocumentModelBuildOperationDetails fromJson(JsonReader jsonReader)
reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())));
} else if ("resourceLocation".equals(fieldName)) {
deserializedDocumentModelBuildOperationDetails.setResourceLocation(reader.getString());
} else if ("kind".equals(fieldName)) {
deserializedDocumentModelBuildOperationDetails.setKind(reader.getString());
} else if ("percentCompleted".equals(fieldName)) {
deserializedDocumentModelBuildOperationDetails
.setPercentCompleted(reader.getNullable(JsonReader::getInt));
Expand All @@ -196,6 +208,8 @@ public static DocumentModelBuildOperationDetails fromJson(JsonReader jsonReader)
deserializedDocumentModelBuildOperationDetails.setTags(tags);
} else if ("error".equals(fieldName)) {
deserializedDocumentModelBuildOperationDetails.setError(Error.fromJson(reader));
} else if ("kind".equals(fieldName)) {
deserializedDocumentModelBuildOperationDetails.kind = reader.getString();
} else if ("result".equals(fieldName)) {
deserializedDocumentModelBuildOperationDetails.result = DocumentModelDetails.fromJson(reader);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
*/
@Fluent
public final class DocumentModelComposeOperationDetails extends OperationDetails {
/*
* Type of operation.
*/
private String kind = "documentModelCompose";

/*
* Operation result upon success.
*/
Expand All @@ -27,7 +32,16 @@ public final class DocumentModelComposeOperationDetails extends OperationDetails
* Creates an instance of DocumentModelComposeOperationDetails class.
*/
public DocumentModelComposeOperationDetails() {
setKind("documentModelCompose");
}

/**
* Get the kind property: Type of operation.
*
* @return the kind value.
*/
@Override
public String getKind() {
return this.kind;
}

/**
Expand Down Expand Up @@ -146,11 +160,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
? null
: DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getLastUpdatedDateTime()));
jsonWriter.writeStringField("resourceLocation", getResourceLocation());
jsonWriter.writeStringField("kind", getKind());
jsonWriter.writeNumberField("percentCompleted", getPercentCompleted());
jsonWriter.writeStringField("apiVersion", getApiVersion());
jsonWriter.writeMapField("tags", getTags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("error", getError());
jsonWriter.writeStringField("kind", this.kind);
jsonWriter.writeJsonField("result", this.result);
return jsonWriter.writeEndObject();
}
Expand Down Expand Up @@ -184,8 +198,6 @@ public static DocumentModelComposeOperationDetails fromJson(JsonReader jsonReade
reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())));
} else if ("resourceLocation".equals(fieldName)) {
deserializedDocumentModelComposeOperationDetails.setResourceLocation(reader.getString());
} else if ("kind".equals(fieldName)) {
deserializedDocumentModelComposeOperationDetails.setKind(reader.getString());
} else if ("percentCompleted".equals(fieldName)) {
deserializedDocumentModelComposeOperationDetails
.setPercentCompleted(reader.getNullable(JsonReader::getInt));
Expand All @@ -196,6 +208,8 @@ public static DocumentModelComposeOperationDetails fromJson(JsonReader jsonReade
deserializedDocumentModelComposeOperationDetails.setTags(tags);
} else if ("error".equals(fieldName)) {
deserializedDocumentModelComposeOperationDetails.setError(Error.fromJson(reader));
} else if ("kind".equals(fieldName)) {
deserializedDocumentModelComposeOperationDetails.kind = reader.getString();
} else if ("result".equals(fieldName)) {
deserializedDocumentModelComposeOperationDetails.result = DocumentModelDetails.fromJson(reader);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
*/
@Fluent
public final class DocumentModelCopyToOperationDetails extends OperationDetails {
/*
* Type of operation.
*/
private String kind = "documentModelCopyTo";

/*
* Operation result upon success.
*/
Expand All @@ -27,7 +32,16 @@ public final class DocumentModelCopyToOperationDetails extends OperationDetails
* Creates an instance of DocumentModelCopyToOperationDetails class.
*/
public DocumentModelCopyToOperationDetails() {
setKind("documentModelCopyTo");
}

/**
* Get the kind property: Type of operation.
*
* @return the kind value.
*/
@Override
public String getKind() {
return this.kind;
}

/**
Expand Down Expand Up @@ -146,11 +160,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
? null
: DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getLastUpdatedDateTime()));
jsonWriter.writeStringField("resourceLocation", getResourceLocation());
jsonWriter.writeStringField("kind", getKind());
jsonWriter.writeNumberField("percentCompleted", getPercentCompleted());
jsonWriter.writeStringField("apiVersion", getApiVersion());
jsonWriter.writeMapField("tags", getTags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("error", getError());
jsonWriter.writeStringField("kind", this.kind);
jsonWriter.writeJsonField("result", this.result);
return jsonWriter.writeEndObject();
}
Expand Down Expand Up @@ -184,8 +198,6 @@ public static DocumentModelCopyToOperationDetails fromJson(JsonReader jsonReader
reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())));
} else if ("resourceLocation".equals(fieldName)) {
deserializedDocumentModelCopyToOperationDetails.setResourceLocation(reader.getString());
} else if ("kind".equals(fieldName)) {
deserializedDocumentModelCopyToOperationDetails.setKind(reader.getString());
} else if ("percentCompleted".equals(fieldName)) {
deserializedDocumentModelCopyToOperationDetails
.setPercentCompleted(reader.getNullable(JsonReader::getInt));
Expand All @@ -196,6 +208,8 @@ public static DocumentModelCopyToOperationDetails fromJson(JsonReader jsonReader
deserializedDocumentModelCopyToOperationDetails.setTags(tags);
} else if ("error".equals(fieldName)) {
deserializedDocumentModelCopyToOperationDetails.setError(Error.fromJson(reader));
} else if ("kind".equals(fieldName)) {
deserializedDocumentModelCopyToOperationDetails.kind = reader.getString();
} else if ("result".equals(fieldName)) {
deserializedDocumentModelCopyToOperationDetails.result = DocumentModelDetails.fromJson(reader);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,6 @@ public String getKind() {
return this.kind;
}

/**
* Set the kind property: Type of operation.
*
* @param kind the kind value to set.
* @return the OperationDetails object itself.
*/
protected OperationDetails setKind(String kind) {
this.kind = kind;
return this;
}

/**
* Get the operationId property: Operation ID.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,25 @@
*/
@Fluent
public final class Cookiecuttershark extends Shark {
/*
* The fishtype property.
*/
private String fishtype = "cookiecuttershark";

/**
* Creates an instance of Cookiecuttershark class.
*/
public Cookiecuttershark() {
setFishtype("cookiecuttershark");
}

/**
* Get the fishtype property: The fishtype property.
*
* @return the fishtype value.
*/
@Override
public String getFishtype() {
return this.fishtype;
}

/**
Expand Down Expand Up @@ -79,10 +93,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeFloatField("length", getLength());
jsonWriter.writeStringField("birthday",
getBirthday() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getBirthday()));
jsonWriter.writeStringField("fishtype", getFishtype());
jsonWriter.writeStringField("species", getSpecies());
jsonWriter.writeArrayField("siblings", getSiblings(), (writer, element) -> writer.writeJson(element));
jsonWriter.writeNumberField("age", getAge());
jsonWriter.writeStringField("fishtype", this.fishtype);
return jsonWriter.writeEndObject();
}

Expand All @@ -106,15 +120,15 @@ public static Cookiecuttershark fromJson(JsonReader jsonReader) throws IOExcepti
} else if ("birthday".equals(fieldName)) {
deserializedCookiecuttershark.setBirthday(
reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())));
} else if ("fishtype".equals(fieldName)) {
deserializedCookiecuttershark.setFishtype(reader.getString());
} else if ("species".equals(fieldName)) {
deserializedCookiecuttershark.setSpecies(reader.getString());
} else if ("siblings".equals(fieldName)) {
List<Fish> siblings = reader.readArray(reader1 -> Fish.fromJson(reader1));
deserializedCookiecuttershark.setSiblings(siblings);
} else if ("age".equals(fieldName)) {
deserializedCookiecuttershark.setAge(reader.getNullable(JsonReader::getInt));
} else if ("fishtype".equals(fieldName)) {
deserializedCookiecuttershark.fishtype = reader.getString();
} else {
reader.skipChildren();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,6 @@ public String getFishType() {
return this.fishType;
}

/**
* Set the fishType property: The fish.type property.
*
* @param fishType the fishType value to set.
* @return the DotFish object itself.
*/
protected DotFish setFishType(String fishType) {
this.fishType = fishType;
return this;
}

/**
* Get the species property: The species property.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
*/
@Fluent
public final class DotSalmon extends DotFish {
/*
* The fish.type property.
*/
private String fishType = "DotSalmon";

/*
* The location property.
*/
Expand All @@ -32,7 +37,16 @@ public final class DotSalmon extends DotFish {
* Creates an instance of DotSalmon class.
*/
public DotSalmon() {
setFishType("DotSalmon");
}

/**
* Get the fishType property: The fish.type property.
*
* @return the fishType value.
*/
@Override
public String getFishType() {
return this.fishType;
}

/**
Expand Down Expand Up @@ -89,8 +103,8 @@ public DotSalmon setSpecies(String species) {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("fish.type", getFishType());
jsonWriter.writeStringField("species", getSpecies());
jsonWriter.writeStringField("fish.type", this.fishType);
jsonWriter.writeStringField("location", this.location);
jsonWriter.writeBooleanField("iswild", this.isWild);
return jsonWriter.writeEndObject();
Expand All @@ -110,10 +124,10 @@ public static DotSalmon fromJson(JsonReader jsonReader) throws IOException {
String fieldName = reader.getFieldName();
reader.nextToken();

if ("fish.type".equals(fieldName)) {
deserializedDotSalmon.setFishType(reader.getString());
} else if ("species".equals(fieldName)) {
if ("species".equals(fieldName)) {
deserializedDotSalmon.setSpecies(reader.getString());
} else if ("fish.type".equals(fieldName)) {
deserializedDotSalmon.fishType = reader.getString();
} else if ("location".equals(fieldName)) {
deserializedDotSalmon.location = reader.getString();
} else if ("iswild".equals(fieldName)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,6 @@ public String getFishtype() {
return this.fishtype;
}

/**
* Set the fishtype property: The fishtype property.
*
* @param fishtype the fishtype value to set.
* @return the Fish object itself.
*/
protected Fish setFishtype(String fishtype) {
this.fishtype = fishtype;
return this;
}

/**
* Get the species property: The species property.
*
Expand Down
Loading