Skip to content
Closed
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
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,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.20231113.1" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-alpha.20231113.4" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20231107.2" PrivateAssets="All" />
<PackageReference Update="coverlet.collector" Version="3.2.0" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.1" PrivateAssets="All" />
Expand Down
17 changes: 9 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.

5 changes: 4 additions & 1 deletion eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-csharp": "0.2.0-beta.20231113.1"
"@azure-tools/typespec-csharp": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest@local/npm/registry/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-alpha.20231113.4.tgz"
},
"overrides": {
"@autorest/csharp": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest@local/npm/registry/@autorest/csharp/-/csharp-3.0.0-alpha.20231113.4.tgz"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected Devices() { }
public partial class FarmBeatsClient
{
protected FarmBeatsClient() { }
public FarmBeatsClient(Azure.Core.TokenCredential credential) { }
public FarmBeatsClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { }
public FarmBeatsClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Verticals.AgriFood.Farming.FarmBeatsClientOptions options) { }
public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
public virtual Azure.Verticals.AgriFood.Farming.ApplicationData GetApplicationDataClient(string apiVersion = "2022-11-01-preview") { throw null; }
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<example>
This sample shows how to call GetAttachmentAsync and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = await client.GetAttachmentAsync("<partyId>", "<attachmentId>", null);

Expand All @@ -15,8 +16,9 @@ Console.WriteLine(result.ToString());
]]></code>
This sample shows how to call GetAttachmentAsync with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = await client.GetAttachmentAsync("<partyId>", "<attachmentId>", null);

Expand All @@ -41,8 +43,9 @@ Console.WriteLine(result.GetProperty("eTag").ToString());
<example>
This sample shows how to call GetAttachment and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = client.GetAttachment("<partyId>", "<attachmentId>", null);

Expand All @@ -51,8 +54,9 @@ Console.WriteLine(result.ToString());
]]></code>
This sample shows how to call GetAttachment with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = client.GetAttachment("<partyId>", "<attachmentId>", null);

Expand All @@ -77,8 +81,9 @@ Console.WriteLine(result.GetProperty("eTag").ToString());
<example>
This sample shows how to call CreateOrUpdateAsync and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

using RequestContent content = null;
Response response = await client.CreateOrUpdateAsync("<partyId>", "<attachmentId>", content);
Expand All @@ -88,8 +93,9 @@ Console.WriteLine(result.ToString());
]]></code>
This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
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);
Expand All @@ -115,8 +121,9 @@ Console.WriteLine(result.GetProperty("eTag").ToString());
<example>
This sample shows how to call CreateOrUpdate and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

using RequestContent content = null;
Response response = client.CreateOrUpdate("<partyId>", "<attachmentId>", content);
Expand All @@ -126,8 +133,9 @@ Console.WriteLine(result.ToString());
]]></code>
This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
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);
Expand All @@ -153,17 +161,19 @@ Console.WriteLine(result.GetProperty("eTag").ToString());
<example>
This sample shows how to call DeleteAsync.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = await client.DeleteAsync("<partyId>", "<attachmentId>");

Console.WriteLine(response.Status);
]]></code>
This sample shows how to call DeleteAsync with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = await client.DeleteAsync("<partyId>", "<attachmentId>");

Expand All @@ -174,17 +184,19 @@ Console.WriteLine(response.Status);
<example>
This sample shows how to call Delete.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = client.Delete("<partyId>", "<attachmentId>");

Console.WriteLine(response.Status);
]]></code>
This sample shows how to call Delete with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = client.Delete("<partyId>", "<attachmentId>");

Expand All @@ -195,8 +207,9 @@ Console.WriteLine(response.Status);
<example>
This sample shows how to call DownloadAsync and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = await client.DownloadAsync("<partyId>", "<attachmentId>", null);

Expand All @@ -208,8 +221,9 @@ if (response.ContentStream != null)
]]></code>
This sample shows how to call DownloadAsync with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = await client.DownloadAsync("<partyId>", "<attachmentId>", null);

Expand All @@ -224,8 +238,9 @@ if (response.ContentStream != null)
<example>
This sample shows how to call Download and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = client.Download("<partyId>", "<attachmentId>", null);

Expand All @@ -237,8 +252,9 @@ if (response.ContentStream != null)
]]></code>
This sample shows how to call Download with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

Response response = client.Download("<partyId>", "<attachmentId>", null);

Expand All @@ -253,8 +269,9 @@ if (response.ContentStream != null)
<example>
This sample shows how to call GetAttachmentsByPartyIdAsync and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("<partyId>", null, null, null, null, null, null, null, null, null, null, null, null, null))
{
Expand All @@ -264,8 +281,9 @@ await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("<partyId>
]]></code>
This sample shows how to call GetAttachmentsByPartyIdAsync with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("<partyId>", new string[] { "<resourceIds>" }, new string[] { "<resourceTypes>" }, new string[] { "<ids>" }, new string[] { "<names>" }, new string[] { "<propertyFilters>" }, new string[] { "<statuses>" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "<skipToken>", null))
{
Expand All @@ -291,8 +309,9 @@ await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("<partyId>
<example>
This sample shows how to call GetAttachmentsByPartyId and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

foreach (BinaryData item in client.GetAttachmentsByPartyId("<partyId>", null, null, null, null, null, null, null, null, null, null, null, null, null))
{
Expand All @@ -302,8 +321,9 @@ foreach (BinaryData item in client.GetAttachmentsByPartyId("<partyId>", null, nu
]]></code>
This sample shows how to call GetAttachmentsByPartyId with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Attachments client = new FarmBeatsClient(endpoint, credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

foreach (BinaryData item in client.GetAttachmentsByPartyId("<partyId>", new string[] { "<resourceIds>" }, new string[] { "<resourceTypes>" }, new string[] { "<ids>" }, new string[] { "<names>" }, new string[] { "<propertyFilters>" }, new string[] { "<statuses>" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "<skipToken>", null))
{
Expand Down
Loading