Skip to content

Commit

Permalink
Update AutoRest C# version to 3.0.0-beta.20240426.1 (Azure#43676)
Browse files Browse the repository at this point in the history
* Update Generator Version 3.0.0-beta.20240426.1

* Update SDK codes de_he_2

* Update SDK codes ad_co_0

* Update SDK codes st_wo_6

* Update SDK codes mi_pu_4

* Update SDK codes pu_sq_5

* Update SDK codes co_de_1

* Update SDK codes he_mi_3

* resolve build failure

* update customize code

---------

Co-authored-by: FAREAST\chunyu <chunyu@microsoft.com>
  • Loading branch information
azure-sdk and chunyu3 authored Apr 26, 2024
1 parent 5590f8f commit 3e9b166
Show file tree
Hide file tree
Showing 88 changed files with 11,555 additions and 232 deletions.
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
All should have PrivateAssets="All" set so they don't become package dependencies
-->
<ItemGroup>
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20240425.2" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20240426.1" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20240214.2" PrivateAssets="All" />
<PackageReference Update="coverlet.collector" Version="3.2.0" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.4" PrivateAssets="All" />
Expand Down
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.

12 changes: 6 additions & 6 deletions eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-csharp": "0.2.0-beta.20240425.2"
"@azure-tools/typespec-csharp": "0.2.0-beta.20240426.1"
},
"devDependencies": {
"@azure-tools/typespec-client-generator-core": "0.42.0-dev.8",
"@typespec/compiler": "0.55.0",
"@typespec/rest": "0.55.0",
"@typespec/versioning": "0.55.0",
"@typespec/http": "0.55.0",
"@typespec/rest": "0.55.0",
"@typespec/openapi": "0.55.0",
"@typespec/compiler": "0.55.0",
"@azure-tools/typespec-azure-core": "0.41.0",
"@typespec/openapi": "0.55.0"
"@azure-tools/typespec-client-generator-core": "0.42.0-dev.8",
"@typespec/versioning": "0.55.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public partial class Attachments
{
protected Attachments() { }
public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
public virtual Azure.Response CreateOrUpdate(string partyId, string attachmentId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> CreateOrUpdateAsync(string partyId, string attachmentId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
public virtual Azure.Response CreateOrUpdate(string partyId, string attachmentId, Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = null) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> CreateOrUpdateAsync(string partyId, string attachmentId, Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = null) { throw null; }
public virtual Azure.Response Delete(string partyId, string attachmentId, Azure.RequestContext context = null) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteAsync(string partyId, string attachmentId, Azure.RequestContext context = null) { throw null; }
public virtual Azure.Response Download(string partyId, string attachmentId, Azure.RequestContext context) { throw null; }
Expand Down Expand Up @@ -255,8 +255,8 @@ public partial class InsightAttachments
{
protected InsightAttachments() { }
public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
public virtual Azure.Response CreateOrUpdate(string partyId, string modelId, string resourceType, string resourceId, string insightAttachmentId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> CreateOrUpdateAsync(string partyId, string modelId, string resourceType, string resourceId, string insightAttachmentId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
public virtual Azure.Response CreateOrUpdate(string partyId, string modelId, string resourceType, string resourceId, string insightAttachmentId, Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = null) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> CreateOrUpdateAsync(string partyId, string modelId, string resourceType, string resourceId, string insightAttachmentId, Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = null) { throw null; }
public virtual Azure.Response Delete(string partyId, string modelId, string resourceType, string resourceId, string insightAttachmentId, Azure.RequestContext context = null) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteAsync(string partyId, string modelId, string resourceType, string resourceId, string insightAttachmentId, Azure.RequestContext context = null) { throw null; }
public virtual Azure.Response Download(string partyId, string modelId, string resourceType, string resourceId, string insightAttachmentId, Azure.RequestContext context) { throw null; }
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Console.WriteLine(result.GetProperty("modifiedBy").ToString());
Console.WriteLine(result.GetProperty("eTag").ToString());
]]></code></example>
</member>
<member name="CreateOrUpdateAsync(string,string,RequestContent,RequestContext)">
<member name="CreateOrUpdateAsync(string,string,RequestContent,string,RequestContext)">
<example>
This sample shows how to call CreateOrUpdateAsync and parse the result.
<code><![CDATA[
Expand All @@ -86,7 +86,7 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
using RequestContent content = null;
Response response = await client.CreateOrUpdateAsync("<partyId>", "<attachmentId>", content);
Response response = await client.CreateOrUpdateAsync("<partyId>", "<attachmentId>", content, "multipart/form-data");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
Expand All @@ -98,7 +98,7 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
using RequestContent content = RequestContent.Create(File.OpenRead("<filePath>"));
Response response = await client.CreateOrUpdateAsync("<partyId>", "<attachmentId>", content);
Response response = await client.CreateOrUpdateAsync("<partyId>", "<attachmentId>", content, "multipart/form-data");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("resourceId").ToString());
Expand All @@ -117,7 +117,7 @@ Console.WriteLine(result.GetProperty("modifiedBy").ToString());
Console.WriteLine(result.GetProperty("eTag").ToString());
]]></code></example>
</member>
<member name="CreateOrUpdate(string,string,RequestContent,RequestContext)">
<member name="CreateOrUpdate(string,string,RequestContent,string,RequestContext)">
<example>
This sample shows how to call CreateOrUpdate and parse the result.
<code><![CDATA[
Expand All @@ -126,7 +126,7 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
using RequestContent content = null;
Response response = client.CreateOrUpdate("<partyId>", "<attachmentId>", content);
Response response = client.CreateOrUpdate("<partyId>", "<attachmentId>", content, "multipart/form-data");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
Expand All @@ -138,7 +138,7 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
using RequestContent content = RequestContent.Create(File.OpenRead("<filePath>"));
Response response = client.CreateOrUpdate("<partyId>", "<attachmentId>", content);
Response response = client.CreateOrUpdate("<partyId>", "<attachmentId>", content, "multipart/form-data");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("resourceId").ToString());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<doc>
<members>
<member name="CreateOrUpdateAsync(string,string,string,string,string,RequestContent,RequestContext)">
<member name="CreateOrUpdateAsync(string,string,string,string,string,RequestContent,string,RequestContext)">
<example>
This sample shows how to call CreateOrUpdateAsync and parse the result.
<code><![CDATA[
Expand All @@ -10,7 +10,7 @@ TokenCredential credential = new DefaultAzureCredential();
InsightAttachments client = new FarmBeatsClient(endpoint, credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview");
using RequestContent content = RequestContent.Create("<insightId>");
Response response = await client.CreateOrUpdateAsync("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", "<insightAttachmentId>", content);
Response response = await client.CreateOrUpdateAsync("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", "<insightAttachmentId>", content, "multipart/form-data");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("insightId").ToString());
Expand All @@ -22,7 +22,7 @@ TokenCredential credential = new DefaultAzureCredential();
InsightAttachments client = new FarmBeatsClient(endpoint, credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview");
using RequestContent content = RequestContent.Create(File.OpenRead("<filePath>"));
Response response = await client.CreateOrUpdateAsync("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", "<insightAttachmentId>", content);
Response response = await client.CreateOrUpdateAsync("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", "<insightAttachmentId>", content, "multipart/form-data");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("insightId").ToString());
Expand All @@ -43,7 +43,7 @@ Console.WriteLine(result.GetProperty("modifiedBy").ToString());
Console.WriteLine(result.GetProperty("eTag").ToString());
]]></code></example>
</member>
<member name="CreateOrUpdate(string,string,string,string,string,RequestContent,RequestContext)">
<member name="CreateOrUpdate(string,string,string,string,string,RequestContent,string,RequestContext)">
<example>
This sample shows how to call CreateOrUpdate and parse the result.
<code><![CDATA[
Expand All @@ -52,7 +52,7 @@ TokenCredential credential = new DefaultAzureCredential();
InsightAttachments client = new FarmBeatsClient(endpoint, credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview");
using RequestContent content = RequestContent.Create("<insightId>");
Response response = client.CreateOrUpdate("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", "<insightAttachmentId>", content);
Response response = client.CreateOrUpdate("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", "<insightAttachmentId>", content, "multipart/form-data");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("insightId").ToString());
Expand All @@ -64,7 +64,7 @@ TokenCredential credential = new DefaultAzureCredential();
InsightAttachments client = new FarmBeatsClient(endpoint, credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview");
using RequestContent content = RequestContent.Create(File.OpenRead("<filePath>"));
Response response = client.CreateOrUpdate("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", "<insightAttachmentId>", content);
Response response = client.CreateOrUpdate("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", "<insightAttachmentId>", content, "multipart/form-data");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("insightId").ToString());
Expand Down
Loading

0 comments on commit 3e9b166

Please sign in to comment.