Skip to content

Commit

Permalink
[Automation] Generate SDK based on TypeSpec 0.25.0 (#42938)
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-sdk authored Nov 14, 2024
1 parent 4c42252 commit c989d40
Show file tree
Hide file tree
Showing 21 changed files with 72 additions and 45 deletions.
16 changes: 8 additions & 8 deletions eng/emitter-package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-java": "0.24.0"
"@azure-tools/typespec-java": "0.25.0"
},
"devDependencies": {
"@azure-tools/typespec-autorest": "0.48.0",
"@azure-tools/typespec-azure-core": "0.48.0",
"@azure-tools/typespec-azure-resource-manager": "0.48.0",
"@azure-tools/typespec-azure-rulesets": "0.48.0",
"@azure-tools/typespec-client-generator-core": "0.48.0",
"@azure-tools/typespec-client-generator-core": "0.48.1",
"@typespec/compiler": "0.62.0",
"@typespec/http": "0.62.0",
"@typespec/openapi": "0.62.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,16 +521,19 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeArrayField("stop", this.stop, (writer, element) -> writer.writeString(element));
jsonWriter.writeArrayField("tools", this.tools, (writer, element) -> writer.writeJson(element));
if (this.toolChoice != null) {
jsonWriter.writeUntypedField("tool_choice", this.toolChoice.toObject(Object.class));
jsonWriter.writeFieldName("tool_choice");
this.toolChoice.writeTo(jsonWriter);
}
jsonWriter.writeNumberField("seed", this.seed);
jsonWriter.writeStringField("model", this.model);
if (additionalProperties != null) {
for (Map.Entry<String, BinaryData> additionalProperty : additionalProperties.entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(),
additionalProperty.getValue() == null
? null
: additionalProperty.getValue().toObject(Object.class));
jsonWriter.writeFieldName(additionalProperty.getKey());
if (additionalProperty.getValue() == null) {
jsonWriter.writeNull();
} else {
additionalProperty.getValue().writeTo(jsonWriter);
}
}
}
return jsonWriter.writeEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("model", this.model);
if (additionalProperties != null) {
for (Map.Entry<String, BinaryData> additionalProperty : additionalProperties.entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(),
additionalProperty.getValue() == null
? null
: additionalProperty.getValue().toObject(Object.class));
jsonWriter.writeFieldName(additionalProperty.getKey());
if (additionalProperty.getValue() == null) {
jsonWriter.writeNull();
} else {
additionalProperty.getValue().writeTo(jsonWriter);
}
}
}
return jsonWriter.writeEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("model", this.model);
if (additionalProperties != null) {
for (Map.Entry<String, BinaryData> additionalProperty : additionalProperties.entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(),
additionalProperty.getValue() == null
? null
: additionalProperty.getValue().toObject(Object.class));
jsonWriter.writeFieldName(additionalProperty.getKey());
if (additionalProperty.getValue() == null) {
jsonWriter.writeNull();
} else {
additionalProperty.getValue().writeTo(jsonWriter);
}
}
}
return jsonWriter.writeEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public BinaryData getContent() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeUntypedField("content", this.content.toObject(Object.class));
jsonWriter.writeFieldName("content");
this.content.writeTo(jsonWriter);
jsonWriter.writeStringField("role", this.role == null ? null : this.role.toString());
return jsonWriter.writeEndObject();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public int getIndex() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeUntypedField("embedding", this.embedding.toObject(Object.class));
jsonWriter.writeFieldName("embedding");
this.embedding.writeTo(jsonWriter);
jsonWriter.writeIntField("index", this.index);
return jsonWriter.writeEndObject();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("status", getStatus() == null ? null : getStatus().toString());
jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
if (this.content != null) {
jsonWriter.writeUntypedField("content", this.content.toObject(Object.class));
jsonWriter.writeFieldName("content");
this.content.writeTo(jsonWriter);
}
return jsonWriter.writeEndObject();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("code", this.code);
if (this.value != null) {
jsonWriter.writeUntypedField("value", this.value.toObject(Object.class));
jsonWriter.writeFieldName("value");
this.value.writeTo(jsonWriter);
}
return jsonWriter.writeEndObject();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeJsonField("verifyResult", this.verifyResult);
if (additionalProperties != null) {
for (Map.Entry<String, BinaryData> additionalProperty : additionalProperties.entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(),
additionalProperty.getValue() == null
? null
: additionalProperty.getValue().toObject(Object.class));
jsonWriter.writeFieldName(additionalProperty.getKey());
if (additionalProperty.getValue() == null) {
jsonWriter.writeNull();
} else {
additionalProperty.getValue().writeTo(jsonWriter);
}
}
}
return jsonWriter.writeEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeNumberField("top_p", this.topP);
jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element));
if (this.responseFormat != null) {
jsonWriter.writeUntypedField("response_format", this.responseFormat.toObject(Object.class));
jsonWriter.writeFieldName("response_format");
this.responseFormat.writeTo(jsonWriter);
}
return jsonWriter.writeEndObject();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeNumberField("temperature", this.temperature);
jsonWriter.writeNumberField("top_p", this.topP);
if (this.responseFormat != null) {
jsonWriter.writeUntypedField("response_format", this.responseFormat.toObject(Object.class));
jsonWriter.writeFieldName("response_format");
this.responseFormat.writeTo(jsonWriter);
}
jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element));
return jsonWriter.writeEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeNumberField("max_completion_tokens", this.maxCompletionTokens);
jsonWriter.writeJsonField("truncation_strategy", this.truncationStrategy);
if (this.toolChoice != null) {
jsonWriter.writeUntypedField("tool_choice", this.toolChoice.toObject(Object.class));
jsonWriter.writeFieldName("tool_choice");
this.toolChoice.writeTo(jsonWriter);
}
if (this.responseFormat != null) {
jsonWriter.writeUntypedField("response_format", this.responseFormat.toObject(Object.class));
jsonWriter.writeFieldName("response_format");
this.responseFormat.writeTo(jsonWriter);
}
jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element));
return jsonWriter.writeEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeNumberField("max_completion_tokens", this.maxCompletionTokens);
jsonWriter.writeJsonField("truncation_strategy", this.truncationStrategy);
if (this.toolChoice != null) {
jsonWriter.writeUntypedField("tool_choice", this.toolChoice.toObject(Object.class));
jsonWriter.writeFieldName("tool_choice");
this.toolChoice.writeTo(jsonWriter);
}
if (this.responseFormat != null) {
jsonWriter.writeUntypedField("response_format", this.responseFormat.toObject(Object.class));
jsonWriter.writeFieldName("response_format");
this.responseFormat.writeTo(jsonWriter);
}
jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element));
return jsonWriter.writeEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("code_interpreter", this.codeInterpreter);
if (this.fileSearch != null) {
jsonWriter.writeUntypedField("file_search", this.fileSearch.toObject(Object.class));
jsonWriter.writeFieldName("file_search");
this.fileSearch.writeTo(jsonWriter);
}
return jsonWriter.writeEndObject();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeNumberField("max_prompt_tokens", this.maxPromptTokens);
jsonWriter.writeNumberField("max_completion_tokens", this.maxCompletionTokens);
jsonWriter.writeJsonField("truncation_strategy", this.truncationStrategy);
jsonWriter.writeUntypedField("tool_choice", this.toolChoice.toObject(Object.class));
jsonWriter.writeUntypedField("response_format", this.responseFormat.toObject(Object.class));
jsonWriter.writeFieldName("tool_choice");
this.toolChoice.writeTo(jsonWriter);
jsonWriter.writeFieldName("response_format");
this.responseFormat.writeTo(jsonWriter);
jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("required_action", this.requiredAction);
jsonWriter.writeNumberField("temperature", this.temperature);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeNumberField("temperature", this.temperature);
jsonWriter.writeNumberField("top_p", this.topP);
if (this.responseFormat != null) {
jsonWriter.writeUntypedField("response_format", this.responseFormat.toObject(Object.class));
jsonWriter.writeFieldName("response_format");
this.responseFormat.writeTo(jsonWriter);
}
jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element));
return jsonWriter.writeEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("app_name", this.appName);
jsonWriter.writeStringField("index_name", this.indexName);
jsonWriter.writeJsonField("fields_mapping", this.fieldsMapping);
jsonWriter.writeUntypedField("embedding_dependency", this.embeddingDependency.toObject(Object.class));
jsonWriter.writeFieldName("embedding_dependency");
this.embeddingDependency.writeTo(jsonWriter);
jsonWriter.writeNumberField("top_n_documents", this.topNDocuments);
jsonWriter.writeBooleanField("in_scope", this.inScope);
jsonWriter.writeNumberField("strictness", this.strictness);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("keywords", this.keywords);
jsonWriter.writeNumberField("limit", this.limit);
if (this.filter != null) {
jsonWriter.writeUntypedField("filter", this.filter.toObject(Object.class));
jsonWriter.writeFieldName("filter");
this.filter.writeTo(jsonWriter);
}
return jsonWriter.writeEndObject();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeArrayField("orderby", this.orderby,
(writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class)));
if (this.filter != null) {
jsonWriter.writeUntypedField("filter", this.filter.toObject(Object.class));
jsonWriter.writeFieldName("filter");
this.filter.writeTo(jsonWriter);
}
jsonWriter.writeArrayField("facets", this.facets, (writer, element) -> writer.writeJson(element));
jsonWriter.writeJsonField("taxonomySetting", this.taxonomySetting);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("keywords", this.keywords);
jsonWriter.writeNumberField("limit", this.limit);
if (this.filter != null) {
jsonWriter.writeUntypedField("filter", this.filter.toObject(Object.class));
jsonWriter.writeFieldName("filter");
this.filter.writeTo(jsonWriter);
}
return jsonWriter.writeEndObject();
}
Expand Down

0 comments on commit c989d40

Please sign in to comment.