Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AutoRest C# version to 3.0.0-beta.20230924.2 #38934

Merged
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
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,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.20230922.4" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230924.2" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20230822.1" 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
2 changes: 1 addition & 1 deletion eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-csharp": "0.2.0-beta.20230922.4"
"@azure-tools/typespec-csharp": "0.2.0-beta.20230924.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ protected TextTranslationClient(System.Uri endpoint, Azure.AI.Translation.Text.T
public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Translation.Text.BreakSentenceItem>> FindSentenceBoundaries(string text, string clientTraceId = null, string language = null, string script = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Translation.Text.BreakSentenceItem>>> FindSentenceBoundariesAsync(System.Collections.Generic.IEnumerable<string> content, string clientTraceId = null, string language = null, string script = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Translation.Text.BreakSentenceItem>>> FindSentenceBoundariesAsync(string text, string clientTraceId = null, string language = null, string script = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.AI.Translation.Text.GetLanguagesResult> GetLanguages(string clientTraceId = null, string scope = null, string acceptLanguage = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Translation.Text.GetLanguagesResult>> GetLanguagesAsync(string clientTraceId = null, string scope = null, string acceptLanguage = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response GetLanguages(string clientTraceId, string scope, string acceptLanguage, Azure.ETag? ifNoneMatch, Azure.RequestContext context) { throw null; }
public virtual Azure.Response<Azure.AI.Translation.Text.GetLanguagesResult> GetLanguages(string clientTraceId = null, string scope = null, string acceptLanguage = null, Azure.ETag? ifNoneMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> GetLanguagesAsync(string clientTraceId, string scope, string acceptLanguage, Azure.ETag? ifNoneMatch, Azure.RequestContext context) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Translation.Text.GetLanguagesResult>> GetLanguagesAsync(string clientTraceId = null, string scope = null, string acceptLanguage = null, Azure.ETag? ifNoneMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Translation.Text.DictionaryLookupItem>> LookupDictionaryEntries(string from, string to, System.Collections.Generic.IEnumerable<string> words, string clientTraceId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Translation.Text.DictionaryLookupItem>> LookupDictionaryEntries(string from, string to, string word, string clientTraceId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Translation.Text.DictionaryLookupItem>>> LookupDictionaryEntriesAsync(string from, string to, System.Collections.Generic.IEnumerable<string> words, string clientTraceId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -725,154 +725,6 @@ public virtual Response<IReadOnlyList<DictionaryExampleItem>> LookupDictionaryEx
return this.LookupDictionaryExamples(from, to, new[] { new DictionaryExampleTextItem(content.Text, content.Translation) }, clientTraceId, cancellationToken);
}

/// <summary> Gets the set of languages currently supported by other operations of the Translator. </summary>
/// <param name="clientTraceId"> A client-generated GUID to uniquely identify the request. </param>
/// <param name="scope">
/// A comma-separated list of names defining the group of languages to return.
/// Allowed group names are: `translation`, `transliteration` and `dictionary`.
/// If no scope is given, then all groups are returned, which is equivalent to passing
/// `scope=translation,transliteration,dictionary`. To decide which set of supported languages
/// is appropriate for your scenario, see the description of the [response object](#response-body).
/// </param>
/// <param name="acceptLanguage">
/// The language to use for user interface strings. Some of the fields in the response are names of languages or
/// names of regions. Use this parameter to define the language in which these names are returned.
/// The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr`
/// to request names in French or use the value `zh-Hant` to request names in Chinese Traditional.
/// Names are provided in the English language when a target language is not specified or when localization
/// is not available.
/// </param>
/// <param name="ifNoneMatch">
/// Passing the value of the ETag response header in an If-None-Match field will allow the service to optimize the response.
/// If the resource has not been modified, the service will return status code 304 and an empty response body.
/// </param>
/// <param name="context"> Request context. </param>
internal virtual async Task<Response> GetLanguagesAsync(string clientTraceId = null, string scope = null, string acceptLanguage = null, string ifNoneMatch = null, RequestContext context = default)
{
ETag? eTag = null;
if (ifNoneMatch != null)
{
eTag = new ETag(ifNoneMatch);
}

return await this.GetLanguagesAsync(clientTraceId, scope, acceptLanguage, eTag, context).ConfigureAwait(false);
}

/// <summary> Gets the set of languages currently supported by other operations of the Translator. </summary>
/// <param name="clientTraceId"> A client-generated GUID to uniquely identify the request. </param>
/// <param name="scope">
/// A comma-separated list of names defining the group of languages to return.
/// Allowed group names are: `translation`, `transliteration` and `dictionary`.
/// If no scope is given, then all groups are returned, which is equivalent to passing
/// `scope=translation,transliteration,dictionary`. To decide which set of supported languages
/// is appropriate for your scenario, see the description of the [response object](#response-body).
/// </param>
/// <param name="acceptLanguage">
/// The language to use for user interface strings. Some of the fields in the response are names of languages or
/// names of regions. Use this parameter to define the language in which these names are returned.
/// The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr`
/// to request names in French or use the value `zh-Hant` to request names in Chinese Traditional.
/// Names are provided in the English language when a target language is not specified or when localization
/// is not available.
/// </param>
/// <param name="ifNoneMatch">
/// Passing the value of the ETag response header in an If-None-Match field will allow the service to optimize the response.
/// If the resource has not been modified, the service will return status code 304 and an empty response body.
/// </param>
/// <param name="context"> Request context. </param>
internal virtual Response GetLanguages(string clientTraceId = null, string scope = null, string acceptLanguage = null, string ifNoneMatch = null, RequestContext context = default)
{
ETag? eTag = null;
if (ifNoneMatch != null)
{
eTag = new ETag(ifNoneMatch);
}

return this.GetLanguages(clientTraceId, scope, acceptLanguage, eTag, context);
}

// Overrides for generated class

/// <summary> Gets the set of languages currently supported by other operations of the Translator. </summary>
/// <param name="clientTraceId"> A client-generated GUID to uniquely identify the request. </param>
/// <param name="scope">
/// A comma-separated list of names defining the group of languages to return.
/// Allowed group names are: `translation`, `transliteration` and `dictionary`.
/// If no scope is given, then all groups are returned, which is equivalent to passing
/// `scope=translation,transliteration,dictionary`. To decide which set of supported languages
/// is appropriate for your scenario, see the description of the [response object](#response-body).
/// </param>
/// <param name="acceptLanguage">
/// The language to use for user interface strings. Some of the fields in the response are names of languages or
/// names of regions. Use this parameter to define the language in which these names are returned.
/// The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr`
/// to request names in French or use the value `zh-Hant` to request names in Chinese Traditional.
/// Names are provided in the English language when a target language is not specified or when localization
/// is not available.
/// </param>
/// <param name="ifNoneMatch">
/// Passing the value of the ETag response header in an If-None-Match field will allow the service to optimize the response.
/// If the resource has not been modified, the service will return status code 304 and an empty response body.
/// </param>
/// <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
/// <exception cref="RequestFailedException"> Service returned a non-success status code. </exception>
/// <returns> The response returned from the service. Details of the response body schema are in the Remarks section below. </returns>
internal virtual async Task<Response> GetLanguagesAsync(string clientTraceId = null, string scope = null, string acceptLanguage = null, ETag? ifNoneMatch = null, RequestContext context = null)
{
using var scope0 = ClientDiagnostics.CreateScope("TextTranslationClient.GetLanguages");
scope0.Start();
try
{
using HttpMessage message = CreateGetLanguagesRequest(clientTraceId, scope, acceptLanguage, ifNoneMatch, context);
return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
}
catch (Exception e)
{
scope0.Failed(e);
throw;
}
}

/// <summary> Gets the set of languages currently supported by other operations of the Translator. </summary>
/// <param name="clientTraceId"> A client-generated GUID to uniquely identify the request. </param>
/// <param name="scope">
/// A comma-separated list of names defining the group of languages to return.
/// Allowed group names are: `translation`, `transliteration` and `dictionary`.
/// If no scope is given, then all groups are returned, which is equivalent to passing
/// `scope=translation,transliteration,dictionary`. To decide which set of supported languages
/// is appropriate for your scenario, see the description of the [response object](#response-body).
/// </param>
/// <param name="acceptLanguage">
/// The language to use for user interface strings. Some of the fields in the response are names of languages or
/// names of regions. Use this parameter to define the language in which these names are returned.
/// The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr`
/// to request names in French or use the value `zh-Hant` to request names in Chinese Traditional.
/// Names are provided in the English language when a target language is not specified or when localization
/// is not available.
/// </param>
/// <param name="ifNoneMatch">
/// Passing the value of the ETag response header in an If-None-Match field will allow the service to optimize the response.
/// If the resource has not been modified, the service will return status code 304 and an empty response body.
/// </param>
/// <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
/// <exception cref="RequestFailedException"> Service returned a non-success status code. </exception>
/// <returns> The response returned from the service. Details of the response body schema are in the Remarks section below. </returns>
internal virtual Response GetLanguages(string clientTraceId = null, string scope = null, string acceptLanguage = null, ETag? ifNoneMatch = null, RequestContext context = null)
{
using var scope0 = ClientDiagnostics.CreateScope("TextTranslationClient.GetLanguages");
scope0.Start();
try
{
using HttpMessage message = CreateGetLanguagesRequest(clientTraceId, scope, acceptLanguage, ifNoneMatch, context);
return _pipeline.ProcessMessage(message, context);
}
catch (Exception e)
{
scope0.Failed(e);
throw;
}
}

/// <summary> Translate Text. </summary>
/// <param name="to">
/// Specifies the language of the output text. The target language must be one of the supported languages included
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<doc>
<members>
<member name="GetLanguagesAsync(string,string,string,string,CancellationToken)" />
<member name="GetLanguages(string,string,string,string,CancellationToken)" />
<member name="GetLanguagesAsync(string,string,string,ETag?,CancellationToken)" />
<member name="GetLanguages(string,string,string,ETag?,CancellationToken)" />
<member name="GetLanguagesAsync(string,string,string,ETag?,RequestContext)" />
<member name="GetLanguages(string,string,string,ETag?,RequestContext)" />
<member name="TranslateAsync(IEnumerable{string},IEnumerable{InputTextItem},string,string,string,string,string,string,bool?,bool?,string,string,string,bool?,CancellationToken)" />
Expand Down
Loading