diff --git a/AutoRest/AutoRest.Core.Tests/CodeGeneratorsTests.cs b/AutoRest/AutoRest.Core.Tests/CodeGeneratorsTests.cs index 8cadb3f6414f..24a8d00e7314 100644 --- a/AutoRest/AutoRest.Core.Tests/CodeGeneratorsTests.cs +++ b/AutoRest/AutoRest.Core.Tests/CodeGeneratorsTests.cs @@ -55,6 +55,18 @@ public void CodeWriterWrapsComments() /// and there is a sun outside the window.")); } + [Fact] + public void CodeWriterWritesCRefAttribute() + { + var sampleModelTemplate = new SampleModel(); + var sampleViewModel = new SampleViewModel(); + + sampleModelTemplate.Model = sampleViewModel; + var output = sampleModelTemplate.ToString(); + Assert.True(output.Contains("/// ")); + Assert.True(output.Contains("/// ")); + } + [Fact] public void CodeWriterOverwritesExistingFile() { diff --git a/AutoRest/AutoRest.Core.Tests/Resource/SampleViewModel.cs b/AutoRest/AutoRest.Core.Tests/Resource/SampleViewModel.cs index 17b3c730ab44..2ce75a060b9d 100644 --- a/AutoRest/AutoRest.Core.Tests/Resource/SampleViewModel.cs +++ b/AutoRest/AutoRest.Core.Tests/Resource/SampleViewModel.cs @@ -30,6 +30,10 @@ public string Name get { return "CacheSku"; } } + public string OperationExceptionTypeString + { + get { return "CloudException"; } + } public string SerializationBlock { get { return @"if (outputObject == null) diff --git a/AutoRest/AutoRest.Core.Tests/Templates/SampleModel.cshtml b/AutoRest/AutoRest.Core.Tests/Templates/SampleModel.cshtml index a3a989118e4d..87944451dd4d 100644 --- a/AutoRest/AutoRest.Core.Tests/Templates/SampleModel.cshtml +++ b/AutoRest/AutoRest.Core.Tests/Templates/SampleModel.cshtml @@ -4,6 +4,8 @@ using System.Collection; @Model.Imports namespace @Model.Namespace { + @using System; + public partial class @Model.Name { @foreach(var property in Model.Properties) @@ -15,6 +17,12 @@ namespace @Model.Namespace /// /// Serialize the object /// + /// + /// Test exception comment + /// + /// + /// Test exception comment two + /// /// /// Returns the json model for the type @Model.Name /// diff --git a/AutoRest/AutoRest.Core/Template.cs b/AutoRest/AutoRest.Core/Template.cs index 56d8cb1f5784..5254f4534d6c 100644 --- a/AutoRest/AutoRest.Core/Template.cs +++ b/AutoRest/AutoRest.Core/Template.cs @@ -50,6 +50,31 @@ public string EmptyLine /// public abstract Task ExecuteAsync(); + /// + /// Write the attribute string directly to the output + /// + /// + /// + /// + /// + protected void WriteAttribute(string attribute, + Tuple tuple1, + Tuple tuple2, + Tuple, Tuple, bool> tuple3) + { + string value = string.Empty; + + if (attribute == "cref") + { + value = string.Format(CultureInfo.InvariantCulture, "{0}{1}{2}", tuple1?.Item1, tuple3?.Item2?.Item1.ToString(), tuple2?.Item1); + } + else + { + throw new NotImplementedException(attribute + " attributes are not yet implemented"); + } + WriteLiteral(value); + } + /// /// Write the given value directly to the output /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/AutoRestDurationTestService.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/AutoRestDurationTestService.cs index 42e4255ad06e..1e390935cb1b 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/AutoRestDurationTestService.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/AutoRestDurationTestService.cs @@ -106,6 +106,9 @@ protected AutoRestDurationTestService(HttpClientHandler rootHandler, params Dele /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestDurationTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -127,6 +130,9 @@ protected AutoRestDurationTestService(Uri baseUri, params DelegatingHandler[] ha /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestDurationTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -145,6 +151,9 @@ protected AutoRestDurationTestService(Uri baseUri, HttpClientHandler rootHandler /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestDurationTestService(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -170,6 +179,9 @@ public AutoRestDurationTestService(ServiceClientCredentials credentials, params /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestDurationTestService(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -195,6 +207,9 @@ public AutoRestDurationTestService(ServiceClientCredentials credentials, HttpCli /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestDurationTestService(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -228,6 +243,9 @@ public AutoRestDurationTestService(Uri baseUri, ServiceClientCredentials credent /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestDurationTestService(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/DurationOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/DurationOperations.cs index 0a81d725f40a..265948b8eb2f 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/DurationOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/DurationOperations.cs @@ -35,6 +35,9 @@ internal partial class DurationOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal DurationOperations(AutoRestDurationTestService client) { if (client == null) @@ -58,6 +61,12 @@ internal DurationOperations(AutoRestDurationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -206,6 +215,9 @@ internal DurationOperations(AutoRestDurationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -338,6 +350,12 @@ internal DurationOperations(AutoRestDurationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -484,6 +502,12 @@ internal DurationOperations(AutoRestDurationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/IDurationOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/IDurationOperations.cs index 97a076728be0..9e530549e03f 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/IDurationOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/IDurationOperations.cs @@ -31,6 +31,12 @@ public partial interface IDurationOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put a positive duration value @@ -43,6 +49,9 @@ public partial interface IDurationOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutPositiveDurationWithHttpMessagesAsync(TimeSpan durationBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a positive duration value @@ -53,6 +62,12 @@ public partial interface IDurationOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetPositiveDurationWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an invalid duration value @@ -63,6 +78,12 @@ public partial interface IDurationOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/Models/ErrorException.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/Models/ErrorException.cs index 2a54631c9f44..f5aa5804d79f 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureBodyDuration/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/ArrayOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/ArrayOperations.cs index 084e2252f5c2..bf1138846d92 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/ArrayOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/ArrayOperations.cs @@ -35,6 +35,9 @@ internal partial class ArrayOperations : IServiceOperations /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal ArrayOperations(AzureCompositeModel client) { if (client == null) @@ -58,6 +61,12 @@ internal ArrayOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -206,6 +215,9 @@ internal ArrayOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -346,6 +358,12 @@ internal ArrayOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -494,6 +512,9 @@ internal ArrayOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -635,6 +656,12 @@ internal ArrayOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/AzureCompositeModel.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/AzureCompositeModel.cs index 4a1b72d67ed3..839f9cb24d26 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/AzureCompositeModel.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/AzureCompositeModel.cs @@ -147,6 +147,9 @@ protected AzureCompositeModel(HttpClientHandler rootHandler, params DelegatingHa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AzureCompositeModel(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -168,6 +171,9 @@ protected AzureCompositeModel(Uri baseUri, params DelegatingHandler[] handlers) /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AzureCompositeModel(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -186,6 +192,9 @@ protected AzureCompositeModel(Uri baseUri, HttpClientHandler rootHandler, params /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AzureCompositeModel(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -211,6 +220,9 @@ public AzureCompositeModel(ServiceClientCredentials credentials, params Delegati /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AzureCompositeModel(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -236,6 +248,9 @@ public AzureCompositeModel(ServiceClientCredentials credentials, HttpClientHandl /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AzureCompositeModel(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -269,6 +284,9 @@ public AzureCompositeModel(Uri baseUri, ServiceClientCredentials credentials, pa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AzureCompositeModel(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -350,6 +368,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -519,6 +546,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -705,6 +741,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/BasicOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/BasicOperations.cs index 48f31b747d15..57c4bc71ab9f 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/BasicOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/BasicOperations.cs @@ -35,6 +35,9 @@ internal partial class BasicOperations : IServiceOperations /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal BasicOperations(AzureCompositeModel client) { if (client == null) @@ -58,6 +61,12 @@ internal BasicOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -207,6 +216,12 @@ internal BasicOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -352,6 +367,12 @@ internal BasicOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -498,6 +519,12 @@ internal BasicOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -644,6 +671,12 @@ internal BasicOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -791,6 +824,12 @@ internal BasicOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/DictionaryOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/DictionaryOperations.cs index 00abbb1a9f23..2bf34b927520 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/DictionaryOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/DictionaryOperations.cs @@ -35,6 +35,9 @@ internal partial class DictionaryOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal DictionaryOperations(AzureCompositeModel client) { if (client == null) @@ -58,6 +61,12 @@ internal DictionaryOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -206,6 +215,9 @@ internal DictionaryOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -346,6 +358,12 @@ internal DictionaryOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -494,6 +512,9 @@ internal DictionaryOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -634,6 +655,12 @@ internal DictionaryOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -781,6 +808,12 @@ internal DictionaryOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IArrayOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IArrayOperations.cs index 44570ec21350..f24bc2b808ed 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IArrayOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IArrayOperations.cs @@ -31,6 +31,12 @@ public partial interface IArrayOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with array property @@ -43,6 +49,9 @@ public partial interface IArrayOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutValidWithHttpMessagesAsync(IList array = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with array property which is empty @@ -53,6 +62,12 @@ public partial interface IArrayOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with array property which is empty @@ -65,6 +80,9 @@ public partial interface IArrayOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutEmptyWithHttpMessagesAsync(IList array = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with array property while server doesn't provide @@ -76,6 +94,12 @@ public partial interface IArrayOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNotProvidedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IBasicOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IBasicOperations.cs index e49257de6b49..d1c4a34a41d7 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IBasicOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IBasicOperations.cs @@ -31,6 +31,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Please put {id: 2, name: 'abc', color: 'Magenta'} @@ -44,6 +50,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidWithHttpMessagesAsync(Basic complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a basic complex type that is invalid for the local strong type @@ -54,6 +66,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a basic complex type that is empty @@ -64,6 +82,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a basic complex type whose properties are null @@ -74,6 +98,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a basic complex type while the server doesn't provide a @@ -85,6 +115,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNotProvidedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IDictionaryOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IDictionaryOperations.cs index 48bf0d568f6d..71f14f30c38a 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IDictionaryOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IDictionaryOperations.cs @@ -31,6 +31,12 @@ public partial interface IDictionaryOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with dictionary property @@ -43,6 +49,9 @@ public partial interface IDictionaryOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutValidWithHttpMessagesAsync(IDictionary defaultProgram = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with dictionary property which is empty @@ -53,6 +62,12 @@ public partial interface IDictionaryOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with dictionary property which is empty @@ -65,6 +80,9 @@ public partial interface IDictionaryOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutEmptyWithHttpMessagesAsync(IDictionary defaultProgram = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with dictionary property which is null @@ -75,6 +93,12 @@ public partial interface IDictionaryOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with dictionary property while server doesn't @@ -86,6 +110,12 @@ public partial interface IDictionaryOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNotProvidedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IInheritanceOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IInheritanceOperations.cs index ca331c53eea5..b3c00b65a9bd 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IInheritanceOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IInheritanceOperations.cs @@ -31,6 +31,12 @@ public partial interface IInheritanceOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types that extend others @@ -47,6 +53,12 @@ public partial interface IInheritanceOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidWithHttpMessagesAsync(Siamese complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPolymorphicrecursiveOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPolymorphicrecursiveOperations.cs index 67c94bdd1489..baee6e0c3796 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPolymorphicrecursiveOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPolymorphicrecursiveOperations.cs @@ -32,6 +32,12 @@ public partial interface IPolymorphicrecursiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types that are polymorphic and have recursive @@ -98,6 +104,12 @@ public partial interface IPolymorphicrecursiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidWithHttpMessagesAsync(Fish complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPolymorphismOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPolymorphismOperations.cs index 2371a49f7128..7a9dc2bc3de3 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPolymorphismOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPolymorphismOperations.cs @@ -31,6 +31,12 @@ public partial interface IPolymorphismOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types that are polymorphic @@ -77,6 +83,12 @@ public partial interface IPolymorphismOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidWithHttpMessagesAsync(Fish complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types that are polymorphic, attempting to omit @@ -118,6 +130,12 @@ public partial interface IPolymorphismOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidMissingRequiredWithHttpMessagesAsync(Fish complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPrimitiveOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPrimitiveOperations.cs index f9c86a8be31b..398cf074176f 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPrimitiveOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IPrimitiveOperations.cs @@ -31,6 +31,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetIntWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with integer properties @@ -44,6 +50,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutIntWithHttpMessagesAsync(IntWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with long properties @@ -54,6 +66,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetLongWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with long properties @@ -67,6 +85,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutLongWithHttpMessagesAsync(LongWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with float properties @@ -77,6 +101,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetFloatWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with float properties @@ -90,6 +120,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutFloatWithHttpMessagesAsync(FloatWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with double properties @@ -100,6 +136,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetDoubleWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with double properties @@ -114,6 +156,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDoubleWithHttpMessagesAsync(DoubleWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with bool properties @@ -124,6 +172,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetBoolWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with bool properties @@ -137,6 +191,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutBoolWithHttpMessagesAsync(BooleanWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with string properties @@ -147,6 +207,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with string properties @@ -160,6 +226,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutStringWithHttpMessagesAsync(StringWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with date properties @@ -170,6 +242,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetDateWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with date properties @@ -183,6 +261,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateWithHttpMessagesAsync(DateWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with datetime properties @@ -193,6 +277,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with datetime properties @@ -207,6 +297,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateTimeWithHttpMessagesAsync(DatetimeWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with datetimeRfc1123 properties @@ -217,6 +313,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetDateTimeRfc1123WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with datetimeRfc1123 properties @@ -231,6 +333,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateTimeRfc1123WithHttpMessagesAsync(Datetimerfc1123Wrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with duration properties @@ -241,6 +349,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetDurationWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with duration properties @@ -253,6 +367,9 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutDurationWithHttpMessagesAsync(TimeSpan? field = default(TimeSpan?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with byte properties @@ -263,6 +380,12 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetByteWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with byte properties @@ -275,6 +398,9 @@ public partial interface IPrimitiveOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutByteWithHttpMessagesAsync(byte[] field = default(byte[]), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IReadonlypropertyOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IReadonlypropertyOperations.cs index 3a1b9826f2b8..d4c4d96c9b1a 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IReadonlypropertyOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/IReadonlypropertyOperations.cs @@ -31,6 +31,12 @@ public partial interface IReadonlypropertyOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types that have readonly properties @@ -43,6 +49,12 @@ public partial interface IReadonlypropertyOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidWithHttpMessagesAsync(ReadonlyObj complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/InheritanceOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/InheritanceOperations.cs index 6fc88683f253..22d81a0f14e5 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/InheritanceOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/InheritanceOperations.cs @@ -35,6 +35,9 @@ internal partial class InheritanceOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal InheritanceOperations(AzureCompositeModel client) { if (client == null) @@ -58,6 +61,12 @@ internal InheritanceOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -210,6 +219,12 @@ internal InheritanceOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Cookiecuttershark.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Cookiecuttershark.cs index f3d6a1e98691..c0206fb9830b 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Cookiecuttershark.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Cookiecuttershark.cs @@ -33,8 +33,11 @@ public Cookiecuttershark() { } } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/ErrorException.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/ErrorException.cs index c8518921e398..5f1a3446f062 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Fish.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Fish.cs index a9fbaef02618..afa12f357b6f 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Fish.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Fish.cs @@ -49,8 +49,11 @@ public Fish() { } public IList Siblings { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (this.Siblings != null) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Goblinshark.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Goblinshark.cs index b7d197470e53..cd7247639bd6 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Goblinshark.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Goblinshark.cs @@ -39,8 +39,11 @@ public Goblinshark() { } public int? Jawsize { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Salmon.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Salmon.cs index 9baebb4eef5c..1f2e94ee78a9 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Salmon.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Salmon.cs @@ -45,8 +45,11 @@ public Salmon() { } public bool? Iswild { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Sawshark.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Sawshark.cs index d5640692dc4f..2ffd50fa2486 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Sawshark.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Sawshark.cs @@ -39,8 +39,11 @@ public Sawshark() { } public byte[] Picture { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Shark.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Shark.cs index 0339026294b1..d3a3b9adcdf8 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Shark.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/Models/Shark.cs @@ -45,8 +45,11 @@ public Shark() { } public DateTime Birthday { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PolymorphicrecursiveOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PolymorphicrecursiveOperations.cs index 62c2becc51e8..3a8ecdb59bf0 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PolymorphicrecursiveOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PolymorphicrecursiveOperations.cs @@ -35,6 +35,9 @@ internal partial class PolymorphicrecursiveOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal PolymorphicrecursiveOperations(AzureCompositeModel client) { if (client == null) @@ -58,6 +61,12 @@ internal PolymorphicrecursiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -259,6 +268,12 @@ internal PolymorphicrecursiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PolymorphismOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PolymorphismOperations.cs index e731fe36e914..5d9711d30718 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PolymorphismOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PolymorphismOperations.cs @@ -35,6 +35,9 @@ internal partial class PolymorphismOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal PolymorphismOperations(AzureCompositeModel client) { if (client == null) @@ -58,6 +61,12 @@ internal PolymorphismOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -240,6 +249,12 @@ internal PolymorphismOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -413,6 +428,12 @@ internal PolymorphismOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PrimitiveOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PrimitiveOperations.cs index 6e66f9fa3819..81b615179b4f 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PrimitiveOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/PrimitiveOperations.cs @@ -35,6 +35,9 @@ internal partial class PrimitiveOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal PrimitiveOperations(AzureCompositeModel client) { if (client == null) @@ -58,6 +61,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -207,6 +216,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -346,6 +361,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -495,6 +516,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -634,6 +661,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -783,6 +816,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -922,6 +961,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1072,6 +1117,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1211,6 +1262,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1360,6 +1417,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1499,6 +1562,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1648,6 +1717,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1787,6 +1862,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1936,6 +2017,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2075,6 +2162,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2224,6 +2317,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2363,6 +2462,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2513,6 +2618,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2652,6 +2763,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2800,6 +2917,9 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2937,6 +3057,12 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3085,6 +3211,9 @@ internal PrimitiveOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/ReadonlypropertyOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/ReadonlypropertyOperations.cs index 70e1a11d28b4..c1268dd5d1f0 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/ReadonlypropertyOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureCompositeModelClient/ReadonlypropertyOperations.cs @@ -35,6 +35,9 @@ internal partial class ReadonlypropertyOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal ReadonlypropertyOperations(AzureCompositeModel client) { if (client == null) @@ -58,6 +61,12 @@ internal ReadonlypropertyOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -206,6 +215,12 @@ internal ReadonlypropertyOperations(AzureCompositeModel client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/AutoRestParameterGroupingTestService.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/AutoRestParameterGroupingTestService.cs index 3718cd115c41..fac44181bfb4 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/AutoRestParameterGroupingTestService.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/AutoRestParameterGroupingTestService.cs @@ -106,6 +106,9 @@ protected AutoRestParameterGroupingTestService(HttpClientHandler rootHandler, pa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestParameterGroupingTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -127,6 +130,9 @@ protected AutoRestParameterGroupingTestService(Uri baseUri, params DelegatingHan /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestParameterGroupingTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -145,6 +151,9 @@ protected AutoRestParameterGroupingTestService(Uri baseUri, HttpClientHandler ro /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestParameterGroupingTestService(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -170,6 +179,9 @@ public AutoRestParameterGroupingTestService(ServiceClientCredentials credentials /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestParameterGroupingTestService(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -195,6 +207,9 @@ public AutoRestParameterGroupingTestService(ServiceClientCredentials credentials /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestParameterGroupingTestService(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -228,6 +243,9 @@ public AutoRestParameterGroupingTestService(Uri baseUri, ServiceClientCredential /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestParameterGroupingTestService(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/IParameterGroupingOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/IParameterGroupingOperations.cs index 830be66909d9..02fd256657a9 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/IParameterGroupingOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/IParameterGroupingOperations.cs @@ -34,6 +34,12 @@ public partial interface IParameterGroupingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PostRequiredWithHttpMessagesAsync(ParameterGroupingPostRequiredParameters parameterGroupingPostRequiredParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Post a bunch of optional parameters grouped @@ -47,6 +53,9 @@ public partial interface IParameterGroupingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalWithHttpMessagesAsync(ParameterGroupingPostOptionalParameters parameterGroupingPostOptionalParameters = default(ParameterGroupingPostOptionalParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Post parameters from multiple different parameter groups @@ -63,6 +72,9 @@ public partial interface IParameterGroupingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostMultiParamGroupsWithHttpMessagesAsync(FirstParameterGroup firstParameterGroup = default(FirstParameterGroup), ParameterGroupingPostMultiParamGroupsSecondParamGroup parameterGroupingPostMultiParamGroupsSecondParamGroup = default(ParameterGroupingPostMultiParamGroupsSecondParamGroup), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Post parameters with a shared parameter group object @@ -76,6 +88,9 @@ public partial interface IParameterGroupingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostSharedParameterGroupObjectWithHttpMessagesAsync(FirstParameterGroup firstParameterGroup = default(FirstParameterGroup), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/Models/ErrorException.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/Models/ErrorException.cs index 6c0fbb42ce98..5e000f571806 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/Models/ParameterGroupingPostRequiredParameters.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/Models/ParameterGroupingPostRequiredParameters.cs index 4251abe07005..784598b2cba0 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/Models/ParameterGroupingPostRequiredParameters.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/Models/ParameterGroupingPostRequiredParameters.cs @@ -62,8 +62,11 @@ public ParameterGroupingPostRequiredParameters() { } public string Path { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Path == null) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/ParameterGroupingOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/ParameterGroupingOperations.cs index 9a2bf74564ba..d18422da6227 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/ParameterGroupingOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/ParameterGroupingOperations.cs @@ -35,6 +35,9 @@ internal partial class ParameterGroupingOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal ParameterGroupingOperations(AutoRestParameterGroupingTestService client) { if (client == null) @@ -61,6 +64,12 @@ internal ParameterGroupingOperations(AutoRestParameterGroupingTestService client /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -240,6 +249,9 @@ internal ParameterGroupingOperations(AutoRestParameterGroupingTestService client /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -398,6 +410,9 @@ internal ParameterGroupingOperations(AutoRestParameterGroupingTestService client /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -577,6 +592,9 @@ internal ParameterGroupingOperations(AutoRestParameterGroupingTestService client /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureReport/AutoRestReportServiceForAzure.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureReport/AutoRestReportServiceForAzure.cs index 33e2a58ba125..9025219bc013 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureReport/AutoRestReportServiceForAzure.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureReport/AutoRestReportServiceForAzure.cs @@ -101,6 +101,9 @@ protected AutoRestReportServiceForAzure(HttpClientHandler rootHandler, params De /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestReportServiceForAzure(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -122,6 +125,9 @@ protected AutoRestReportServiceForAzure(Uri baseUri, params DelegatingHandler[] /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestReportServiceForAzure(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -140,6 +146,9 @@ protected AutoRestReportServiceForAzure(Uri baseUri, HttpClientHandler rootHandl /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestReportServiceForAzure(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -165,6 +174,9 @@ public AutoRestReportServiceForAzure(ServiceClientCredentials credentials, param /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestReportServiceForAzure(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -190,6 +202,9 @@ public AutoRestReportServiceForAzure(ServiceClientCredentials credentials, HttpC /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestReportServiceForAzure(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -223,6 +238,9 @@ public AutoRestReportServiceForAzure(Uri baseUri, ServiceClientCredentials crede /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestReportServiceForAzure(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -286,6 +304,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureReport/Models/ErrorException.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureReport/Models/ErrorException.cs index b9fd0f64fd98..dc7daa9679e9 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureReport/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureReport/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureResource/AutoRestResourceFlatteningTestService.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureResource/AutoRestResourceFlatteningTestService.cs index a922764f2b36..5e3a7c82bf01 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureResource/AutoRestResourceFlatteningTestService.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureResource/AutoRestResourceFlatteningTestService.cs @@ -101,6 +101,9 @@ protected AutoRestResourceFlatteningTestService(HttpClientHandler rootHandler, p /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestResourceFlatteningTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -122,6 +125,9 @@ protected AutoRestResourceFlatteningTestService(Uri baseUri, params DelegatingHa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestResourceFlatteningTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -140,6 +146,9 @@ protected AutoRestResourceFlatteningTestService(Uri baseUri, HttpClientHandler r /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestResourceFlatteningTestService(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -165,6 +174,9 @@ public AutoRestResourceFlatteningTestService(ServiceClientCredentials credential /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestResourceFlatteningTestService(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -190,6 +202,9 @@ public AutoRestResourceFlatteningTestService(ServiceClientCredentials credential /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestResourceFlatteningTestService(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -223,6 +238,9 @@ public AutoRestResourceFlatteningTestService(Uri baseUri, ServiceClientCredentia /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestResourceFlatteningTestService(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -291,6 +309,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -426,6 +447,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -575,6 +602,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -710,6 +740,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -859,6 +895,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -994,6 +1033,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureResource/Models/ErrorException.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureResource/Models/ErrorException.cs index 884ecc797e88..9c490064572d 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureResource/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureResource/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ApiVersionDefaultOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ApiVersionDefaultOperations.cs index 6cce0bb2e70f..5413bf1a854d 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ApiVersionDefaultOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ApiVersionDefaultOperations.cs @@ -35,6 +35,9 @@ internal partial class ApiVersionDefaultOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal ApiVersionDefaultOperations(AutoRestAzureSpecialParametersTestClient client) { if (client == null) @@ -58,6 +61,12 @@ internal ApiVersionDefaultOperations(AutoRestAzureSpecialParametersTestClient cl /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -194,6 +203,12 @@ internal ApiVersionDefaultOperations(AutoRestAzureSpecialParametersTestClient cl /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -330,6 +345,12 @@ internal ApiVersionDefaultOperations(AutoRestAzureSpecialParametersTestClient cl /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -466,6 +487,12 @@ internal ApiVersionDefaultOperations(AutoRestAzureSpecialParametersTestClient cl /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ApiVersionLocalOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ApiVersionLocalOperations.cs index cd2eb681847c..968cec9b6aa7 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ApiVersionLocalOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ApiVersionLocalOperations.cs @@ -35,6 +35,9 @@ internal partial class ApiVersionLocalOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal ApiVersionLocalOperations(AutoRestAzureSpecialParametersTestClient client) { if (client == null) @@ -59,6 +62,9 @@ internal ApiVersionLocalOperations(AutoRestAzureSpecialParametersTestClient clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -198,6 +204,9 @@ internal ApiVersionLocalOperations(AutoRestAzureSpecialParametersTestClient clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -332,6 +341,9 @@ internal ApiVersionLocalOperations(AutoRestAzureSpecialParametersTestClient clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -467,6 +479,9 @@ internal ApiVersionLocalOperations(AutoRestAzureSpecialParametersTestClient clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/AutoRestAzureSpecialParametersTestClient.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/AutoRestAzureSpecialParametersTestClient.cs index 1233eb14f6ab..d004c6aa329c 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/AutoRestAzureSpecialParametersTestClient.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/AutoRestAzureSpecialParametersTestClient.cs @@ -153,6 +153,9 @@ protected AutoRestAzureSpecialParametersTestClient(HttpClientHandler rootHandler /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestAzureSpecialParametersTestClient(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -174,6 +177,9 @@ protected AutoRestAzureSpecialParametersTestClient(Uri baseUri, params Delegatin /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestAzureSpecialParametersTestClient(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -192,6 +198,9 @@ protected AutoRestAzureSpecialParametersTestClient(Uri baseUri, HttpClientHandle /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestAzureSpecialParametersTestClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -217,6 +226,9 @@ public AutoRestAzureSpecialParametersTestClient(ServiceClientCredentials credent /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestAzureSpecialParametersTestClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -242,6 +254,9 @@ public AutoRestAzureSpecialParametersTestClient(ServiceClientCredentials credent /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestAzureSpecialParametersTestClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -275,6 +290,9 @@ public AutoRestAzureSpecialParametersTestClient(Uri baseUri, ServiceClientCreden /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestAzureSpecialParametersTestClient(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/HeaderOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/HeaderOperations.cs index af204f2adb0a..c229afd99c5a 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/HeaderOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/HeaderOperations.cs @@ -35,6 +35,9 @@ internal partial class HeaderOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal HeaderOperations(AutoRestAzureSpecialParametersTestClient client) { if (client == null) @@ -62,6 +65,12 @@ internal HeaderOperations(AutoRestAzureSpecialParametersTestClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IApiVersionDefaultOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IApiVersionDefaultOperations.cs index 2cfcf63f7040..14826d417f56 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IApiVersionDefaultOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IApiVersionDefaultOperations.cs @@ -31,6 +31,12 @@ public partial interface IApiVersionDefaultOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetMethodGlobalValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// GET method with api-version modeled in global settings. @@ -41,6 +47,12 @@ public partial interface IApiVersionDefaultOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetMethodGlobalNotProvidedValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// GET method with api-version modeled in global settings. @@ -51,6 +63,12 @@ public partial interface IApiVersionDefaultOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetPathGlobalValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// GET method with api-version modeled in global settings. @@ -61,6 +79,12 @@ public partial interface IApiVersionDefaultOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetSwaggerGlobalValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IApiVersionLocalOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IApiVersionLocalOperations.cs index 950ae85190b8..021034d0d363 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IApiVersionLocalOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IApiVersionLocalOperations.cs @@ -32,6 +32,9 @@ public partial interface IApiVersionLocalOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetMethodLocalValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get method with api-version modeled in the method. pass in @@ -47,6 +50,9 @@ public partial interface IApiVersionLocalOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetMethodLocalNullWithHttpMessagesAsync(string apiVersion = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get method with api-version modeled in the method. pass in @@ -58,6 +64,9 @@ public partial interface IApiVersionLocalOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetPathLocalValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get method with api-version modeled in the method. pass in @@ -69,6 +78,9 @@ public partial interface IApiVersionLocalOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetSwaggerLocalValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IHeaderOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IHeaderOperations.cs index 16a28b66f372..47e4df834179 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IHeaderOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IHeaderOperations.cs @@ -35,6 +35,12 @@ public partial interface IHeaderOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> CustomNamedRequestIdWithHttpMessagesAsync(string fooClientRequestId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IOdataOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IOdataOperations.cs index c2c0cb2ac7ef..94d12a5eed67 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IOdataOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IOdataOperations.cs @@ -36,6 +36,9 @@ public partial interface IOdataOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetWithFilterWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISkipUrlEncodingOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISkipUrlEncodingOperations.cs index f0b9fa7f4f0b..5c39da91bfb3 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISkipUrlEncodingOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISkipUrlEncodingOperations.cs @@ -35,6 +35,12 @@ public partial interface ISkipUrlEncodingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetMethodPathValidWithHttpMessagesAsync(string unencodedPathParam, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get method with unencoded path parameter with value @@ -49,6 +55,12 @@ public partial interface ISkipUrlEncodingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetPathPathValidWithHttpMessagesAsync(string unencodedPathParam, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get method with unencoded path parameter with value @@ -60,6 +72,9 @@ public partial interface ISkipUrlEncodingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetSwaggerPathValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get method with unencoded query parameter with value @@ -75,6 +90,12 @@ public partial interface ISkipUrlEncodingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetMethodQueryValidWithHttpMessagesAsync(string q1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get method with unencoded query parameter with value null @@ -88,6 +109,9 @@ public partial interface ISkipUrlEncodingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetMethodQueryNullWithHttpMessagesAsync(string q1 = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get method with unencoded query parameter with value @@ -103,6 +127,12 @@ public partial interface ISkipUrlEncodingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetPathQueryValidWithHttpMessagesAsync(string q1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get method with unencoded query parameter with value @@ -114,6 +144,9 @@ public partial interface ISkipUrlEncodingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetSwaggerQueryValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISubscriptionInCredentialsOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISubscriptionInCredentialsOperations.cs index fe5433508e02..eb30fb38bf51 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISubscriptionInCredentialsOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISubscriptionInCredentialsOperations.cs @@ -32,6 +32,12 @@ public partial interface ISubscriptionInCredentialsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PostMethodGlobalValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// POST method with subscriptionId modeled in credentials. Set the @@ -44,6 +50,12 @@ public partial interface ISubscriptionInCredentialsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PostMethodGlobalNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// POST method with subscriptionId modeled in credentials. Set the @@ -55,6 +67,12 @@ public partial interface ISubscriptionInCredentialsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PostMethodGlobalNotProvidedValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// POST method with subscriptionId modeled in credentials. Set the @@ -66,6 +84,12 @@ public partial interface ISubscriptionInCredentialsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PostPathGlobalValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// POST method with subscriptionId modeled in credentials. Set the @@ -77,6 +101,12 @@ public partial interface ISubscriptionInCredentialsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PostSwaggerGlobalValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISubscriptionInMethodOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISubscriptionInMethodOperations.cs index 7e428055d98b..814f3955bfe3 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISubscriptionInMethodOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/ISubscriptionInMethodOperations.cs @@ -36,6 +36,12 @@ public partial interface ISubscriptionInMethodOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PostMethodLocalValidWithHttpMessagesAsync(string subscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// POST method with subscriptionId modeled in the method. pass in @@ -52,6 +58,12 @@ public partial interface ISubscriptionInMethodOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PostMethodLocalNullWithHttpMessagesAsync(string subscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// POST method with subscriptionId modeled in the method. pass in @@ -67,6 +79,12 @@ public partial interface ISubscriptionInMethodOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PostPathLocalValidWithHttpMessagesAsync(string subscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// POST method with subscriptionId modeled in the method. pass in @@ -82,6 +100,12 @@ public partial interface ISubscriptionInMethodOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PostSwaggerLocalValidWithHttpMessagesAsync(string subscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IXMsClientRequestIdOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IXMsClientRequestIdOperations.cs index 7c602a46fa7a..7852d76f5918 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IXMsClientRequestIdOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/IXMsClientRequestIdOperations.cs @@ -32,6 +32,9 @@ public partial interface IXMsClientRequestIdOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get method that overwrites x-ms-client-request header with value @@ -47,6 +50,12 @@ public partial interface IXMsClientRequestIdOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamGetWithHttpMessagesAsync(string xMsClientRequestId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/Models/ErrorException.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/Models/ErrorException.cs index aa34c08ab823..ec95f83e0772 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/OdataOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/OdataOperations.cs index 53e34a7066cb..51edbb97a025 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/OdataOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/OdataOperations.cs @@ -36,6 +36,9 @@ internal partial class OdataOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal OdataOperations(AutoRestAzureSpecialParametersTestClient client) { if (client == null) @@ -63,6 +66,9 @@ internal OdataOperations(AutoRestAzureSpecialParametersTestClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SkipUrlEncodingOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SkipUrlEncodingOperations.cs index 17bae772f10e..0bf97f398000 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SkipUrlEncodingOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SkipUrlEncodingOperations.cs @@ -35,6 +35,9 @@ internal partial class SkipUrlEncodingOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal SkipUrlEncodingOperations(AutoRestAzureSpecialParametersTestClient client) { if (client == null) @@ -61,6 +64,12 @@ internal SkipUrlEncodingOperations(AutoRestAzureSpecialParametersTestClient clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -198,6 +207,12 @@ internal SkipUrlEncodingOperations(AutoRestAzureSpecialParametersTestClient clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -332,6 +347,9 @@ internal SkipUrlEncodingOperations(AutoRestAzureSpecialParametersTestClient clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -467,6 +485,12 @@ internal SkipUrlEncodingOperations(AutoRestAzureSpecialParametersTestClient clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -607,6 +631,9 @@ internal SkipUrlEncodingOperations(AutoRestAzureSpecialParametersTestClient clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -744,6 +771,12 @@ internal SkipUrlEncodingOperations(AutoRestAzureSpecialParametersTestClient clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -882,6 +915,9 @@ internal SkipUrlEncodingOperations(AutoRestAzureSpecialParametersTestClient clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SubscriptionInCredentialsOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SubscriptionInCredentialsOperations.cs index 52014796f712..df1fb0f9a817 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SubscriptionInCredentialsOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SubscriptionInCredentialsOperations.cs @@ -35,6 +35,9 @@ internal partial class SubscriptionInCredentialsOperations : IServiceOperations< /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal SubscriptionInCredentialsOperations(AutoRestAzureSpecialParametersTestClient client) { if (client == null) @@ -59,6 +62,12 @@ internal SubscriptionInCredentialsOperations(AutoRestAzureSpecialParametersTestC /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -194,6 +203,12 @@ internal SubscriptionInCredentialsOperations(AutoRestAzureSpecialParametersTestC /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -328,6 +343,12 @@ internal SubscriptionInCredentialsOperations(AutoRestAzureSpecialParametersTestC /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -470,6 +491,12 @@ internal SubscriptionInCredentialsOperations(AutoRestAzureSpecialParametersTestC /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -604,6 +631,12 @@ internal SubscriptionInCredentialsOperations(AutoRestAzureSpecialParametersTestC /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SubscriptionInMethodOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SubscriptionInMethodOperations.cs index 530fb69ef82a..4b69624b81d5 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SubscriptionInMethodOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/SubscriptionInMethodOperations.cs @@ -35,6 +35,9 @@ internal partial class SubscriptionInMethodOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal SubscriptionInMethodOperations(AutoRestAzureSpecialParametersTestClient client) { if (client == null) @@ -62,6 +65,12 @@ internal SubscriptionInMethodOperations(AutoRestAzureSpecialParametersTestClient /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -202,6 +211,12 @@ internal SubscriptionInMethodOperations(AutoRestAzureSpecialParametersTestClient /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -340,6 +355,12 @@ internal SubscriptionInMethodOperations(AutoRestAzureSpecialParametersTestClient /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -479,6 +500,12 @@ internal SubscriptionInMethodOperations(AutoRestAzureSpecialParametersTestClient /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/XMsClientRequestIdOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/XMsClientRequestIdOperations.cs index 21d646f64ebd..ed11a032ba67 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/XMsClientRequestIdOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/AzureSpecials/XMsClientRequestIdOperations.cs @@ -35,6 +35,9 @@ internal partial class XMsClientRequestIdOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal XMsClientRequestIdOperations(AutoRestAzureSpecialParametersTestClient client) { if (client == null) @@ -59,6 +62,9 @@ internal XMsClientRequestIdOperations(AutoRestAzureSpecialParametersTestClient c /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -184,6 +190,12 @@ internal XMsClientRequestIdOperations(AutoRestAzureSpecialParametersTestClient c /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/AutoRestParameterizedHostTestClient.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/AutoRestParameterizedHostTestClient.cs index 95ce1e052c8f..2dcce4d42397 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/AutoRestParameterizedHostTestClient.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/AutoRestParameterizedHostTestClient.cs @@ -111,6 +111,9 @@ protected AutoRestParameterizedHostTestClient(HttpClientHandler rootHandler, par /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestParameterizedHostTestClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -136,6 +139,9 @@ public AutoRestParameterizedHostTestClient(ServiceClientCredentials credentials, /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestParameterizedHostTestClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/IPathsOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/IPathsOperations.cs index e1b8d322156f..95baae82d6fa 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/IPathsOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/IPathsOperations.cs @@ -34,6 +34,12 @@ public partial interface IPathsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetEmptyWithHttpMessagesAsync(string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Models/ErrorException.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Models/ErrorException.cs index 893eab1d6d2f..9400192f7445 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/PathsOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/PathsOperations.cs index 9e96e286270a..9cc30c90a043 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/PathsOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/PathsOperations.cs @@ -35,6 +35,9 @@ internal partial class PathsOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal PathsOperations(AutoRestParameterizedHostTestClient client) { if (client == null) @@ -61,6 +64,12 @@ internal PathsOperations(AutoRestParameterizedHostTestClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/AutoRestHeadTestService.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/AutoRestHeadTestService.cs index c63f6633a36a..1cb027227a7c 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/AutoRestHeadTestService.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/AutoRestHeadTestService.cs @@ -105,6 +105,9 @@ protected AutoRestHeadTestService(HttpClientHandler rootHandler, params Delegati /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestHeadTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -126,6 +129,9 @@ protected AutoRestHeadTestService(Uri baseUri, params DelegatingHandler[] handle /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestHeadTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -144,6 +150,9 @@ protected AutoRestHeadTestService(Uri baseUri, HttpClientHandler rootHandler, pa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestHeadTestService(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -169,6 +178,9 @@ public AutoRestHeadTestService(ServiceClientCredentials credentials, params Dele /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestHeadTestService(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -194,6 +206,9 @@ public AutoRestHeadTestService(ServiceClientCredentials credentials, HttpClientH /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestHeadTestService(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -227,6 +242,9 @@ public AutoRestHeadTestService(Uri baseUri, ServiceClientCredentials credentials /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestHeadTestService(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/HttpSuccessOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/HttpSuccessOperations.cs index 978f893769cb..1b5b79d321f0 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/HttpSuccessOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/HttpSuccessOperations.cs @@ -34,6 +34,9 @@ internal partial class HttpSuccessOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal HttpSuccessOperations(AutoRestHeadTestService client) { if (client == null) @@ -57,6 +60,9 @@ internal HttpSuccessOperations(AutoRestHeadTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -191,6 +197,9 @@ internal HttpSuccessOperations(AutoRestHeadTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -325,6 +334,9 @@ internal HttpSuccessOperations(AutoRestHeadTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/IHttpSuccessOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/IHttpSuccessOperations.cs index e98b52834f97..d4ef39cec0e8 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/IHttpSuccessOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Head/IHttpSuccessOperations.cs @@ -30,6 +30,9 @@ public partial interface IHttpSuccessOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 204 status code if successful @@ -40,6 +43,9 @@ public partial interface IHttpSuccessOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head204WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 404 status code if successful @@ -50,6 +56,9 @@ public partial interface IHttpSuccessOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head404WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/AutoRestHeadExceptionTestService.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/AutoRestHeadExceptionTestService.cs index 7a36fd8570e2..8d6d1511f55e 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/AutoRestHeadExceptionTestService.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/AutoRestHeadExceptionTestService.cs @@ -105,6 +105,9 @@ protected AutoRestHeadExceptionTestService(HttpClientHandler rootHandler, params /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestHeadExceptionTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -126,6 +129,9 @@ protected AutoRestHeadExceptionTestService(Uri baseUri, params DelegatingHandler /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestHeadExceptionTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -144,6 +150,9 @@ protected AutoRestHeadExceptionTestService(Uri baseUri, HttpClientHandler rootHa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestHeadExceptionTestService(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -169,6 +178,9 @@ public AutoRestHeadExceptionTestService(ServiceClientCredentials credentials, pa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestHeadExceptionTestService(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -194,6 +206,9 @@ public AutoRestHeadExceptionTestService(ServiceClientCredentials credentials, Ht /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestHeadExceptionTestService(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -227,6 +242,9 @@ public AutoRestHeadExceptionTestService(Uri baseUri, ServiceClientCredentials cr /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestHeadExceptionTestService(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/HeadExceptionOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/HeadExceptionOperations.cs index 69948d4ae448..c84c4373993e 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/HeadExceptionOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/HeadExceptionOperations.cs @@ -34,6 +34,9 @@ internal partial class HeadExceptionOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal HeadExceptionOperations(AutoRestHeadExceptionTestService client) { if (client == null) @@ -57,6 +60,9 @@ internal HeadExceptionOperations(AutoRestHeadExceptionTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -177,6 +183,9 @@ internal HeadExceptionOperations(AutoRestHeadExceptionTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -297,6 +306,9 @@ internal HeadExceptionOperations(AutoRestHeadExceptionTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/IHeadExceptionOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/IHeadExceptionOperations.cs index 35417b0ce9ac..886e55fe022f 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/IHeadExceptionOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/IHeadExceptionOperations.cs @@ -30,6 +30,9 @@ public partial interface IHeadExceptionOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Head200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 204 status code if successful @@ -40,6 +43,9 @@ public partial interface IHeadExceptionOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Head204WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 404 status code if successful @@ -50,6 +56,9 @@ public partial interface IHeadExceptionOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Head404WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/AutoRestLongRunningOperationTestService.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/AutoRestLongRunningOperationTestService.cs index 55e90cd31881..52624e584826 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/AutoRestLongRunningOperationTestService.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/AutoRestLongRunningOperationTestService.cs @@ -121,6 +121,9 @@ protected AutoRestLongRunningOperationTestService(HttpClientHandler rootHandler, /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestLongRunningOperationTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -142,6 +145,9 @@ protected AutoRestLongRunningOperationTestService(Uri baseUri, params Delegating /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestLongRunningOperationTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -160,6 +166,9 @@ protected AutoRestLongRunningOperationTestService(Uri baseUri, HttpClientHandler /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestLongRunningOperationTestService(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -185,6 +194,9 @@ public AutoRestLongRunningOperationTestService(ServiceClientCredentials credenti /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestLongRunningOperationTestService(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -210,6 +222,9 @@ public AutoRestLongRunningOperationTestService(ServiceClientCredentials credenti /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestLongRunningOperationTestService(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -243,6 +258,9 @@ public AutoRestLongRunningOperationTestService(Uri baseUri, ServiceClientCredent /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestLongRunningOperationTestService(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILRORetrysOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILRORetrysOperations.cs index 99270b1a4468..59370d3e3ef1 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILRORetrysOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILRORetrysOperations.cs @@ -37,6 +37,12 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Put201CreatingSucceeded200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 500, then a 201 to the @@ -53,6 +59,12 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPut201CreatingSucceeded200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 500, then a 200 to the @@ -69,6 +81,12 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncRelativeRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 500, then a 200 to the @@ -85,6 +103,12 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncRelativeRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 500, then a 202 to @@ -98,6 +122,12 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> DeleteProvisioning202Accepted200SucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 500, then a 202 to @@ -111,6 +141,12 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginDeleteProvisioning202Accepted200SucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 500, then a 202 to @@ -123,6 +159,9 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Delete202Retry200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 500, then a 202 to @@ -135,6 +174,9 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDelete202Retry200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 500, then a 202 to @@ -147,6 +189,9 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteAsyncRelativeRetrySucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 500, then a 202 to @@ -159,6 +204,9 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteAsyncRelativeRetrySucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 500, then a 202 to @@ -174,6 +222,9 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post202Retry200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 500, then a 202 to @@ -189,6 +240,9 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPost202Retry200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 500, then a 202 to @@ -205,6 +259,9 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostAsyncRelativeRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 500, then a 202 to @@ -221,6 +278,9 @@ public partial interface ILRORetrysOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPostAsyncRelativeRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROSADsOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROSADsOperations.cs index 5717f7f8f64e..e75f4eca280f 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROSADsOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROSADsOperations.cs @@ -35,6 +35,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutNonRetry400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 400 to the initial @@ -49,6 +55,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutNonRetry400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a Product with @@ -63,6 +75,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutNonRetry201Creating400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a Product with @@ -77,6 +95,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutNonRetry201Creating400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a Product with @@ -91,6 +115,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutNonRetry201Creating400InvalidJsonWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a Product with @@ -105,6 +135,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutNonRetry201Creating400InvalidJsonWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 with @@ -120,6 +156,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncRelativeRetry400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 with @@ -135,6 +177,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncRelativeRetry400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 400 with an error @@ -146,6 +194,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteNonRetry400WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 400 with an error @@ -157,6 +208,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteNonRetry400WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 with a location @@ -168,6 +222,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Delete202NonRetry400WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 with a location @@ -179,6 +236,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDelete202NonRetry400WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -191,6 +251,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteAsyncRelativeRetry400WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -203,6 +266,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteAsyncRelativeRetry400WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 400 with no error body @@ -216,6 +282,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostNonRetry400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 400 with no error body @@ -229,6 +298,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPostNonRetry400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 with a location @@ -243,6 +315,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post202NonRetry400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 with a location @@ -257,6 +332,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPost202NonRetry400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -272,6 +350,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostAsyncRelativeRetry400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -287,6 +368,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPostAsyncRelativeRetry400WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 201 to the initial @@ -301,6 +385,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutError201NoProvisioningStatePayloadWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 201 to the initial @@ -315,6 +405,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutError201NoProvisioningStatePayloadWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -331,6 +427,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncRelativeRetryNoStatusWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -347,6 +449,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncRelativeRetryNoStatusWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -363,6 +471,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncRelativeRetryNoStatusPayloadWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -379,6 +493,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncRelativeRetryNoStatusPayloadWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 204 to the initial @@ -390,6 +510,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Delete204SucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 204 to the initial @@ -401,6 +524,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task BeginDelete204SucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -413,6 +539,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteAsyncRelativeRetryNoStatusWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -425,6 +554,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteAsyncRelativeRetryNoStatusWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -439,6 +571,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post202NoLocationWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -453,6 +588,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPost202NoLocationWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -469,6 +607,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostAsyncRelativeRetryNoPayloadWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -485,6 +626,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPostAsyncRelativeRetryNoPayloadWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -499,6 +643,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Put200InvalidJsonWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -513,6 +663,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPut200InvalidJsonWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -529,6 +685,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncRelativeRetryInvalidHeaderWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -545,6 +707,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncRelativeRetryInvalidHeaderWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -561,6 +729,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncRelativeRetryInvalidJsonPollingWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -577,6 +751,12 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncRelativeRetryInvalidJsonPollingWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -589,6 +769,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Delete202RetryInvalidHeaderWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -601,6 +784,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDelete202RetryInvalidHeaderWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -613,6 +799,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteAsyncRelativeRetryInvalidHeaderWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -625,6 +814,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteAsyncRelativeRetryInvalidHeaderWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -637,6 +829,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteAsyncRelativeRetryInvalidJsonPollingWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -649,6 +844,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteAsyncRelativeRetryInvalidJsonPollingWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -663,6 +861,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post202RetryInvalidHeaderWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -677,6 +878,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPost202RetryInvalidHeaderWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -693,6 +897,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostAsyncRelativeRetryInvalidHeaderWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -709,6 +916,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPostAsyncRelativeRetryInvalidHeaderWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -725,6 +935,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostAsyncRelativeRetryInvalidJsonPollingWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -741,6 +954,9 @@ public partial interface ILROSADsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPostAsyncRelativeRetryInvalidJsonPollingWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROsCustomHeaderOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROsCustomHeaderOperations.cs index c39352b0957b..9df984b4340e 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROsCustomHeaderOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROsCustomHeaderOperations.cs @@ -39,6 +39,12 @@ public partial interface ILROsCustomHeaderOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is @@ -57,6 +63,12 @@ public partial interface ILROsCustomHeaderOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is @@ -75,6 +87,12 @@ public partial interface ILROsCustomHeaderOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Put201CreatingSucceeded200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is @@ -93,6 +111,12 @@ public partial interface ILROsCustomHeaderOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPut201CreatingSucceeded200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is @@ -110,6 +134,9 @@ public partial interface ILROsCustomHeaderOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post202Retry200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is @@ -127,6 +154,9 @@ public partial interface ILROsCustomHeaderOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPost202Retry200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is @@ -145,6 +175,9 @@ public partial interface ILROsCustomHeaderOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostAsyncRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is @@ -163,6 +196,9 @@ public partial interface ILROsCustomHeaderOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPostAsyncRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROsOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROsOperations.cs index 7bd37478bd6f..b35e15e9cbd1 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROsOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/ILROsOperations.cs @@ -36,6 +36,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Put200SucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -51,6 +57,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPut200SucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -66,6 +78,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Put200SucceededNoStateWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -81,6 +99,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPut200SucceededNoStateWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 202 to the initial @@ -97,6 +121,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Put202Retry200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 202 to the initial @@ -113,6 +143,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPut202Retry200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 201 to the initial @@ -129,6 +165,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Put201CreatingSucceeded200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 201 to the initial @@ -145,6 +187,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPut201CreatingSucceeded200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 201 to the initial @@ -161,6 +209,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Put200UpdatingSucceeded204WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 201 to the initial @@ -177,6 +231,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPut200UpdatingSucceeded204WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 201 to the initial @@ -193,6 +253,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Put201CreatingFailed200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 201 to the initial @@ -209,6 +275,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPut201CreatingFailed200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 201 to the initial @@ -225,6 +297,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Put200Acceptedcanceled200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 201 to the initial @@ -241,6 +319,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPut200Acceptedcanceled200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 202 to the initial @@ -256,6 +340,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutNoHeaderInRetryWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 202 to the initial @@ -271,6 +361,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutNoHeaderInRetryWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -287,6 +383,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -303,6 +405,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -319,6 +427,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncNoRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -335,6 +449,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncNoRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -351,6 +471,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncRetryFailedWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -367,6 +493,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncRetryFailedWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -383,6 +515,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncNoRetrycanceledWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 200 to the initial @@ -399,6 +537,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncNoRetrycanceledWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 202 to the initial @@ -414,6 +558,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncNoHeaderInRetryWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request, service returns a 202 to the initial @@ -429,6 +579,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncNoHeaderInRetryWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request with non resource. @@ -442,6 +598,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutNonResourceWithHttpMessagesAsync(Sku sku = default(Sku), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request with non resource. @@ -455,6 +617,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutNonResourceWithHttpMessagesAsync(Sku sku = default(Sku), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request with non resource. @@ -468,6 +636,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncNonResourceWithHttpMessagesAsync(Sku sku = default(Sku), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request with non resource. @@ -481,6 +655,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncNonResourceWithHttpMessagesAsync(Sku sku = default(Sku), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request with sub resource. @@ -494,6 +674,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutSubResourceWithHttpMessagesAsync(SubProduct product = default(SubProduct), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request with sub resource. @@ -507,6 +693,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutSubResourceWithHttpMessagesAsync(SubProduct product = default(SubProduct), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request with sub resource. @@ -520,6 +712,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PutAsyncSubResourceWithHttpMessagesAsync(SubProduct product = default(SubProduct), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running put request with sub resource. @@ -533,6 +731,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPutAsyncSubResourceWithHttpMessagesAsync(SubProduct product = default(SubProduct), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -546,6 +750,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> DeleteProvisioning202Accepted200SucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -559,6 +769,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginDeleteProvisioning202Accepted200SucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -572,6 +788,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> DeleteProvisioning202DeletingFailed200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -585,6 +807,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginDeleteProvisioning202DeletingFailed200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -598,6 +826,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> DeleteProvisioning202Deletingcanceled200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -611,6 +845,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginDeleteProvisioning202Deletingcanceled200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete succeeds and returns right away @@ -621,6 +861,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Delete204SucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete succeeds and returns right away @@ -631,6 +874,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task BeginDelete204SucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -643,6 +889,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Delete202Retry200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -655,6 +907,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginDelete202Retry200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -667,6 +925,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Delete202NoRetry204WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -679,6 +943,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginDelete202NoRetry204WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a location header in @@ -691,6 +961,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteNoHeaderInRetryWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a location header in @@ -703,6 +976,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteNoHeaderInRetryWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns an @@ -716,6 +992,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteAsyncNoHeaderInRetryWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns an @@ -729,6 +1008,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteAsyncNoHeaderInRetryWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -741,6 +1023,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteAsyncRetrySucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -753,6 +1038,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteAsyncRetrySucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -765,6 +1053,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteAsyncNoRetrySucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -777,6 +1068,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteAsyncNoRetrySucceededWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -789,6 +1083,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteAsyncRetryFailedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -801,6 +1098,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteAsyncRetryFailedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -813,6 +1113,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> DeleteAsyncRetrycanceledWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running delete request, service returns a 202 to the initial @@ -825,6 +1128,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginDeleteAsyncRetrycanceledWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -837,6 +1143,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Post200WithPayloadWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -849,6 +1161,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPost200WithPayloadWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -864,6 +1182,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post202Retry200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -879,6 +1200,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPost202Retry200WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -894,6 +1218,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Post202NoRetry204WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -909,6 +1239,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPost202NoRetry204WithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -925,6 +1261,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PostAsyncRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -941,6 +1283,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPostAsyncRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -957,6 +1305,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> PostAsyncNoRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -973,6 +1327,12 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> BeginPostAsyncNoRetrySucceededWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -989,6 +1349,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostAsyncRetryFailedWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -1005,6 +1368,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPostAsyncRetryFailedWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -1021,6 +1387,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostAsyncRetrycanceledWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Long running post request, service returns a 202 to the initial @@ -1037,6 +1406,9 @@ public partial interface ILROsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> BeginPostAsyncRetrycanceledWithHttpMessagesAsync(Product product = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LRORetrysOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LRORetrysOperations.cs index 9ed93a653fb5..cd5237b59857 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LRORetrysOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LRORetrysOperations.cs @@ -35,6 +35,9 @@ internal partial class LRORetrysOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal LRORetrysOperations(AutoRestLongRunningOperationTestService client) { if (client == null) @@ -89,6 +92,12 @@ internal LRORetrysOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -296,6 +305,12 @@ internal LRORetrysOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -490,6 +505,12 @@ internal LRORetrysOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -693,6 +714,9 @@ internal LRORetrysOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -860,6 +884,9 @@ internal LRORetrysOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1033,6 +1060,9 @@ internal LRORetrysOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1215,6 +1245,9 @@ internal LRORetrysOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROSADsOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROSADsOperations.cs index cbd54f78112a..fc1327a50f2e 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROSADsOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROSADsOperations.cs @@ -35,6 +35,9 @@ internal partial class LROSADsOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal LROSADsOperations(AutoRestLongRunningOperationTestService client) { if (client == null) @@ -83,6 +86,12 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -286,6 +295,12 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -489,6 +504,12 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -694,6 +715,12 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -882,6 +909,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1045,6 +1075,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1212,6 +1245,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1381,6 +1417,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1557,6 +1596,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1737,6 +1779,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1917,6 +1962,12 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2122,6 +2173,12 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2322,6 +2379,12 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2512,6 +2575,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2666,6 +2732,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2837,6 +2906,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3017,6 +3089,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3197,6 +3272,12 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3384,6 +3465,12 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3584,6 +3671,12 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3774,6 +3867,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3939,6 +4035,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -4106,6 +4205,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -4277,6 +4379,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -4457,6 +4562,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -4637,6 +4745,9 @@ internal LROSADsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROsCustomHeaderOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROsCustomHeaderOperations.cs index a6475eba268d..24b9e0786afc 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROsCustomHeaderOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROsCustomHeaderOperations.cs @@ -35,6 +35,9 @@ internal partial class LROsCustomHeaderOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal LROsCustomHeaderOperations(AutoRestLongRunningOperationTestService client) { if (client == null) @@ -91,6 +94,12 @@ internal LROsCustomHeaderOperations(AutoRestLongRunningOperationTestService clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -295,6 +304,12 @@ internal LROsCustomHeaderOperations(AutoRestLongRunningOperationTestService clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -500,6 +515,9 @@ internal LROsCustomHeaderOperations(AutoRestLongRunningOperationTestService clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -684,6 +702,9 @@ internal LROsCustomHeaderOperations(AutoRestLongRunningOperationTestService clie /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROsOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROsOperations.cs index b518b2963bc7..fb6d0139d6a1 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROsOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Lro/LROsOperations.cs @@ -35,6 +35,9 @@ internal partial class LROsOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal LROsOperations(AutoRestLongRunningOperationTestService client) { if (client == null) @@ -85,6 +88,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -270,6 +279,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -457,6 +472,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -646,6 +667,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -853,6 +880,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1042,6 +1075,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1249,6 +1288,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1436,6 +1481,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1636,6 +1687,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1836,6 +1893,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2036,6 +2099,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2236,6 +2305,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2436,6 +2511,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2632,6 +2713,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2815,6 +2902,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2998,6 +3091,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3181,6 +3280,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3362,6 +3467,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3567,6 +3678,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3772,6 +3889,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3971,6 +4094,9 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -4125,6 +4251,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4310,6 +4442,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4495,6 +4633,9 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -4662,6 +4803,9 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -4829,6 +4973,9 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -4996,6 +5143,9 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -5163,6 +5313,9 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -5330,6 +5483,9 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -5497,6 +5653,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5693,6 +5855,9 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -5871,6 +6036,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6069,6 +6240,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6267,6 +6444,12 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6465,6 +6648,9 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -6645,6 +6831,9 @@ internal LROsOperations(AutoRestLongRunningOperationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/AutoRestPagingTestService.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/AutoRestPagingTestService.cs index d57bdc0d3e69..96e491913b22 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/AutoRestPagingTestService.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/AutoRestPagingTestService.cs @@ -106,6 +106,9 @@ protected AutoRestPagingTestService(HttpClientHandler rootHandler, params Delega /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestPagingTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -127,6 +130,9 @@ protected AutoRestPagingTestService(Uri baseUri, params DelegatingHandler[] hand /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected AutoRestPagingTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -145,6 +151,9 @@ protected AutoRestPagingTestService(Uri baseUri, HttpClientHandler rootHandler, /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestPagingTestService(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -170,6 +179,9 @@ public AutoRestPagingTestService(ServiceClientCredentials credentials, params De /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestPagingTestService(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -195,6 +207,9 @@ public AutoRestPagingTestService(ServiceClientCredentials credentials, HttpClien /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestPagingTestService(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -228,6 +243,9 @@ public AutoRestPagingTestService(Uri baseUri, ServiceClientCredentials credentia /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestPagingTestService(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/IPagingOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/IPagingOperations.cs index c21b77474414..eda3c26bb239 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/IPagingOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/IPagingOperations.cs @@ -32,6 +32,12 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetSinglePagesWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that includes a nextLink that has 10 pages @@ -47,6 +53,12 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetMultiplePagesWithHttpMessagesAsync(string clientRequestId = default(string), PagingGetMultiplePagesOptions pagingGetMultiplePagesOptions = default(PagingGetMultiplePagesOptions), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that includes a nextLink that has 10 pages @@ -62,6 +74,15 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> GetMultiplePagesWithOffsetWithHttpMessagesAsync(PagingGetMultiplePagesWithOffsetOptions pagingGetMultiplePagesWithOffsetOptions, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that fails on the first call with 500 and then @@ -74,6 +95,12 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetMultiplePagesRetryFirstWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that includes a nextLink that has 10 pages, of @@ -86,6 +113,12 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetMultiplePagesRetrySecondWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that receives a 400 on the first call @@ -96,6 +129,12 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetSinglePagesFailureWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that receives a 400 on the second call @@ -106,6 +145,12 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetMultiplePagesFailureWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that receives an invalid nextLink @@ -116,6 +161,12 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetMultiplePagesFailureUriWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that finishes on the first call without a @@ -130,6 +181,15 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> GetSinglePagesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that includes a nextLink that has 10 pages @@ -148,6 +208,15 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> GetMultiplePagesNextWithHttpMessagesAsync(string nextPageLink, string clientRequestId = default(string), PagingGetMultiplePagesOptions pagingGetMultiplePagesOptions = default(PagingGetMultiplePagesOptions), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that includes a nextLink that has 10 pages @@ -166,6 +235,15 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> GetMultiplePagesWithOffsetNextWithHttpMessagesAsync(string nextPageLink, string clientRequestId = default(string), PagingGetMultiplePagesWithOffsetNextOptions pagingGetMultiplePagesWithOffsetNextOptions = default(PagingGetMultiplePagesWithOffsetNextOptions), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that fails on the first call with 500 and then @@ -181,6 +259,15 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> GetMultiplePagesRetryFirstNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that includes a nextLink that has 10 pages, of @@ -196,6 +283,15 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> GetMultiplePagesRetrySecondNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that receives a 400 on the first call @@ -209,6 +305,15 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> GetSinglePagesFailureNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that receives a 400 on the second call @@ -222,6 +327,15 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> GetMultiplePagesFailureNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// A paging operation that receives an invalid nextLink @@ -235,6 +349,15 @@ public partial interface IPagingOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> GetMultiplePagesFailureUriNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/Models/PagingGetMultiplePagesWithOffsetOptions.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/Models/PagingGetMultiplePagesWithOffsetOptions.cs index 076d5bf8587b..5b2b41f863ef 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/Models/PagingGetMultiplePagesWithOffsetOptions.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/Models/PagingGetMultiplePagesWithOffsetOptions.cs @@ -60,8 +60,11 @@ public PagingGetMultiplePagesWithOffsetOptions() { } public int? Timeout { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { //Nothing to validate diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/PagingOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/PagingOperations.cs index 3d47e54f931b..083ba13c534c 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/PagingOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/PagingOperations.cs @@ -35,6 +35,9 @@ internal partial class PagingOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal PagingOperations(AutoRestPagingTestService client) { if (client == null) @@ -58,6 +61,12 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -214,6 +223,12 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -407,6 +422,15 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -611,6 +635,12 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -764,6 +794,12 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -915,6 +951,12 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1066,6 +1108,12 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1217,6 +1265,12 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1371,6 +1425,15 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1535,6 +1598,15 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1736,6 +1808,15 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1933,6 +2014,15 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2094,6 +2184,15 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2253,6 +2352,15 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2412,6 +2520,15 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2571,6 +2688,15 @@ internal PagingOperations(AutoRestPagingTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/GroupOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/GroupOperations.cs index 53bf02eac323..ed9660f30dc3 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/GroupOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/GroupOperations.cs @@ -35,6 +35,9 @@ internal partial class GroupOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal GroupOperations(MicrosoftAzureTestUrl client) { if (client == null) @@ -61,6 +64,15 @@ internal GroupOperations(MicrosoftAzureTestUrl client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/IGroupOperations.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/IGroupOperations.cs index e6eb8c8964f7..613aa260fad8 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/IGroupOperations.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/IGroupOperations.cs @@ -35,6 +35,15 @@ public partial interface IGroupOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task> GetSampleResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/MicrosoftAzureTestUrl.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/MicrosoftAzureTestUrl.cs index c23f24cda022..deead47817e8 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/MicrosoftAzureTestUrl.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/MicrosoftAzureTestUrl.cs @@ -116,6 +116,9 @@ protected MicrosoftAzureTestUrl(HttpClientHandler rootHandler, params Delegating /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected MicrosoftAzureTestUrl(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -137,6 +140,9 @@ protected MicrosoftAzureTestUrl(Uri baseUri, params DelegatingHandler[] handlers /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected MicrosoftAzureTestUrl(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -155,6 +161,9 @@ protected MicrosoftAzureTestUrl(Uri baseUri, HttpClientHandler rootHandler, para /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public MicrosoftAzureTestUrl(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -180,6 +189,9 @@ public MicrosoftAzureTestUrl(ServiceClientCredentials credentials, params Delega /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public MicrosoftAzureTestUrl(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -205,6 +217,9 @@ public MicrosoftAzureTestUrl(ServiceClientCredentials credentials, HttpClientHan /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public MicrosoftAzureTestUrl(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -238,6 +253,9 @@ public MicrosoftAzureTestUrl(Uri baseUri, ServiceClientCredentials credentials, /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public MicrosoftAzureTestUrl(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/Models/ErrorException.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/Models/ErrorException.cs index 5883ef1e1329..176abb3361fe 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/Azure.CSharp/Templates/AzureMethodGroupTemplate.cshtml b/AutoRest/Generators/CSharp/Azure.CSharp/Templates/AzureMethodGroupTemplate.cshtml index 38fad53dc3db..e3896064da82 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp/Templates/AzureMethodGroupTemplate.cshtml +++ b/AutoRest/Generators/CSharp/Azure.CSharp/Templates/AzureMethodGroupTemplate.cshtml @@ -35,6 +35,9 @@ namespace @Settings.Namespace /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal @(Model.MethodGroupType)(@(Model.Name) client) { if (client == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/Array.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/Array.cs index 3812833eacaa..628ab0e8207a 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/Array.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/Array.cs @@ -34,6 +34,9 @@ public partial class Array : IServiceOperations, /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Array(AutoRestSwaggerBATArrayService client) { if (client == null) @@ -57,6 +60,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -176,6 +185,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -295,6 +310,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -416,6 +437,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -528,6 +555,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -649,6 +682,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -761,6 +800,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -880,6 +925,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -999,6 +1050,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1120,6 +1177,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1232,6 +1295,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1351,6 +1420,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1470,6 +1545,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1591,6 +1672,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1703,6 +1790,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1822,6 +1915,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1941,6 +2040,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2062,6 +2167,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2174,6 +2285,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2293,6 +2410,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2412,6 +2535,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2533,6 +2662,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2645,6 +2780,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2764,6 +2905,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2883,6 +3030,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3004,6 +3157,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3116,6 +3275,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3235,6 +3400,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3356,6 +3527,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3479,6 +3656,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3591,6 +3774,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3710,6 +3899,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3831,6 +4026,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3943,6 +4144,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4062,6 +4269,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4182,6 +4395,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4304,6 +4523,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -4416,6 +4641,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4535,6 +4766,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4655,6 +4892,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4777,6 +5020,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -4889,6 +5138,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5010,6 +5265,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -5123,6 +5384,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5245,6 +5512,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -5358,6 +5631,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5478,6 +5757,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5597,6 +5882,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5716,6 +6007,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5836,6 +6133,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5956,6 +6259,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6076,6 +6385,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6198,6 +6513,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -6310,6 +6631,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6429,6 +6756,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6548,6 +6881,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6667,6 +7006,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6787,6 +7132,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6909,6 +7260,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -7021,6 +7378,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -7140,6 +7503,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -7261,6 +7630,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -7382,6 +7757,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -7503,6 +7884,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -7626,6 +8013,12 @@ public Array(AutoRestSwaggerBATArrayService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/AutoRestSwaggerBATArrayService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/AutoRestSwaggerBATArrayService.cs index a23114fb154c..eab5656958d4 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/AutoRestSwaggerBATArrayService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/AutoRestSwaggerBATArrayService.cs @@ -83,6 +83,9 @@ public AutoRestSwaggerBATArrayService(HttpClientHandler rootHandler, params Dele /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATArrayService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestSwaggerBATArrayService(Uri baseUri, params DelegatingHandler[] ha /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATArrayService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/IArray.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/IArray.cs index 65f46721b926..10614c39762b 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/IArray.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/IArray.cs @@ -30,6 +30,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid array [1, 2, 3 @@ -40,6 +46,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get empty array value [] @@ -50,6 +62,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value empty [] @@ -62,6 +80,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutEmptyWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get boolean array value [true, false, false, true] @@ -72,6 +96,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetBooleanTfftWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value empty [true, false, false, true] @@ -84,6 +114,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutBooleanTfftWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get boolean array value [true, null, false] @@ -94,6 +130,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetBooleanInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get boolean array value [true, 'boolean', false] @@ -104,6 +146,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetBooleanInvalidStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get integer array value [1, -1, 3, 300] @@ -114,6 +162,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetIntegerValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value empty [1, -1, 3, 300] @@ -126,6 +180,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutIntegerValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get integer array value [1, null, 0] @@ -136,6 +196,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetIntInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get integer array value [1, 'integer', 0] @@ -146,6 +212,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetIntInvalidStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get integer array value [1, -1, 3, 300] @@ -156,6 +228,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetLongValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value empty [1, -1, 3, 300] @@ -168,6 +246,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutLongValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get long array value [1, null, 0] @@ -178,6 +262,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetLongInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get long array value [1, 'integer', 0] @@ -188,6 +278,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetLongInvalidStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get float array value [0, -0.01, 1.2e20] @@ -198,6 +294,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetFloatValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value [0, -0.01, 1.2e20] @@ -210,6 +312,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutFloatValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get float array value [0.0, null, -1.2e20] @@ -220,6 +328,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetFloatInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get boolean array value [1.0, 'number', 0.0] @@ -230,6 +344,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetFloatInvalidStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get float array value [0, -0.01, 1.2e20] @@ -240,6 +360,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDoubleValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value [0, -0.01, 1.2e20] @@ -252,6 +378,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDoubleValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get float array value [0.0, null, -1.2e20] @@ -262,6 +394,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDoubleInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get boolean array value [1.0, 'number', 0.0] @@ -272,6 +410,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDoubleInvalidStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get string array value ['foo1', 'foo2', 'foo3'] @@ -282,6 +426,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetStringValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value ['foo1', 'foo2', 'foo3'] @@ -294,6 +444,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutStringValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get string array value ['foo', null, 'foo2'] @@ -304,6 +460,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetStringWithNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get string array value ['foo', 123, 'foo2'] @@ -314,6 +476,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetStringWithInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get uuid array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', @@ -326,6 +494,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetUuidValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', @@ -340,6 +514,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutUuidValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get uuid array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', @@ -351,6 +531,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetUuidInvalidCharsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get integer array value ['2000-12-01', '1980-01-02', '1492-10-12'] @@ -361,6 +547,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value ['2000-12-01', '1980-01-02', '1492-10-12'] @@ -373,6 +565,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date array value ['2012-01-01', null, '1776-07-04'] @@ -383,6 +581,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date array value ['2011-03-22', 'date'] @@ -393,6 +597,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateInvalidCharsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date-time array value ['2000-12-01t00:00:01z', @@ -404,6 +614,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateTimeValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value ['2000-12-01t00:00:01z', @@ -417,6 +633,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateTimeValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date array value ['2000-12-01t00:00:01z', null] @@ -427,6 +649,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateTimeInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date array value ['2000-12-01t00:00:01z', 'date-time'] @@ -437,6 +665,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateTimeInvalidCharsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date-time array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, @@ -448,6 +682,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateTimeRfc1123ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan @@ -461,6 +701,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateTimeRfc1123ValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get duration array value ['P123DT22H14M12.011S', 'P5DT1H0M0S'] @@ -471,6 +717,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDurationValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S'] @@ -483,6 +735,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDurationValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get byte array value [hex(FF FF FF FA), hex(01 02 03), hex (25, @@ -494,6 +752,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetByteValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, @@ -507,6 +771,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutByteValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get byte array value [hex(AB, AC, AD), null] with the first item @@ -518,6 +788,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetByteInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get array value ['a string that gets encoded with base64url', @@ -529,6 +805,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetBase64UrlWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get array of complex type null value @@ -539,6 +821,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetComplexNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get empty array of complex type [] @@ -549,6 +837,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetComplexEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get array of complex type with null item [{'integer': 1 'string': @@ -560,6 +854,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetComplexItemNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get array of complex type with empty item [{'integer': 1 'string': @@ -571,6 +871,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetComplexItemEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get array of complex type with [{'integer': 1 'string': '2'}, @@ -582,6 +888,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetComplexValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put an array of complex type with values [{'integer': 1 'string': @@ -596,6 +908,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutComplexValidWithHttpMessagesAsync(IList arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a null array @@ -606,6 +924,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetArrayNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an empty array [] @@ -616,6 +940,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetArrayEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of array of strings [['1', '2', '3'], null, ['7', @@ -627,6 +957,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetArrayItemNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of array of strings [['1', '2', '3'], [], ['7', '8', @@ -638,6 +974,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetArrayItemEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of array of strings [['1', '2', '3'], ['4', '5', @@ -649,6 +991,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetArrayValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put An array of array of strings [['1', '2', '3'], ['4', '5', @@ -662,6 +1010,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutArrayValidWithHttpMessagesAsync(IList> arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of Dictionaries with value null @@ -672,6 +1026,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetDictionaryNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of Dictionaries of type <string, string> with @@ -683,6 +1043,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetDictionaryEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of Dictionaries of type <string, string> with @@ -695,6 +1061,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetDictionaryItemNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of Dictionaries of type <string, string> with @@ -707,6 +1079,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetDictionaryItemEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of Dictionaries of type <string, string> with @@ -719,6 +1097,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetDictionaryValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of Dictionaries of type <string, string> with @@ -733,6 +1117,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDictionaryValidWithHttpMessagesAsync(IList> arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/Models/ErrorException.cs index 096a94320b52..bef3eca83819 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyArray/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/AutoRestBoolTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/AutoRestBoolTestService.cs index ceefbc97643f..e4ca38e8f210 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/AutoRestBoolTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/AutoRestBoolTestService.cs @@ -83,6 +83,9 @@ public AutoRestBoolTestService(HttpClientHandler rootHandler, params DelegatingH /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestBoolTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestBoolTestService(Uri baseUri, params DelegatingHandler[] handlers) /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestBoolTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/BoolModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/BoolModel.cs index d287e6188c54..c73e88f6c83b 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/BoolModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/BoolModel.cs @@ -34,6 +34,9 @@ public partial class BoolModel : IServiceOperations, IB /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public BoolModel(AutoRestBoolTestService client) { if (client == null) @@ -57,6 +60,12 @@ public BoolModel(AutoRestBoolTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -178,6 +187,9 @@ public BoolModel(AutoRestBoolTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -283,6 +295,12 @@ public BoolModel(AutoRestBoolTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -404,6 +422,9 @@ public BoolModel(AutoRestBoolTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -509,6 +530,12 @@ public BoolModel(AutoRestBoolTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -628,6 +655,12 @@ public BoolModel(AutoRestBoolTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/IBoolModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/IBoolModel.cs index 04a7fb6b4998..3d1ea9aebcb4 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/IBoolModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/IBoolModel.cs @@ -30,6 +30,12 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetTrueWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set Boolean value true @@ -42,6 +48,9 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutTrueWithHttpMessagesAsync(bool boolBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get false Boolean value @@ -52,6 +61,12 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetFalseWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set Boolean value false @@ -64,6 +79,9 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutFalseWithHttpMessagesAsync(bool boolBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null Boolean value @@ -74,6 +92,12 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid Boolean value @@ -84,6 +108,12 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/Models/ErrorException.cs index 5ed2f7eb9e52..0c19fdf2b5ad 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/AutoRestSwaggerBATByteService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/AutoRestSwaggerBATByteService.cs index 1f2929c694da..03f54f118429 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/AutoRestSwaggerBATByteService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/AutoRestSwaggerBATByteService.cs @@ -83,6 +83,9 @@ public AutoRestSwaggerBATByteService(HttpClientHandler rootHandler, params Deleg /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATByteService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestSwaggerBATByteService(Uri baseUri, params DelegatingHandler[] han /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATByteService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/ByteModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/ByteModel.cs index 6343dc98de5e..9a3fa5fc8d81 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/ByteModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/ByteModel.cs @@ -34,6 +34,9 @@ public partial class ByteModel : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public ByteModel(AutoRestSwaggerBATByteService client) { if (client == null) @@ -57,6 +60,12 @@ public ByteModel(AutoRestSwaggerBATByteService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -176,6 +185,12 @@ public ByteModel(AutoRestSwaggerBATByteService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -295,6 +310,12 @@ public ByteModel(AutoRestSwaggerBATByteService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -417,6 +438,12 @@ public ByteModel(AutoRestSwaggerBATByteService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -529,6 +556,12 @@ public ByteModel(AutoRestSwaggerBATByteService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/IByteModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/IByteModel.cs index b00d9e065f2d..a7e087193f43 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/IByteModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/IByteModel.cs @@ -30,6 +30,12 @@ public partial interface IByteModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get empty byte value '' @@ -40,6 +46,12 @@ public partial interface IByteModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6) @@ -50,6 +62,12 @@ public partial interface IByteModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNonAsciiWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6) @@ -64,6 +82,12 @@ public partial interface IByteModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutNonAsciiWithHttpMessagesAsync(byte[] byteBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid byte value ':::SWAGGER::::' @@ -74,6 +98,12 @@ public partial interface IByteModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/Models/ErrorException.cs index 27609acb8a3a..3655be7d7525 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyByte/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Array.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Array.cs index 5009f9e28bce..b5c34453f275 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Array.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Array.cs @@ -34,6 +34,9 @@ public partial class Array : IServiceOperations, IAr /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Array(AutoRestComplexTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Array(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -178,6 +187,9 @@ public Array(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -291,6 +303,12 @@ public Array(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -412,6 +430,9 @@ public Array(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -526,6 +547,12 @@ public Array(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/AutoRestComplexTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/AutoRestComplexTestService.cs index c3b2702dcc13..16dc876edf64 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/AutoRestComplexTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/AutoRestComplexTestService.cs @@ -123,6 +123,9 @@ public AutoRestComplexTestService(HttpClientHandler rootHandler, params Delegati /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestComplexTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -144,6 +147,9 @@ public AutoRestComplexTestService(Uri baseUri, params DelegatingHandler[] handle /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestComplexTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/BasicOperations.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/BasicOperations.cs index 39cc806a8c83..f08ef2327b4b 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/BasicOperations.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/BasicOperations.cs @@ -34,6 +34,9 @@ public partial class BasicOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public BasicOperations(AutoRestComplexTestService client) { if (client == null) @@ -57,6 +60,12 @@ public BasicOperations(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -179,6 +188,12 @@ public BasicOperations(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -300,6 +315,12 @@ public BasicOperations(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -419,6 +440,12 @@ public BasicOperations(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -538,6 +565,12 @@ public BasicOperations(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -658,6 +691,12 @@ public BasicOperations(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Dictionary.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Dictionary.cs index d707e2106fd9..39bc5dd08ff4 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Dictionary.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Dictionary.cs @@ -34,6 +34,9 @@ public partial class Dictionary : IServiceOperations /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Dictionary(AutoRestComplexTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Dictionary(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -178,6 +187,9 @@ public Dictionary(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -291,6 +303,12 @@ public Dictionary(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -412,6 +430,9 @@ public Dictionary(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -525,6 +546,12 @@ public Dictionary(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -645,6 +672,12 @@ public Dictionary(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IArray.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IArray.cs index d08154f6e2be..71ae1812e29e 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IArray.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IArray.cs @@ -30,6 +30,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with array property @@ -42,6 +48,9 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutValidWithHttpMessagesAsync(IList array = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with array property which is empty @@ -52,6 +61,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with array property which is empty @@ -64,6 +79,9 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutEmptyWithHttpMessagesAsync(IList array = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with array property while server doesn't provide @@ -75,6 +93,12 @@ public partial interface IArray /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNotProvidedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IBasicOperations.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IBasicOperations.cs index 2380a47aede7..f38f9fb4b0b1 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IBasicOperations.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IBasicOperations.cs @@ -30,6 +30,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Please put {id: 2, name: 'abc', color: 'Magenta'} @@ -43,6 +49,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidWithHttpMessagesAsync(Basic complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a basic complex type that is invalid for the local strong type @@ -53,6 +65,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a basic complex type that is empty @@ -63,6 +81,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a basic complex type whose properties are null @@ -73,6 +97,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a basic complex type while the server doesn't provide a @@ -84,6 +114,12 @@ public partial interface IBasicOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNotProvidedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IDictionary.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IDictionary.cs index e1dcc11cb07d..c622e158b1ff 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IDictionary.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IDictionary.cs @@ -30,6 +30,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with dictionary property @@ -42,6 +48,9 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutValidWithHttpMessagesAsync(IDictionary defaultProgram = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with dictionary property which is empty @@ -52,6 +61,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with dictionary property which is empty @@ -64,6 +79,9 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutEmptyWithHttpMessagesAsync(IDictionary defaultProgram = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with dictionary property which is null @@ -74,6 +92,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with dictionary property while server doesn't @@ -85,6 +109,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNotProvidedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IInheritance.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IInheritance.cs index 38e67f444561..e9d387787ba6 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IInheritance.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IInheritance.cs @@ -30,6 +30,12 @@ public partial interface IInheritance /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types that extend others @@ -46,6 +52,12 @@ public partial interface IInheritance /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidWithHttpMessagesAsync(Siamese complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPolymorphicrecursive.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPolymorphicrecursive.cs index 53849b0bfc5d..907b9e74de1a 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPolymorphicrecursive.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPolymorphicrecursive.cs @@ -31,6 +31,12 @@ public partial interface IPolymorphicrecursive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types that are polymorphic and have recursive @@ -97,6 +103,12 @@ public partial interface IPolymorphicrecursive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidWithHttpMessagesAsync(Fish complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPolymorphism.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPolymorphism.cs index a982f26064e8..6f23e20069f2 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPolymorphism.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPolymorphism.cs @@ -30,6 +30,12 @@ public partial interface IPolymorphism /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types that are polymorphic @@ -76,6 +82,12 @@ public partial interface IPolymorphism /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidWithHttpMessagesAsync(Fish complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types that are polymorphic, attempting to omit @@ -117,6 +129,12 @@ public partial interface IPolymorphism /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidMissingRequiredWithHttpMessagesAsync(Fish complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPrimitive.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPrimitive.cs index 06b7341a9a02..0e9a15e43055 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPrimitive.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IPrimitive.cs @@ -30,6 +30,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetIntWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with integer properties @@ -43,6 +49,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutIntWithHttpMessagesAsync(IntWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with long properties @@ -53,6 +65,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetLongWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with long properties @@ -66,6 +84,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutLongWithHttpMessagesAsync(LongWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with float properties @@ -76,6 +100,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetFloatWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with float properties @@ -89,6 +119,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutFloatWithHttpMessagesAsync(FloatWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with double properties @@ -99,6 +135,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetDoubleWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with double properties @@ -113,6 +155,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDoubleWithHttpMessagesAsync(DoubleWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with bool properties @@ -123,6 +171,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetBoolWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with bool properties @@ -136,6 +190,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutBoolWithHttpMessagesAsync(BooleanWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with string properties @@ -146,6 +206,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with string properties @@ -159,6 +225,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutStringWithHttpMessagesAsync(StringWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with date properties @@ -169,6 +241,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetDateWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with date properties @@ -182,6 +260,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateWithHttpMessagesAsync(DateWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with datetime properties @@ -192,6 +276,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with datetime properties @@ -206,6 +296,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateTimeWithHttpMessagesAsync(DatetimeWrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with datetimeRfc1123 properties @@ -216,6 +312,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetDateTimeRfc1123WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with datetimeRfc1123 properties @@ -230,6 +332,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateTimeRfc1123WithHttpMessagesAsync(Datetimerfc1123Wrapper complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with duration properties @@ -240,6 +348,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetDurationWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with duration properties @@ -252,6 +366,9 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutDurationWithHttpMessagesAsync(TimeSpan? field = default(TimeSpan?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get complex types with byte properties @@ -262,6 +379,12 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetByteWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types with byte properties @@ -274,6 +397,9 @@ public partial interface IPrimitive /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutByteWithHttpMessagesAsync(byte[] field = default(byte[]), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IReadonlyproperty.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IReadonlyproperty.cs index bbff98c67343..bc64c8429f39 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IReadonlyproperty.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/IReadonlyproperty.cs @@ -30,6 +30,12 @@ public partial interface IReadonlyproperty /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put complex types that have readonly properties @@ -42,6 +48,12 @@ public partial interface IReadonlyproperty /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutValidWithHttpMessagesAsync(ReadonlyObj complexBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Inheritance.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Inheritance.cs index 8884055cd84c..3b9ec078c96f 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Inheritance.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Inheritance.cs @@ -34,6 +34,9 @@ public partial class Inheritance : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Inheritance(AutoRestComplexTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Inheritance(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -182,6 +191,12 @@ public Inheritance(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Cookiecuttershark.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Cookiecuttershark.cs index 63afa24a3ca0..684be22441eb 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Cookiecuttershark.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Cookiecuttershark.cs @@ -32,8 +32,11 @@ public Cookiecuttershark() { } } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/ErrorException.cs index e82d637189ec..20019b8952d6 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Fish.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Fish.cs index 8738a13758eb..ca8054fe1010 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Fish.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Fish.cs @@ -48,8 +48,11 @@ public Fish() { } public IList Siblings { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (this.Siblings != null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Goblinshark.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Goblinshark.cs index e480a63cae16..fa353593fd1c 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Goblinshark.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Goblinshark.cs @@ -38,8 +38,11 @@ public Goblinshark() { } public int? Jawsize { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Salmon.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Salmon.cs index 17bd884c0541..e51775aa7b96 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Salmon.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Salmon.cs @@ -44,8 +44,11 @@ public Salmon() { } public bool? Iswild { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Sawshark.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Sawshark.cs index 80cb14029c3f..a09420b1eaaa 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Sawshark.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Sawshark.cs @@ -38,8 +38,11 @@ public Sawshark() { } public byte[] Picture { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Shark.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Shark.cs index dedaa8f7b04a..6275b8c0e39e 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Shark.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Models/Shark.cs @@ -44,8 +44,11 @@ public Shark() { } public DateTime Birthday { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Polymorphicrecursive.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Polymorphicrecursive.cs index 9e3d47fc4a98..7678831b5d5f 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Polymorphicrecursive.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Polymorphicrecursive.cs @@ -34,6 +34,9 @@ public partial class Polymorphicrecursive : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Polymorphicrecursive(AutoRestComplexTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Polymorphicrecursive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -231,6 +240,12 @@ public Polymorphicrecursive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Polymorphism.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Polymorphism.cs index e9f32ec1facc..7e39dd0f36f1 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Polymorphism.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Polymorphism.cs @@ -34,6 +34,9 @@ public partial class Polymorphism : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Polymorphism(AutoRestComplexTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Polymorphism(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -212,6 +221,12 @@ public Polymorphism(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -358,6 +373,12 @@ public Polymorphism(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Primitive.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Primitive.cs index 334e0f205ddc..4561a45fba32 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Primitive.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Primitive.cs @@ -34,6 +34,9 @@ public partial class Primitive : IServiceOperations, /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Primitive(AutoRestComplexTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -179,6 +188,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -291,6 +306,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -413,6 +434,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -525,6 +552,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -647,6 +680,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -759,6 +798,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -882,6 +927,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -994,6 +1045,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1116,6 +1173,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1228,6 +1291,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1350,6 +1419,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1462,6 +1537,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1584,6 +1665,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1696,6 +1783,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1818,6 +1911,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1930,6 +2029,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2053,6 +2158,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2165,6 +2276,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2286,6 +2403,9 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2396,6 +2516,12 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2517,6 +2643,9 @@ public Primitive(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Readonlyproperty.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Readonlyproperty.cs index 57471567ee6d..9c78466856d1 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Readonlyproperty.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyComplex/Readonlyproperty.cs @@ -34,6 +34,9 @@ public partial class Readonlyproperty : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Readonlyproperty(AutoRestComplexTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Readonlyproperty(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -178,6 +187,12 @@ public Readonlyproperty(AutoRestComplexTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/AutoRestDateTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/AutoRestDateTestService.cs index 69984301d060..ff445d42f554 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/AutoRestDateTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/AutoRestDateTestService.cs @@ -83,6 +83,9 @@ public AutoRestDateTestService(HttpClientHandler rootHandler, params DelegatingH /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestDateTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestDateTestService(Uri baseUri, params DelegatingHandler[] handlers) /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestDateTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/Date.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/Date.cs index 509781fe382c..aff8b8fffe48 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/Date.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/Date.cs @@ -34,6 +34,9 @@ public partial class Date : IServiceOperations, IDate /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Date(AutoRestDateTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Date(AutoRestDateTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -176,6 +185,12 @@ public Date(AutoRestDateTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -295,6 +310,12 @@ public Date(AutoRestDateTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -414,6 +435,12 @@ public Date(AutoRestDateTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -535,6 +562,9 @@ public Date(AutoRestDateTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -640,6 +670,12 @@ public Date(AutoRestDateTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -761,6 +797,9 @@ public Date(AutoRestDateTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -866,6 +905,12 @@ public Date(AutoRestDateTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/IDate.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/IDate.cs index c98bd5303260..5e7c90989a52 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/IDate.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/IDate.cs @@ -30,6 +30,12 @@ public partial interface IDate /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid date value @@ -40,6 +46,12 @@ public partial interface IDate /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidDateWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get overflow date value @@ -50,6 +62,12 @@ public partial interface IDate /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetOverflowDateWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get underflow date value @@ -60,6 +78,12 @@ public partial interface IDate /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUnderflowDateWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put max date value 9999-12-31 @@ -72,6 +96,9 @@ public partial interface IDate /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutMaxDateWithHttpMessagesAsync(DateTime dateBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get max date value 9999-12-31 @@ -82,6 +109,12 @@ public partial interface IDate /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetMaxDateWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put min date value 0000-01-01 @@ -94,6 +127,9 @@ public partial interface IDate /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutMinDateWithHttpMessagesAsync(DateTime dateBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get min date value 0000-01-01 @@ -104,6 +140,12 @@ public partial interface IDate /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetMinDateWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/Models/ErrorException.cs index 2f9e6a2b9cef..5bcc5567221a 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDate/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/AutoRestDateTimeTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/AutoRestDateTimeTestService.cs index 061a12d1cdae..10a8c60ef6c6 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/AutoRestDateTimeTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/AutoRestDateTimeTestService.cs @@ -83,6 +83,9 @@ public AutoRestDateTimeTestService(HttpClientHandler rootHandler, params Delegat /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestDateTimeTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestDateTimeTestService(Uri baseUri, params DelegatingHandler[] handl /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestDateTimeTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/Datetime.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/Datetime.cs index a46a03a8ae9b..11492a137e0e 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/Datetime.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/Datetime.cs @@ -34,6 +34,9 @@ public partial class Datetime : IServiceOperations, /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Datetime(AutoRestDateTimeTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -176,6 +185,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -295,6 +310,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -414,6 +435,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -535,6 +562,9 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -640,6 +670,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -759,6 +795,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -881,6 +923,9 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -987,6 +1032,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1107,6 +1158,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1229,6 +1286,9 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1335,6 +1395,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1455,6 +1521,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1576,6 +1648,9 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1681,6 +1756,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1802,6 +1883,9 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1907,6 +1991,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2028,6 +2118,9 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2133,6 +2226,12 @@ public Datetime(AutoRestDateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/IDatetime.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/IDatetime.cs index 9a4394fe0abf..5590a8f26586 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/IDatetime.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/IDatetime.cs @@ -30,6 +30,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid datetime value @@ -40,6 +46,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get overflow datetime value @@ -50,6 +62,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetOverflowWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get underflow datetime value @@ -60,6 +78,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUnderflowWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put max datetime value 9999-12-31T23:59:59.9999999Z @@ -72,6 +96,9 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutUtcMaxDateTimeWithHttpMessagesAsync(DateTime datetimeBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get max datetime value 9999-12-31t23:59:59.9999999z @@ -82,6 +109,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUtcLowercaseMaxDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get max datetime value 9999-12-31T23:59:59.9999999Z @@ -92,6 +125,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUtcUppercaseMaxDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put max datetime value with positive numoffset @@ -105,6 +144,9 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutLocalPositiveOffsetMaxDateTimeWithHttpMessagesAsync(DateTime datetimeBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get max datetime value with positive num offset @@ -116,6 +158,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetLocalPositiveOffsetLowercaseMaxDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get max datetime value with positive num offset @@ -127,6 +175,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetLocalPositiveOffsetUppercaseMaxDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put max datetime value with positive numoffset @@ -140,6 +194,9 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutLocalNegativeOffsetMaxDateTimeWithHttpMessagesAsync(DateTime datetimeBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get max datetime value with positive num offset @@ -151,6 +208,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetLocalNegativeOffsetUppercaseMaxDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get max datetime value with positive num offset @@ -162,6 +225,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetLocalNegativeOffsetLowercaseMaxDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put min datetime value 0001-01-01T00:00:00Z @@ -174,6 +243,9 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutUtcMinDateTimeWithHttpMessagesAsync(DateTime datetimeBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get min datetime value 0001-01-01T00:00:00Z @@ -184,6 +256,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUtcMinDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put min datetime value 0001-01-01T00:00:00+14:00 @@ -196,6 +274,9 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutLocalPositiveOffsetMinDateTimeWithHttpMessagesAsync(DateTime datetimeBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get min datetime value 0001-01-01T00:00:00+14:00 @@ -206,6 +287,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetLocalPositiveOffsetMinDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put min datetime value 0001-01-01T00:00:00-14:00 @@ -218,6 +305,9 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutLocalNegativeOffsetMinDateTimeWithHttpMessagesAsync(DateTime datetimeBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get min datetime value 0001-01-01T00:00:00-14:00 @@ -228,6 +318,12 @@ public partial interface IDatetime /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetLocalNegativeOffsetMinDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/Models/ErrorException.cs index bcc82cb20e9a..db25a868fe59 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTime/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/AutoRestRFC1123DateTimeTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/AutoRestRFC1123DateTimeTestService.cs index bc0970cf8fe5..64a1b0ecc3db 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/AutoRestRFC1123DateTimeTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/AutoRestRFC1123DateTimeTestService.cs @@ -83,6 +83,9 @@ public AutoRestRFC1123DateTimeTestService(HttpClientHandler rootHandler, params /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestRFC1123DateTimeTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestRFC1123DateTimeTestService(Uri baseUri, params DelegatingHandler[ /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestRFC1123DateTimeTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/Datetimerfc1123.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/Datetimerfc1123.cs index 2506c533d563..fe23f1b29d67 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/Datetimerfc1123.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/Datetimerfc1123.cs @@ -34,6 +34,9 @@ public partial class Datetimerfc1123 : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Datetimerfc1123(AutoRestRFC1123DateTimeTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Datetimerfc1123(AutoRestRFC1123DateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -176,6 +185,12 @@ public Datetimerfc1123(AutoRestRFC1123DateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -295,6 +310,12 @@ public Datetimerfc1123(AutoRestRFC1123DateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -414,6 +435,12 @@ public Datetimerfc1123(AutoRestRFC1123DateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -535,6 +562,9 @@ public Datetimerfc1123(AutoRestRFC1123DateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -640,6 +670,12 @@ public Datetimerfc1123(AutoRestRFC1123DateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -759,6 +795,12 @@ public Datetimerfc1123(AutoRestRFC1123DateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -880,6 +922,9 @@ public Datetimerfc1123(AutoRestRFC1123DateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -985,6 +1030,12 @@ public Datetimerfc1123(AutoRestRFC1123DateTimeTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/IDatetimerfc1123.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/IDatetimerfc1123.cs index f127fe5279ab..83ffbfc3954d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/IDatetimerfc1123.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/IDatetimerfc1123.cs @@ -30,6 +30,12 @@ public partial interface IDatetimerfc1123 /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid datetime value @@ -40,6 +46,12 @@ public partial interface IDatetimerfc1123 /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get overflow datetime value @@ -50,6 +62,12 @@ public partial interface IDatetimerfc1123 /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetOverflowWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get underflow datetime value @@ -60,6 +78,12 @@ public partial interface IDatetimerfc1123 /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUnderflowWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put max datetime value Fri, 31 Dec 9999 23:59:59 GMT @@ -72,6 +96,9 @@ public partial interface IDatetimerfc1123 /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutUtcMaxDateTimeWithHttpMessagesAsync(DateTime datetimeBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get max datetime value fri, 31 dec 9999 23:59:59 gmt @@ -82,6 +109,12 @@ public partial interface IDatetimerfc1123 /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUtcLowercaseMaxDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get max datetime value FRI, 31 DEC 9999 23:59:59 GMT @@ -92,6 +125,12 @@ public partial interface IDatetimerfc1123 /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUtcUppercaseMaxDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put min datetime value Mon, 1 Jan 0001 00:00:00 GMT @@ -104,6 +143,9 @@ public partial interface IDatetimerfc1123 /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutUtcMinDateTimeWithHttpMessagesAsync(DateTime datetimeBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get min datetime value Mon, 1 Jan 0001 00:00:00 GMT @@ -114,6 +156,12 @@ public partial interface IDatetimerfc1123 /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUtcMinDateTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/Models/ErrorException.cs index 7da71e1c3cfe..58462b00a1e5 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/AutoRestSwaggerBATdictionaryService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/AutoRestSwaggerBATdictionaryService.cs index a8974c9a128b..0b6620abde9d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/AutoRestSwaggerBATdictionaryService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/AutoRestSwaggerBATdictionaryService.cs @@ -83,6 +83,9 @@ public AutoRestSwaggerBATdictionaryService(HttpClientHandler rootHandler, params /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATdictionaryService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestSwaggerBATdictionaryService(Uri baseUri, params DelegatingHandler /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATdictionaryService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/Dictionary.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/Dictionary.cs index ec2b9dd872bd..fc5053b67bab 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/Dictionary.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/Dictionary.cs @@ -34,6 +34,9 @@ public partial class Dictionary : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Dictionary(AutoRestSwaggerBATdictionaryService client) { if (client == null) @@ -57,6 +60,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -176,6 +185,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -297,6 +312,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -409,6 +430,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -528,6 +555,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -647,6 +680,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -766,6 +805,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -886,6 +931,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1007,6 +1058,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1119,6 +1176,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1238,6 +1301,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1357,6 +1426,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1478,6 +1553,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1590,6 +1671,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1709,6 +1796,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1828,6 +1921,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1949,6 +2048,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2061,6 +2166,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2180,6 +2291,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2299,6 +2416,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2420,6 +2543,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2532,6 +2661,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2651,6 +2786,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2770,6 +2911,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2891,6 +3038,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3003,6 +3156,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3122,6 +3281,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3241,6 +3406,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3362,6 +3533,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3474,6 +3651,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3593,6 +3776,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3713,6 +3902,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3835,6 +4030,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3947,6 +4148,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4066,6 +4273,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4186,6 +4399,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4308,6 +4527,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -4420,6 +4645,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4539,6 +4770,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4660,6 +4897,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -4782,6 +5025,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -4895,6 +5144,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5016,6 +5271,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -5129,6 +5390,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5251,6 +5518,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -5364,6 +5637,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5484,6 +5763,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5603,6 +5888,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5722,6 +6013,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5842,6 +6139,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -5962,6 +6265,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6082,6 +6391,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6205,6 +6520,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -6317,6 +6638,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6436,6 +6763,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6556,6 +6889,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6676,6 +7015,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6796,6 +7141,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -6918,6 +7269,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -7030,6 +7387,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -7150,6 +7513,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -7271,6 +7640,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -7392,6 +7767,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -7513,6 +7894,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -7636,6 +8023,12 @@ public Dictionary(AutoRestSwaggerBATdictionaryService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/IDictionary.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/IDictionary.cs index 8c5451a26f10..8a2af0bcd1b7 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/IDictionary.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/IDictionary.cs @@ -30,6 +30,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get empty dictionary value {} @@ -40,6 +46,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set dictionary value empty {} @@ -52,6 +64,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutEmptyWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get Dictionary with null value @@ -62,6 +80,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetNullValueWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get Dictionary with null key @@ -72,6 +96,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetNullKeyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get Dictionary with key as empty string @@ -82,6 +112,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetEmptyStringKeyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid Dictionary value @@ -92,6 +128,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get boolean dictionary value {"0": true, "1": false, "2": false, @@ -103,6 +145,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetBooleanTfftWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set dictionary value empty {"0": true, "1": false, "2": false, @@ -116,6 +164,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutBooleanTfftWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get boolean dictionary value {"0": true, "1": null, "2": false } @@ -126,6 +180,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetBooleanInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get boolean dictionary value '{"0": true, "1": "boolean", "2": @@ -137,6 +197,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetBooleanInvalidStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get integer dictionary value {"0": 1, "1": -1, "2": 3, "3": 300} @@ -147,6 +213,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetIntegerValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300} @@ -159,6 +231,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutIntegerValidWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get integer dictionary value {"0": 1, "1": null, "2": 0} @@ -169,6 +247,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetIntInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get integer dictionary value {"0": 1, "1": "integer", "2": 0} @@ -179,6 +263,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetIntInvalidStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get integer dictionary value {"0": 1, "1": -1, "2": 3, "3": 300} @@ -189,6 +279,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetLongValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300} @@ -201,6 +297,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutLongValidWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get long dictionary value {"0": 1, "1": null, "2": 0} @@ -211,6 +313,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetLongInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get long dictionary value {"0": 1, "1": "integer", "2": 0} @@ -221,6 +329,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetLongInvalidStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get float dictionary value {"0": 0, "1": -0.01, "2": 1.2e20} @@ -231,6 +345,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetFloatValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20} @@ -243,6 +363,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutFloatValidWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get float dictionary value {"0": 0.0, "1": null, "2": 1.2e20} @@ -253,6 +379,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetFloatInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get boolean dictionary value {"0": 1.0, "1": "number", "2": 0.0} @@ -263,6 +395,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetFloatInvalidStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get float dictionary value {"0": 0, "1": -0.01, "2": 1.2e20} @@ -273,6 +411,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDoubleValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20} @@ -285,6 +429,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDoubleValidWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get float dictionary value {"0": 0.0, "1": null, "2": 1.2e20} @@ -295,6 +445,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDoubleInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get boolean dictionary value {"0": 1.0, "1": "number", "2": 0.0} @@ -305,6 +461,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDoubleInvalidStringWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get string dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"} @@ -315,6 +477,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetStringValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"} @@ -327,6 +495,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutStringValidWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get string dictionary value {"0": "foo", "1": null, "2": "foo2"} @@ -337,6 +511,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetStringWithNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get string dictionary value {"0": "foo", "1": 123, "2": "foo2"} @@ -347,6 +527,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetStringWithInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get integer dictionary value {"0": "2000-12-01", "1": @@ -358,6 +544,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": @@ -371,6 +563,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateValidWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date dictionary value {"0": "2012-01-01", "1": null, "2": @@ -382,6 +580,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date dictionary value {"0": "2011-03-22", "1": "date"} @@ -392,6 +596,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateInvalidCharsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date-time dictionary value {"0": "2000-12-01t00:00:01z", "1": @@ -403,6 +613,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateTimeValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set dictionary value {"0": "2000-12-01t00:00:01z", "1": @@ -416,6 +632,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateTimeValidWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date dictionary value {"0": "2000-12-01t00:00:01z", "1": null} @@ -426,6 +648,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateTimeInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date dictionary value {"0": "2000-12-01t00:00:01z", "1": @@ -437,6 +665,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateTimeInvalidCharsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get date-time-rfc1123 dictionary value {"0": "Fri, 01 Dec 2000 @@ -449,6 +683,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDateTimeRfc1123ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", @@ -463,6 +703,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDateTimeRfc1123ValidWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get duration dictionary value {"0": "P123DT22H14M12.011S", "1": @@ -474,6 +720,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetDurationValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set dictionary value {"0": "P123DT22H14M12.011S", "1": @@ -487,6 +739,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDurationValidWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get byte dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 @@ -498,6 +756,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetByteValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 @@ -511,6 +775,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutByteValidWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get byte dictionary value {"0": hex(FF FF FF FA), "1": null} with @@ -522,6 +792,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetByteInvalidNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get base64url dictionary value {"0": "a string that gets encoded @@ -533,6 +809,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetBase64UrlWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get dictionary of complex type null value @@ -543,6 +825,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetComplexNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get empty dictionary of complex type {} @@ -553,6 +841,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetComplexEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get dictionary of complex type with null item {"0": {"integer": 1, @@ -564,6 +858,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetComplexItemNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get dictionary of complex type with empty item {"0": {"integer": @@ -575,6 +875,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetComplexItemEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get dictionary of complex type with {"0": {"integer": 1, "string": @@ -587,6 +893,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>> GetComplexValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put an dictionary of complex type with values {"0": {"integer": 1, @@ -601,6 +913,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutComplexValidWithHttpMessagesAsync(IDictionary arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a null array @@ -611,6 +929,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetArrayNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an empty dictionary {} @@ -621,6 +945,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetArrayEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an dictionary of array of strings {"0": ["1", "2", "3"], "1": @@ -632,6 +962,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetArrayItemNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of array of strings [{"0": ["1", "2", "3"], "1": [], @@ -643,6 +979,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetArrayItemEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of array of strings {"0": ["1", "2", "3"], "1": ["4", @@ -654,6 +996,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetArrayValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", @@ -667,6 +1015,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutArrayValidWithHttpMessagesAsync(IDictionary> arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an dictionaries of dictionaries with value null @@ -677,6 +1031,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetDictionaryNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an dictionaries of dictionaries of type <string, string> @@ -688,6 +1048,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetDictionaryEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an dictionaries of dictionaries of type <string, string> @@ -700,6 +1066,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetDictionaryItemNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an dictionaries of dictionaries of type <string, string> @@ -712,6 +1084,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetDictionaryItemEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an dictionaries of dictionaries of type <string, string> @@ -725,6 +1103,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task>>> GetDictionaryValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an dictionaries of dictionaries of type <string, string> @@ -740,6 +1124,12 @@ public partial interface IDictionary /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutDictionaryValidWithHttpMessagesAsync(IDictionary> arrayBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/Models/ErrorException.cs index aaff5df04eba..820c02059d38 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDictionary/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/AutoRestDurationTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/AutoRestDurationTestService.cs index 90078aca1b9e..df7fbef3d841 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/AutoRestDurationTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/AutoRestDurationTestService.cs @@ -83,6 +83,9 @@ public AutoRestDurationTestService(HttpClientHandler rootHandler, params Delegat /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestDurationTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestDurationTestService(Uri baseUri, params DelegatingHandler[] handl /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestDurationTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/Duration.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/Duration.cs index 7893ed1ee850..f00420b00e59 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/Duration.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/Duration.cs @@ -34,6 +34,9 @@ public partial class Duration : IServiceOperations, /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Duration(AutoRestDurationTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Duration(AutoRestDurationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -178,6 +187,9 @@ public Duration(AutoRestDurationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -283,6 +295,12 @@ public Duration(AutoRestDurationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -402,6 +420,12 @@ public Duration(AutoRestDurationTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/IDuration.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/IDuration.cs index 153bc1f77f9e..de4a779e072e 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/IDuration.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/IDuration.cs @@ -30,6 +30,12 @@ public partial interface IDuration /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put a positive duration value @@ -42,6 +48,9 @@ public partial interface IDuration /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutPositiveDurationWithHttpMessagesAsync(TimeSpan durationBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a positive duration value @@ -52,6 +61,12 @@ public partial interface IDuration /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetPositiveDurationWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an invalid duration value @@ -62,6 +77,12 @@ public partial interface IDuration /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/Models/ErrorException.cs index 6d584b442918..a3419432bb81 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyDuration/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/AutoRestSwaggerBATFileService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/AutoRestSwaggerBATFileService.cs index dcf031a9b755..5aae4979e452 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/AutoRestSwaggerBATFileService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/AutoRestSwaggerBATFileService.cs @@ -83,6 +83,9 @@ public AutoRestSwaggerBATFileService(HttpClientHandler rootHandler, params Deleg /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATFileService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestSwaggerBATFileService(Uri baseUri, params DelegatingHandler[] han /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATFileService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/Files.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/Files.cs index a2d36ef61ee2..7b2d52d03996 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/Files.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/Files.cs @@ -34,6 +34,9 @@ public partial class Files : IServiceOperations, /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Files(AutoRestSwaggerBATFileService client) { if (client == null) @@ -57,6 +60,12 @@ public Files(AutoRestSwaggerBATFileService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -163,6 +172,12 @@ public Files(AutoRestSwaggerBATFileService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -269,6 +284,12 @@ public Files(AutoRestSwaggerBATFileService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/IFiles.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/IFiles.cs index 32283e7d0d33..43560b290169 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/IFiles.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/IFiles.cs @@ -30,6 +30,12 @@ public partial interface IFiles /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetFileWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a large file @@ -40,6 +46,12 @@ public partial interface IFiles /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetFileLargeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get empty file @@ -50,6 +62,12 @@ public partial interface IFiles /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetEmptyFileWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/Models/ErrorException.cs index 61b07afa89eb..c4956ebbb051 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFile/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/AutoRestSwaggerBATFormDataService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/AutoRestSwaggerBATFormDataService.cs index b1207eed51c9..f13bdf946736 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/AutoRestSwaggerBATFormDataService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/AutoRestSwaggerBATFormDataService.cs @@ -83,6 +83,9 @@ public AutoRestSwaggerBATFormDataService(HttpClientHandler rootHandler, params D /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATFormDataService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestSwaggerBATFormDataService(Uri baseUri, params DelegatingHandler[] /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATFormDataService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/Formdata.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/Formdata.cs index 1880317e4a19..5fa55d6e3f80 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/Formdata.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/Formdata.cs @@ -34,6 +34,9 @@ public partial class Formdata : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Formdata(AutoRestSwaggerBATFormDataService client) { if (client == null) @@ -63,6 +66,15 @@ public Formdata(AutoRestSwaggerBATFormDataService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -203,6 +215,15 @@ public Formdata(AutoRestSwaggerBATFormDataService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/IFormdata.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/IFormdata.cs index bc70e3b6e328..866bf2e412a4 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/IFormdata.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/IFormdata.cs @@ -37,6 +37,15 @@ public partial interface IFormdata /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task> UploadFileWithHttpMessagesAsync(System.IO.Stream fileContent, string fileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Upload file @@ -50,6 +59,15 @@ public partial interface IFormdata /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task> UploadFileViaBodyWithHttpMessagesAsync(System.IO.Stream fileContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/Models/ErrorException.cs index 31bc239cb640..5041b1e6b60c 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyFormData/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/AutoRestIntegerTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/AutoRestIntegerTestService.cs index 2fcbc664c42c..33859900745d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/AutoRestIntegerTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/AutoRestIntegerTestService.cs @@ -83,6 +83,9 @@ public AutoRestIntegerTestService(HttpClientHandler rootHandler, params Delegati /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestIntegerTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestIntegerTestService(Uri baseUri, params DelegatingHandler[] handle /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestIntegerTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/IIntModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/IIntModel.cs index 7131504bb185..49788e60cd9d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/IIntModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/IIntModel.cs @@ -30,6 +30,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid Int value @@ -40,6 +46,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get overflow Int32 value @@ -50,6 +62,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetOverflowInt32WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get underflow Int32 value @@ -60,6 +78,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUnderflowInt32WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get overflow Int64 value @@ -70,6 +94,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetOverflowInt64WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get underflow Int64 value @@ -80,6 +110,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUnderflowInt64WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put max int32 value @@ -92,6 +128,9 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutMax32WithHttpMessagesAsync(int intBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put max int64 value @@ -104,6 +143,9 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutMax64WithHttpMessagesAsync(long intBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put min int32 value @@ -116,6 +158,9 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutMin32WithHttpMessagesAsync(int intBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put min int64 value @@ -128,6 +173,9 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutMin64WithHttpMessagesAsync(long intBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get datetime encoded as Unix time value @@ -138,6 +186,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUnixTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put datetime encoded as Unix time @@ -150,6 +204,9 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutUnixTimeDateWithHttpMessagesAsync(DateTime intBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid Unix time value @@ -160,6 +217,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidUnixTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null Unix time value @@ -170,6 +233,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullUnixTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/IntModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/IntModel.cs index 03b6a56c686c..bd04e82271b7 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/IntModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/IntModel.cs @@ -34,6 +34,9 @@ public partial class IntModel : IServiceOperations, /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public IntModel(AutoRestIntegerTestService client) { if (client == null) @@ -57,6 +60,12 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -176,6 +185,12 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -295,6 +310,12 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -414,6 +435,12 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -533,6 +560,12 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -652,6 +685,12 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -773,6 +812,9 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -880,6 +922,9 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -987,6 +1032,9 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1094,6 +1142,9 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1199,6 +1250,12 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1320,6 +1377,9 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1425,6 +1485,12 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1544,6 +1610,12 @@ public IntModel(AutoRestIntegerTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/Models/ErrorException.cs index fd595ce8e15f..d707c5d41a05 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyInteger/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/AutoRestNumberTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/AutoRestNumberTestService.cs index 028e46e86749..edcbb2d8896a 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/AutoRestNumberTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/AutoRestNumberTestService.cs @@ -83,6 +83,9 @@ public AutoRestNumberTestService(HttpClientHandler rootHandler, params Delegatin /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestNumberTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestNumberTestService(Uri baseUri, params DelegatingHandler[] handler /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestNumberTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/INumber.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/INumber.cs index d90e5edf12ed..cb11bdfac562 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/INumber.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/INumber.cs @@ -30,6 +30,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid float Number value @@ -40,6 +46,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidFloatWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid double Number value @@ -50,6 +62,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidDoubleWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid decimal Number value @@ -60,6 +78,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidDecimalWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put big float value 3.402823e+20 @@ -72,6 +96,9 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutBigFloatWithHttpMessagesAsync(double numberBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get big float value 3.402823e+20 @@ -82,6 +109,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetBigFloatWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put big double value 2.5976931e+101 @@ -94,6 +127,9 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutBigDoubleWithHttpMessagesAsync(double numberBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get big double value 2.5976931e+101 @@ -104,6 +140,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetBigDoubleWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put big double value 99999999.99 @@ -116,6 +158,9 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutBigDoublePositiveDecimalWithHttpMessagesAsync(double numberBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get big double value 99999999.99 @@ -126,6 +171,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetBigDoublePositiveDecimalWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put big double value -99999999.99 @@ -138,6 +189,9 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutBigDoubleNegativeDecimalWithHttpMessagesAsync(double numberBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get big double value -99999999.99 @@ -148,6 +202,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetBigDoubleNegativeDecimalWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put big decimal value 2.5976931e+101 @@ -160,6 +220,9 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutBigDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get big decimal value 2.5976931e+101 @@ -170,6 +233,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetBigDecimalWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put big decimal value 99999999.99 @@ -182,6 +251,9 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutBigDecimalPositiveDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get big decimal value 99999999.99 @@ -192,6 +264,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetBigDecimalPositiveDecimalWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put big decimal value -99999999.99 @@ -204,6 +282,9 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutBigDecimalNegativeDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get big decimal value -99999999.99 @@ -214,6 +295,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetBigDecimalNegativeDecimalWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put small float value 3.402823e-20 @@ -226,6 +313,9 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutSmallFloatWithHttpMessagesAsync(double numberBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get big double value 3.402823e-20 @@ -236,6 +326,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetSmallFloatWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put small double value 2.5976931e-101 @@ -248,6 +344,9 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutSmallDoubleWithHttpMessagesAsync(double numberBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get big double value 2.5976931e-101 @@ -258,6 +357,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetSmallDoubleWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put small decimal value 2.5976931e-101 @@ -270,6 +375,9 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutSmallDecimalWithHttpMessagesAsync(decimal numberBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get small decimal value 2.5976931e-101 @@ -280,6 +388,12 @@ public partial interface INumber /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetSmallDecimalWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/Models/ErrorException.cs index cc3fb0b9bcdc..308fe4ab54d2 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/Number.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/Number.cs index dc98d33d8644..cb81f1fd2b12 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/Number.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyNumber/Number.cs @@ -34,6 +34,9 @@ public partial class Number : IServiceOperations, INu /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Number(AutoRestNumberTestService client) { if (client == null) @@ -57,6 +60,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -176,6 +185,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -295,6 +310,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -414,6 +435,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -535,6 +562,9 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -640,6 +670,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -761,6 +797,9 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -866,6 +905,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -987,6 +1032,9 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1092,6 +1140,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1213,6 +1267,9 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1318,6 +1375,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1439,6 +1502,9 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1544,6 +1610,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1665,6 +1737,9 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1770,6 +1845,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1891,6 +1972,9 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1996,6 +2080,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2117,6 +2207,9 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2222,6 +2315,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2343,6 +2442,9 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2448,6 +2550,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2569,6 +2677,9 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2674,6 +2785,12 @@ public Number(AutoRestNumberTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/AutoRestSwaggerBATService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/AutoRestSwaggerBATService.cs index 296e01ee2e4d..cd941273381d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/AutoRestSwaggerBATService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/AutoRestSwaggerBATService.cs @@ -88,6 +88,9 @@ public AutoRestSwaggerBATService(HttpClientHandler rootHandler, params Delegatin /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -109,6 +112,9 @@ public AutoRestSwaggerBATService(Uri baseUri, params DelegatingHandler[] handler /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/EnumModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/EnumModel.cs index c1701bfb31ad..5d337ef637c1 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/EnumModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/EnumModel.cs @@ -34,6 +34,9 @@ public partial class EnumModel : IServiceOperations, /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public EnumModel(AutoRestSwaggerBATService client) { if (client == null) @@ -58,6 +61,12 @@ public EnumModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -181,6 +190,9 @@ public EnumModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/IEnumModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/IEnumModel.cs index fb0617955195..772d6c8ec68f 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/IEnumModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/IEnumModel.cs @@ -31,6 +31,12 @@ public partial interface IEnumModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNotExpandableWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Sends value 'red color' from enumeration of 'red color', @@ -45,6 +51,9 @@ public partial interface IEnumModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutNotExpandableWithHttpMessagesAsync(Colors stringBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/IStringModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/IStringModel.cs index e1823d0463b8..088e47634093 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/IStringModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/IStringModel.cs @@ -30,6 +30,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set string value null @@ -43,6 +49,9 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutNullWithHttpMessagesAsync(string stringBody = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get empty string value value '' @@ -53,6 +62,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set string value empty '' @@ -66,6 +81,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutEmptyWithHttpMessagesAsync(string stringBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get mbcs string value @@ -78,6 +99,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetMbcsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set string value mbcs @@ -95,6 +122,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutMbcsWithHttpMessagesAsync(string stringBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get string value with leading and trailing whitespace @@ -108,6 +141,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetWhitespaceWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set String value with leading and trailing whitespace @@ -125,6 +164,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutWhitespaceWithHttpMessagesAsync(string stringBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get String value when no string value is sent in response payload @@ -135,6 +180,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNotProvidedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get value that is base64 encoded @@ -145,6 +196,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetBase64EncodedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get value that is base64url encoded @@ -155,6 +212,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetBase64UrlEncodedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put value that is base64url encoded @@ -167,6 +230,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task PutBase64UrlEncodedWithHttpMessagesAsync(byte[] stringBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null value that is expected to be base64url encoded @@ -177,6 +246,12 @@ public partial interface IStringModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullBase64UrlEncodedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/Models/ErrorException.cs index d4dd2266c40d..6d66275e44fc 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/StringModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/StringModel.cs index e32308ac6f57..527442276e9d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/StringModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyString/StringModel.cs @@ -34,6 +34,9 @@ public partial class StringModel : IServiceOperations /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public StringModel(AutoRestSwaggerBATService client) { if (client == null) @@ -57,6 +60,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -179,6 +188,9 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -287,6 +299,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -409,6 +427,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -522,6 +546,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -646,6 +676,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -760,6 +796,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -885,6 +927,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -997,6 +1045,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1116,6 +1170,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1235,6 +1295,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1356,6 +1422,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1468,6 +1540,12 @@ public StringModel(AutoRestSwaggerBATService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/BoolModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/BoolModel.cs index 9c761510fc30..a56193e22cf0 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/BoolModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/BoolModel.cs @@ -34,6 +34,9 @@ public partial class BoolModel : IServiceOperations, IBoolMode /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public BoolModel(CompositeBoolInt client) { if (client == null) @@ -57,6 +60,12 @@ public BoolModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -178,6 +187,9 @@ public BoolModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -283,6 +295,12 @@ public BoolModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -404,6 +422,9 @@ public BoolModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -509,6 +530,12 @@ public BoolModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -628,6 +655,12 @@ public BoolModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/CompositeBoolInt.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/CompositeBoolInt.cs index 72bd169c4181..bb460cd201cb 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/CompositeBoolInt.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/CompositeBoolInt.cs @@ -89,6 +89,9 @@ public CompositeBoolInt(HttpClientHandler rootHandler, params DelegatingHandler[ /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public CompositeBoolInt(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -110,6 +113,9 @@ public CompositeBoolInt(Uri baseUri, params DelegatingHandler[] handlers) : this /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public CompositeBoolInt(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IBoolModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IBoolModel.cs index 3f71b4fdbbba..49f2dee04e49 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IBoolModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IBoolModel.cs @@ -30,6 +30,12 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetTrueWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set Boolean value true @@ -42,6 +48,9 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutTrueWithHttpMessagesAsync(bool boolBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get false Boolean value @@ -52,6 +61,12 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetFalseWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Set Boolean value false @@ -64,6 +79,9 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutFalseWithHttpMessagesAsync(bool boolBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null Boolean value @@ -74,6 +92,12 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid Boolean value @@ -84,6 +108,12 @@ public partial interface IBoolModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IIntModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IIntModel.cs index d0b518478669..a622bfe953d2 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IIntModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IIntModel.cs @@ -30,6 +30,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid Int value @@ -40,6 +46,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get overflow Int32 value @@ -50,6 +62,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetOverflowInt32WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get underflow Int32 value @@ -60,6 +78,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUnderflowInt32WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get overflow Int64 value @@ -70,6 +94,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetOverflowInt64WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get underflow Int64 value @@ -80,6 +110,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUnderflowInt64WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put max int32 value @@ -92,6 +128,9 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutMax32WithHttpMessagesAsync(int intBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put max int64 value @@ -104,6 +143,9 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutMax64WithHttpMessagesAsync(long intBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put min int32 value @@ -116,6 +158,9 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutMin32WithHttpMessagesAsync(int intBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put min int64 value @@ -128,6 +173,9 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutMin64WithHttpMessagesAsync(long intBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get datetime encoded as Unix time value @@ -138,6 +186,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetUnixTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put datetime encoded as Unix time @@ -150,6 +204,9 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutUnixTimeDateWithHttpMessagesAsync(DateTime intBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get invalid Unix time value @@ -160,6 +217,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetInvalidUnixTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null Unix time value @@ -170,6 +233,12 @@ public partial interface IIntModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNullUnixTimeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IntModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IntModel.cs index c730d55f1547..e2d8913001b0 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IntModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/IntModel.cs @@ -34,6 +34,9 @@ public partial class IntModel : IServiceOperations, IIntModel /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public IntModel(CompositeBoolInt client) { if (client == null) @@ -57,6 +60,12 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -176,6 +185,12 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -295,6 +310,12 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -414,6 +435,12 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -533,6 +560,12 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -652,6 +685,12 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -773,6 +812,9 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -880,6 +922,9 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -987,6 +1032,9 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1094,6 +1142,9 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1199,6 +1250,12 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1320,6 +1377,9 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1425,6 +1485,12 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1544,6 +1610,12 @@ public IntModel(CompositeBoolInt client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/Models/ErrorException.cs index 2f72efa6e7e9..48fb84865653 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CompositeBoolIntClient/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/IPaths.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/IPaths.cs index a593192f4e67..893b787d491e 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/IPaths.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/IPaths.cs @@ -33,6 +33,12 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetEmptyWithHttpMessagesAsync(string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Models/ErrorException.cs index 27a16617a3bf..5e46dbc006ca 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Paths.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Paths.cs index af98a8354c24..713877a13035 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Paths.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUri/Paths.cs @@ -34,6 +34,9 @@ public partial class Paths : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Paths(AutoRestParameterizedHostTestClient client) { if (client == null) @@ -60,6 +63,12 @@ public Paths(AutoRestParameterizedHostTestClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/IPaths.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/IPaths.cs index a117b914e752..66826c1c7e7d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/IPaths.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/IPaths.cs @@ -42,6 +42,12 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetEmptyWithHttpMessagesAsync(string vault, string secret, string keyName, string keyVersion = "v1", Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/Models/ErrorException.cs index b05dfbe6d0f5..81363883c4ae 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/Paths.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/Paths.cs index a8599cf08338..619bd1492b1e 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/Paths.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/Paths.cs @@ -34,6 +34,9 @@ public partial class Paths : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Paths(AutoRestParameterizedCustomHostTestClient client) { if (client == null) @@ -69,6 +72,12 @@ public Paths(AutoRestParameterizedCustomHostTestClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/AutoRestSwaggerBATHeaderService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/AutoRestSwaggerBATHeaderService.cs index bca730532f22..e81f7442d0c7 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/AutoRestSwaggerBATHeaderService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/AutoRestSwaggerBATHeaderService.cs @@ -83,6 +83,9 @@ public AutoRestSwaggerBATHeaderService(HttpClientHandler rootHandler, params Del /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATHeaderService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestSwaggerBATHeaderService(Uri baseUri, params DelegatingHandler[] h /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestSwaggerBATHeaderService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/Header.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/Header.cs index 712aedcc5165..d6d355c57c79 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/Header.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/Header.cs @@ -34,6 +34,9 @@ public partial class Header : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Header(AutoRestSwaggerBATHeaderService client) { if (client == null) @@ -60,6 +63,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -174,6 +183,9 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -291,6 +303,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -405,6 +423,9 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -526,6 +547,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -649,6 +676,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -783,6 +816,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -906,6 +945,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1040,6 +1085,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1163,6 +1214,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1297,6 +1354,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1420,6 +1483,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1554,6 +1623,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1677,6 +1752,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1814,6 +1895,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1942,6 +2029,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2076,6 +2169,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2199,6 +2298,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2335,6 +2440,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2459,6 +2570,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2595,6 +2712,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2722,6 +2845,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2856,6 +2985,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2979,6 +3114,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3113,6 +3254,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3243,6 +3390,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3379,6 +3532,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3506,6 +3665,12 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3634,6 +3799,9 @@ public Header(AutoRestSwaggerBATHeaderService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/IHeader.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/IHeader.cs index af6917494799..f959617db21d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/IHeader.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/IHeader.cs @@ -33,6 +33,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamExistingKeyWithHttpMessagesAsync(string userAgent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header value "User-Agent": "overwrite" @@ -43,6 +49,9 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> ResponseExistingKeyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header value "Content-Type": "text/html" @@ -56,6 +65,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamProtectedKeyWithHttpMessagesAsync(string contentType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header value "Content-Type": "text/html" @@ -66,6 +81,9 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> ResponseProtectedKeyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "positive", @@ -84,6 +102,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamIntegerWithHttpMessagesAsync(string scenario, int value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header value "value": 1 or -2 @@ -98,6 +122,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseIntegerWithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "positive", @@ -116,6 +146,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamLongWithHttpMessagesAsync(string scenario, long value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header value "value": 105 or -2 @@ -130,6 +166,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseLongWithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "positive", @@ -148,6 +190,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamFloatWithHttpMessagesAsync(string scenario, double value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header value "value": 0.07 or -3.0 @@ -162,6 +210,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseFloatWithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "positive", @@ -180,6 +234,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamDoubleWithHttpMessagesAsync(string scenario, double value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header value "value": 7e120 or -3.0 @@ -194,6 +254,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseDoubleWithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "true", @@ -212,6 +278,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamBoolWithHttpMessagesAsync(string scenario, bool value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header value "value": true or false @@ -226,6 +298,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseBoolWithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "valid", @@ -247,6 +325,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamStringWithHttpMessagesAsync(string scenario, string value = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header values "The quick brown fox jumps over @@ -262,6 +346,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseStringWithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "valid", @@ -279,6 +369,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamDateWithHttpMessagesAsync(string scenario, DateTime value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header values "2010-01-01" or "0001-01-01" @@ -292,6 +388,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseDateWithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "valid", @@ -311,6 +413,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamDatetimeWithHttpMessagesAsync(string scenario, DateTime value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header values "2010-01-01T12:34:56Z" or @@ -325,6 +433,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseDatetimeWithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "valid", @@ -344,6 +458,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamDatetimeRfc1123WithHttpMessagesAsync(string scenario, DateTime? value = default(DateTime?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header values "Wed, 01 Jan 2010 12:34:56 GMT" @@ -358,6 +478,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseDatetimeRfc1123WithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "valid", @@ -375,6 +501,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamDurationWithHttpMessagesAsync(string scenario, TimeSpan value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header values "P123DT22H14M12.011S" @@ -388,6 +520,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseDurationWithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "valid", @@ -405,6 +543,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamByteWithHttpMessagesAsync(string scenario, byte[] value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header values "啊齄丂狛狜隣郎隣兀﨩" @@ -418,6 +562,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseByteWithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a post request with header values "scenario": "valid", @@ -437,6 +587,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ParamEnumWithHttpMessagesAsync(string scenario, GreyscaleColors? value = default(GreyscaleColors?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a response with header values "GREY" or null @@ -451,6 +607,12 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> ResponseEnumWithHttpMessagesAsync(string scenario, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 @@ -462,6 +624,9 @@ public partial interface IHeader /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task CustomRequestIdWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/Models/ErrorException.cs index 33fa32c989ed..c4022cde88a6 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Header/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/AutoRestHttpInfrastructureTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/AutoRestHttpInfrastructureTestService.cs index 12eea996143f..051bb2cb595d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/AutoRestHttpInfrastructureTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/AutoRestHttpInfrastructureTestService.cs @@ -113,6 +113,9 @@ public AutoRestHttpInfrastructureTestService(HttpClientHandler rootHandler, para /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestHttpInfrastructureTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -134,6 +137,9 @@ public AutoRestHttpInfrastructureTestService(Uri baseUri, params DelegatingHandl /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestHttpInfrastructureTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpClientFailure.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpClientFailure.cs index 3df1107bea40..e058a9035cb2 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpClientFailure.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpClientFailure.cs @@ -34,6 +34,9 @@ public partial class HttpClientFailure : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public HttpClientFailure(AutoRestHttpInfrastructureTestService client) { if (client == null) @@ -57,6 +60,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -172,6 +178,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -290,6 +299,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -415,6 +427,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -540,6 +555,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -665,6 +683,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -787,6 +808,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -902,6 +926,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1017,6 +1044,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1135,6 +1165,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1260,6 +1293,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1385,6 +1421,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1510,6 +1549,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1635,6 +1677,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1757,6 +1802,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1872,6 +1920,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1987,6 +2038,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2105,6 +2159,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2230,6 +2287,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2355,6 +2415,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2477,6 +2540,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2595,6 +2661,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2717,6 +2786,9 @@ public HttpClientFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpFailure.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpFailure.cs index 0aa6491baef6..7057db1bdc4b 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpFailure.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpFailure.cs @@ -34,6 +34,9 @@ public partial class HttpFailure : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public HttpFailure(AutoRestHttpInfrastructureTestService client) { if (client == null) @@ -57,6 +60,12 @@ public HttpFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -176,6 +185,12 @@ public HttpFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpRedirects.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpRedirects.cs index 01747fbf1dd2..8cc0ab9f8341 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpRedirects.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpRedirects.cs @@ -34,6 +34,9 @@ public partial class HttpRedirects : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public HttpRedirects(AutoRestHttpInfrastructureTestService client) { if (client == null) @@ -57,6 +60,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -171,6 +177,12 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -303,6 +315,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -417,6 +432,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -536,6 +554,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -657,6 +678,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -771,6 +795,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -890,6 +917,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1016,6 +1046,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1137,6 +1170,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1251,6 +1287,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1368,6 +1407,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1492,6 +1534,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1616,6 +1661,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1740,6 +1788,9 @@ public HttpRedirects(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpRetry.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpRetry.cs index 6fe19ef0d1e2..e4726c8808c7 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpRetry.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpRetry.cs @@ -34,6 +34,9 @@ public partial class HttpRetry : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public HttpRetry(AutoRestHttpInfrastructureTestService client) { if (client == null) @@ -57,6 +60,9 @@ public HttpRetry(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -161,6 +167,9 @@ public HttpRetry(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -272,6 +281,9 @@ public HttpRetry(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -380,6 +392,9 @@ public HttpRetry(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -484,6 +499,9 @@ public HttpRetry(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -595,6 +613,9 @@ public HttpRetry(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -706,6 +727,9 @@ public HttpRetry(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -817,6 +841,9 @@ public HttpRetry(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpServerFailure.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpServerFailure.cs index 425c90bf3f14..295da09b2de8 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpServerFailure.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpServerFailure.cs @@ -34,6 +34,9 @@ public partial class HttpServerFailure : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public HttpServerFailure(AutoRestHttpInfrastructureTestService client) { if (client == null) @@ -57,6 +60,9 @@ public HttpServerFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -172,6 +178,9 @@ public HttpServerFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -290,6 +299,9 @@ public HttpServerFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -415,6 +427,9 @@ public HttpServerFailure(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpSuccess.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpSuccess.cs index 9cef95254226..79486166dd2d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpSuccess.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/HttpSuccess.cs @@ -34,6 +34,9 @@ public partial class HttpSuccess : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public HttpSuccess(AutoRestHttpInfrastructureTestService client) { if (client == null) @@ -57,6 +60,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -158,6 +164,12 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -280,6 +292,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -391,6 +406,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -502,6 +520,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -613,6 +634,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -724,6 +748,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -835,6 +862,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -946,6 +976,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1057,6 +1090,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1168,6 +1204,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1279,6 +1318,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1387,6 +1429,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1491,6 +1536,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1602,6 +1650,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1713,6 +1764,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1824,6 +1878,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1932,6 +1989,9 @@ public HttpSuccess(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpClientFailure.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpClientFailure.cs index 211773c07b8b..11a4640a459c 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpClientFailure.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpClientFailure.cs @@ -31,6 +31,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head400WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 400 status code - should be represented in the client as an @@ -42,6 +45,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Get400WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 400 status code - should be represented in the client as an @@ -56,6 +62,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Put400WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 400 status code - should be represented in the client as an @@ -70,6 +79,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Patch400WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 400 status code - should be represented in the client as an @@ -84,6 +96,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post400WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 400 status code - should be represented in the client as an @@ -98,6 +113,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Delete400WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 401 status code - should be represented in the client as an @@ -109,6 +127,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head401WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 402 status code - should be represented in the client as an @@ -120,6 +141,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Get402WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 403 status code - should be represented in the client as an @@ -131,6 +155,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Get403WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 404 status code - should be represented in the client as an @@ -145,6 +172,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Put404WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 405 status code - should be represented in the client as an @@ -159,6 +189,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Patch405WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 406 status code - should be represented in the client as an @@ -173,6 +206,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post406WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 407 status code - should be represented in the client as an @@ -187,6 +223,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Delete407WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 409 status code - should be represented in the client as an @@ -201,6 +240,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Put409WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 410 status code - should be represented in the client as an @@ -212,6 +254,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head410WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 411 status code - should be represented in the client as an @@ -223,6 +268,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Get411WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 412 status code - should be represented in the client as an @@ -234,6 +282,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Get412WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 413 status code - should be represented in the client as an @@ -248,6 +299,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Put413WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 414 status code - should be represented in the client as an @@ -262,6 +316,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Patch414WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 415 status code - should be represented in the client as an @@ -276,6 +333,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post415WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 416 status code - should be represented in the client as an @@ -287,6 +347,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Get416WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 417 status code - should be represented in the client as an @@ -301,6 +364,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Delete417WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 429 status code - should be represented in the client as an @@ -312,6 +378,9 @@ public partial interface IHttpClientFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head429WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpFailure.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpFailure.cs index 119abe0130a6..afdaf191a94f 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpFailure.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpFailure.cs @@ -30,6 +30,12 @@ public partial interface IHttpFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetEmptyErrorWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get empty error form server @@ -40,6 +46,12 @@ public partial interface IHttpFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> GetNoModelErrorWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpRedirects.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpRedirects.cs index 7ecbf1546481..ac4e6bddea62 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpRedirects.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpRedirects.cs @@ -30,6 +30,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head300WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 300 status code and redirect to /http/success/200 @@ -40,6 +43,12 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task,HttpRedirectsGet300Headers>> Get300WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 301 status code and redirect to /http/success/200 @@ -50,6 +59,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head301WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 301 status code and redirect to /http/success/200 @@ -60,6 +72,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Get301WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put true Boolean value in request returns 301. This request @@ -75,6 +90,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Put301WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 302 status code and redirect to /http/success/200 @@ -85,6 +103,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head302WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 302 status code and redirect to /http/success/200 @@ -95,6 +116,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Get302WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Patch true Boolean value in request returns 302. This request @@ -110,6 +134,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Patch302WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Post true Boolean value in request returns 303. This request @@ -125,6 +152,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post303WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Redirect with 307, resulting in a 200 success @@ -135,6 +165,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head307WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Redirect get with 307, resulting in a 200 success @@ -145,6 +178,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Get307WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put redirected with 307, resulting in a 200 after redirect @@ -158,6 +194,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Put307WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Patch redirected with 307, resulting in a 200 after redirect @@ -171,6 +210,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Patch307WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Post redirected with 307, resulting in a 200 after redirect @@ -184,6 +226,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post307WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete redirected with 307, resulting in a 200 after redirect @@ -197,6 +242,9 @@ public partial interface IHttpRedirects /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Delete307WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpRetry.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpRetry.cs index 08ddbe29b86e..cb381fc43dfe 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpRetry.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpRetry.cs @@ -30,6 +30,9 @@ public partial interface IHttpRetry /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Head408WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 500 status code, then 200 after retry @@ -43,6 +46,9 @@ public partial interface IHttpRetry /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Put500WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 500 status code, then 200 after retry @@ -56,6 +62,9 @@ public partial interface IHttpRetry /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Patch500WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 502 status code, then 200 after retry @@ -66,6 +75,9 @@ public partial interface IHttpRetry /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Get502WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 503 status code, then 200 after retry @@ -79,6 +91,9 @@ public partial interface IHttpRetry /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Post503WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 503 status code, then 200 after retry @@ -92,6 +107,9 @@ public partial interface IHttpRetry /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Delete503WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 504 status code, then 200 after retry @@ -105,6 +123,9 @@ public partial interface IHttpRetry /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Put504WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 504 status code, then 200 after retry @@ -118,6 +139,9 @@ public partial interface IHttpRetry /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Patch504WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpServerFailure.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpServerFailure.cs index 161338f3120b..7e4b760c8686 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpServerFailure.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpServerFailure.cs @@ -31,6 +31,9 @@ public partial interface IHttpServerFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Head501WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 501 status code - should be represented in the client as an @@ -42,6 +45,9 @@ public partial interface IHttpServerFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Get501WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 505 status code - should be represented in the client as an @@ -56,6 +62,9 @@ public partial interface IHttpServerFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Post505WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 505 status code - should be represented in the client as an @@ -70,6 +79,9 @@ public partial interface IHttpServerFailure /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> Delete505WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpSuccess.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpSuccess.cs index ed593fd2e536..95f50347c05b 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpSuccess.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IHttpSuccess.cs @@ -30,6 +30,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Head200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get 200 success @@ -40,6 +43,12 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put boolean value true returning 200 success @@ -53,6 +62,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Put200WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Patch true Boolean value in request returning 200 @@ -66,6 +78,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Patch200WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Post bollean value true in request that returns a 200 @@ -79,6 +94,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Post200WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete simple boolean value true returns 200 @@ -92,6 +110,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Delete200WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put true Boolean value in request returns 201 @@ -105,6 +126,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Put201WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Post true Boolean value in request returns 201 (Created) @@ -118,6 +142,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Post201WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put true Boolean value in request returns 202 (Accepted) @@ -131,6 +158,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Put202WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Patch true Boolean value in request returns 202 @@ -144,6 +174,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Patch202WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Post true Boolean value in request returns 202 (Accepted) @@ -157,6 +190,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Post202WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete true Boolean value in request returns 202 (accepted) @@ -170,6 +206,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Delete202WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 204 status code if successful @@ -180,6 +219,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Head204WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Put true Boolean value in request returns 204 (no content) @@ -193,6 +235,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Put204WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Patch true Boolean value in request returns 204 (no content) @@ -206,6 +251,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Patch204WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Post true Boolean value in request returns 204 (no content) @@ -219,6 +267,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Post204WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete true Boolean value in request returns 204 (no content) @@ -232,6 +283,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Delete204WithHttpMessagesAsync(bool? booleanValue = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Return 404 status code @@ -242,6 +296,9 @@ public partial interface IHttpSuccess /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Head404WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IMultipleResponses.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IMultipleResponses.cs index 70990d4ce4f4..2db1cb53fb16 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IMultipleResponses.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/IMultipleResponses.cs @@ -30,6 +30,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200Model204NoModelDefaultError200ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 204 response with no payload @@ -40,6 +46,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200Model204NoModelDefaultError204ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 201 response with valid payload: {'statusCode': '201'} @@ -50,6 +62,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200Model204NoModelDefaultError201InvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 202 response with no payload: @@ -60,6 +78,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200Model204NoModelDefaultError202NoneWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 400 response with valid error payload: {'status': 400, @@ -71,6 +95,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200Model204NoModelDefaultError400ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with valid payload: {'statusCode': '200'} @@ -81,6 +111,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200Model201ModelDefaultError200ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 201 response with valid payload: {'statusCode': '201', @@ -92,6 +128,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200Model201ModelDefaultError201ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 400 response with valid payload: {'code': '400', 'message': @@ -103,6 +145,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200Model201ModelDefaultError400ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with valid payload: {'statusCode': '200'} @@ -113,6 +161,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200ModelA201ModelC404ModelDDefaultError200ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with valid payload: {'httpCode': '201'} @@ -123,6 +177,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200ModelA201ModelC404ModelDDefaultError201ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with valid payload: {'httpStatusCode': '404'} @@ -133,6 +193,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200ModelA201ModelC404ModelDDefaultError404ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 400 response with valid payload: {'code': '400', 'message': @@ -144,6 +210,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200ModelA201ModelC404ModelDDefaultError400ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 202 response with no payload @@ -154,6 +226,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Get202None204NoneDefaultError202NoneWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 204 response with no payload @@ -164,6 +239,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Get202None204NoneDefaultError204NoneWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 400 response with valid payload: {'code': '400', 'message': @@ -175,6 +253,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Get202None204NoneDefaultError400ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 202 response with an unexpected payload {'property': @@ -186,6 +267,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Get202None204NoneDefaultNone202InvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 204 response with no payload @@ -196,6 +280,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Get202None204NoneDefaultNone204NoneWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 400 response with no payload @@ -206,6 +293,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Get202None204NoneDefaultNone400NoneWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 400 response with an unexpected payload {'property': @@ -217,6 +307,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task Get202None204NoneDefaultNone400InvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with valid payload: {'statusCode': '200'} @@ -227,6 +320,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> GetDefaultModelA200ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with no payload @@ -237,6 +333,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> GetDefaultModelA200NoneWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 400 response with valid payload: {'statusCode': '400'} @@ -247,6 +346,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> GetDefaultModelA400ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 400 response with no payload @@ -257,6 +359,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> GetDefaultModelA400NoneWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with invalid payload: {'statusCode': '200'} @@ -267,6 +372,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetDefaultNone200InvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with no payload @@ -277,6 +385,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetDefaultNone200NoneWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 400 response with valid payload: {'statusCode': '400'} @@ -287,6 +398,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetDefaultNone400InvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 400 response with no payload @@ -297,6 +411,9 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetDefaultNone400NoneWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with no payload, when a payload is expected - @@ -308,6 +425,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200ModelA200NoneWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with payload {'statusCode': '200'} @@ -318,6 +441,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200ModelA200ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with invalid payload {'statusCodeInvalid': @@ -329,6 +458,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200ModelA200InvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 400 response with no payload client should treat as an http @@ -340,6 +475,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200ModelA400NoneWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with payload {'statusCode': '400'} @@ -350,6 +491,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200ModelA400ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 200 response with invalid payload {'statusCodeInvalid': @@ -361,6 +508,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200ModelA400InvalidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Send a 202 response with payload {'statusCode': '202'} @@ -371,6 +524,12 @@ public partial interface IMultipleResponses /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// Task> Get200ModelA202ValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/Models/ErrorException.cs index 8230e0b04dbd..87b92f8d2392 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/Models/MyException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/Models/MyException.cs index 2b16eca18ba3..9b5127dcb2eb 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/Models/MyException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/Models/MyException.cs @@ -81,6 +81,9 @@ protected MyException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/MultipleResponses.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/MultipleResponses.cs index e00b6bc05310..6101aab0f58f 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/MultipleResponses.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Http/MultipleResponses.cs @@ -34,6 +34,9 @@ public partial class MultipleResponses : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public MultipleResponses(AutoRestHttpInfrastructureTestService client) { if (client == null) @@ -57,6 +60,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -176,6 +185,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -295,6 +310,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -414,6 +435,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -534,6 +561,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -653,6 +686,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -791,6 +830,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -929,6 +974,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1066,6 +1117,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1221,6 +1278,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1376,6 +1439,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1532,6 +1601,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1687,6 +1762,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1788,6 +1866,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1890,6 +1971,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1991,6 +2075,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2080,6 +2167,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2169,6 +2259,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2258,6 +2351,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2347,6 +2443,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2462,6 +2561,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2577,6 +2679,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2692,6 +2797,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2807,6 +2915,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2896,6 +3007,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2985,6 +3099,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3074,6 +3191,9 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3164,6 +3284,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3271,6 +3397,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3378,6 +3510,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3486,6 +3624,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3593,6 +3737,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3700,6 +3850,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -3807,6 +3963,12 @@ public MultipleResponses(AutoRestHttpInfrastructureTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/AutoRestResourceFlatteningTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/AutoRestResourceFlatteningTestService.cs index 507c54acd120..4b96d5a686a9 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/AutoRestResourceFlatteningTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/AutoRestResourceFlatteningTestService.cs @@ -78,6 +78,9 @@ public AutoRestResourceFlatteningTestService(HttpClientHandler rootHandler, para /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestResourceFlatteningTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -99,6 +102,9 @@ public AutoRestResourceFlatteningTestService(Uri baseUri, params DelegatingHandl /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestResourceFlatteningTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -159,6 +165,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -267,6 +276,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -389,6 +404,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -497,6 +515,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -619,6 +643,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -727,6 +754,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -849,6 +882,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -996,6 +1035,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1143,6 +1191,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/BaseProduct.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/BaseProduct.cs index 3615d5892201..9d1e0f232978 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/BaseProduct.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/BaseProduct.cs @@ -50,8 +50,11 @@ public BaseProduct() { } public string Description { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (ProductId == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/ErrorException.cs index 11dd520d87e7..4a5615863449 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/FlattenParameterGroup.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/FlattenParameterGroup.cs index fac4cd5c66e3..71332d389763 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/FlattenParameterGroup.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/FlattenParameterGroup.cs @@ -79,8 +79,11 @@ public FlattenParameterGroup() { } public string Odatavalue { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Name == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/SimpleProduct.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/SimpleProduct.cs index 4ae8f66017f6..eaf945c137c1 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/SimpleProduct.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ModelFlattening/Models/SimpleProduct.cs @@ -69,8 +69,11 @@ static SimpleProduct() public static string Capacity { get; private set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/AutoRestParameterFlattening.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/AutoRestParameterFlattening.cs index c4dbe12dfcbb..84d6f9330afe 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/AutoRestParameterFlattening.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/AutoRestParameterFlattening.cs @@ -83,6 +83,9 @@ public AutoRestParameterFlattening(HttpClientHandler rootHandler, params Delegat /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestParameterFlattening(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ public AutoRestParameterFlattening(Uri baseUri, params DelegatingHandler[] handl /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestParameterFlattening(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/AvailabilitySets.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/AvailabilitySets.cs index 119563378110..23dda14e7397 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/AvailabilitySets.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/AvailabilitySets.cs @@ -34,6 +34,9 @@ public partial class AvailabilitySets : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public AvailabilitySets(AutoRestParameterFlattening client) { if (client == null) @@ -65,6 +68,12 @@ public AvailabilitySets(AutoRestParameterFlattening client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/IAvailabilitySets.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/IAvailabilitySets.cs index 60153c9d7ec2..d3f753e76801 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/IAvailabilitySets.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/IAvailabilitySets.cs @@ -38,6 +38,12 @@ public partial interface IAvailabilitySets /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task UpdateWithHttpMessagesAsync(string resourceGroupName, string avset, IDictionary tags, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/Models/AvailabilitySetUpdateParameters.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/Models/AvailabilitySetUpdateParameters.cs index d8568b90397e..98e8f89f6f93 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/Models/AvailabilitySetUpdateParameters.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/ParameterFlattening/Models/AvailabilitySetUpdateParameters.cs @@ -38,8 +38,11 @@ public AvailabilitySetUpdateParameters(IDictionary tags) public IDictionary Tags { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Tags == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Report/AutoRestReportService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Report/AutoRestReportService.cs index d111bdb5dc62..4294cc68ebb2 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Report/AutoRestReportService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Report/AutoRestReportService.cs @@ -78,6 +78,9 @@ public AutoRestReportService(HttpClientHandler rootHandler, params DelegatingHan /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestReportService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -99,6 +102,9 @@ public AutoRestReportService(Uri baseUri, params DelegatingHandler[] handlers) : /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestReportService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -154,6 +160,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Report/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Report/Models/ErrorException.cs index 1f52945fee29..d89b9b58c1a1 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Report/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Report/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/AutoRestRequiredOptionalTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/AutoRestRequiredOptionalTestService.cs index 0ef0cd9fcd95..05050929c0ed 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/AutoRestRequiredOptionalTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/AutoRestRequiredOptionalTestService.cs @@ -103,6 +103,9 @@ public AutoRestRequiredOptionalTestService(HttpClientHandler rootHandler, params /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestRequiredOptionalTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -124,6 +127,9 @@ public AutoRestRequiredOptionalTestService(Uri baseUri, params DelegatingHandler /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestRequiredOptionalTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/ExplicitModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/ExplicitModel.cs index 117742e60f65..25753a1c64c2 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/ExplicitModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/ExplicitModel.cs @@ -34,6 +34,9 @@ public partial class ExplicitModel : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public ExplicitModel(AutoRestRequiredOptionalTestService client) { if (client == null) @@ -60,6 +63,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -181,6 +187,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -293,6 +302,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -420,6 +432,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -534,6 +549,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -658,6 +676,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -771,6 +792,12 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -899,6 +926,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1011,6 +1041,12 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1145,6 +1181,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1262,6 +1301,12 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1393,6 +1438,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1506,6 +1554,12 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1638,6 +1692,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1754,6 +1811,12 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1892,6 +1955,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2013,6 +2079,12 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2141,6 +2213,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2253,6 +2328,12 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2387,6 +2468,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2504,6 +2588,12 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2635,6 +2725,9 @@ public ExplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/IExplicitModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/IExplicitModel.cs index e7d09a397f59..347adf9a52ce 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/IExplicitModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/IExplicitModel.cs @@ -33,6 +33,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostRequiredIntegerParameterWithHttpMessagesAsync(int bodyParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly optional integer. Please put null. @@ -45,6 +48,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalIntegerParameterWithHttpMessagesAsync(int? bodyParameter = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly required integer. Please put a valid int-wrapper @@ -59,6 +65,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostRequiredIntegerPropertyWithHttpMessagesAsync(int value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly optional integer. Please put a valid int-wrapper @@ -72,6 +81,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalIntegerPropertyWithHttpMessagesAsync(int? value = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly required integer. Please put a header @@ -86,6 +98,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> PostRequiredIntegerHeaderWithHttpMessagesAsync(int headerParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly optional integer. Please put a header @@ -99,6 +114,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalIntegerHeaderWithHttpMessagesAsync(int? headerParameter = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly required string. Please put null and the client @@ -112,6 +130,12 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> PostRequiredStringParameterWithHttpMessagesAsync(string bodyParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly optional string. Please put null. @@ -124,6 +148,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalStringParameterWithHttpMessagesAsync(string bodyParameter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly required string. Please put a valid string-wrapper @@ -138,6 +165,12 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> PostRequiredStringPropertyWithHttpMessagesAsync(string value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly optional integer. Please put a valid @@ -151,6 +184,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalStringPropertyWithHttpMessagesAsync(string value = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly required string. Please put a header @@ -165,6 +201,12 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> PostRequiredStringHeaderWithHttpMessagesAsync(string headerParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly optional string. Please put a header @@ -178,6 +220,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalStringHeaderWithHttpMessagesAsync(string bodyParameter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly required complex object. Please put null and the @@ -191,6 +236,12 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> PostRequiredClassParameterWithHttpMessagesAsync(Product bodyParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly optional complex object. Please put null. @@ -203,6 +254,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalClassParameterWithHttpMessagesAsync(Product bodyParameter = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly required complex object. Please put a valid @@ -217,6 +271,12 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> PostRequiredClassPropertyWithHttpMessagesAsync(Product value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly optional complex object. Please put a valid @@ -230,6 +290,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalClassPropertyWithHttpMessagesAsync(Product value = default(Product), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly required array. Please put null and the client @@ -243,6 +306,12 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> PostRequiredArrayParameterWithHttpMessagesAsync(IList bodyParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly optional array. Please put null. @@ -255,6 +324,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalArrayParameterWithHttpMessagesAsync(IList bodyParameter = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly required array. Please put a valid array-wrapper @@ -269,6 +341,12 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> PostRequiredArrayPropertyWithHttpMessagesAsync(IList value, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly optional array. Please put a valid array-wrapper @@ -282,6 +360,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalArrayPropertyWithHttpMessagesAsync(IList value = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly required array. Please put a header @@ -296,6 +377,12 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> PostRequiredArrayHeaderWithHttpMessagesAsync(IList headerParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test explicitly optional integer. Please put a header @@ -309,6 +396,9 @@ public partial interface IExplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PostOptionalArrayHeaderWithHttpMessagesAsync(IList headerParameter = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/IImplicitModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/IImplicitModel.cs index 0ecf99cdf364..0830e4e0e270 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/IImplicitModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/IImplicitModel.cs @@ -32,6 +32,12 @@ public partial interface IImplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> GetRequiredPathWithHttpMessagesAsync(string pathParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test implicitly optional query parameter @@ -44,6 +50,9 @@ public partial interface IImplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutOptionalQueryWithHttpMessagesAsync(string queryParameter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test implicitly optional header parameter @@ -56,6 +65,9 @@ public partial interface IImplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutOptionalHeaderWithHttpMessagesAsync(string queryParameter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test implicitly optional body parameter @@ -68,6 +80,9 @@ public partial interface IImplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task PutOptionalBodyWithHttpMessagesAsync(string bodyParameter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test implicitly required path parameter @@ -78,6 +93,12 @@ public partial interface IImplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> GetRequiredGlobalPathWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test implicitly required query parameter @@ -88,6 +109,12 @@ public partial interface IImplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task> GetRequiredGlobalQueryWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Test implicitly optional query parameter @@ -98,6 +125,9 @@ public partial interface IImplicitModel /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task> GetOptionalGlobalQueryWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/ImplicitModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/ImplicitModel.cs index 52a2bd5e9c8a..baf188fddf6f 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/ImplicitModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/ImplicitModel.cs @@ -34,6 +34,9 @@ public partial class ImplicitModel : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public ImplicitModel(AutoRestRequiredOptionalTestService client) { if (client == null) @@ -59,6 +62,12 @@ public ImplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -182,6 +191,9 @@ public ImplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -295,6 +307,9 @@ public ImplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -407,6 +422,9 @@ public ImplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -515,6 +533,12 @@ public ImplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -635,6 +659,12 @@ public ImplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -763,6 +793,9 @@ public ImplicitModel(AutoRestRequiredOptionalTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ArrayWrapper.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ArrayWrapper.cs index 101d3e588f27..ea6618a20d8d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ArrayWrapper.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ArrayWrapper.cs @@ -36,8 +36,11 @@ public ArrayWrapper(IList value) public IList Value { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Value == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ClassOptionalWrapper.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ClassOptionalWrapper.cs index 32fef1670243..f57839eb09a0 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ClassOptionalWrapper.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ClassOptionalWrapper.cs @@ -36,8 +36,11 @@ public ClassOptionalWrapper() { } public Product Value { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (this.Value != null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ClassWrapper.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ClassWrapper.cs index b68593278a66..bda5b8870396 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ClassWrapper.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ClassWrapper.cs @@ -36,8 +36,11 @@ public ClassWrapper(Product value) public Product Value { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Value == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ErrorException.cs index 5ffc54e299a0..336be4fb028d 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/IntWrapper.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/IntWrapper.cs index 6a2e200ea43f..7691fcb00779 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/IntWrapper.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/IntWrapper.cs @@ -36,8 +36,11 @@ public IntWrapper(int value) public int Value { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { //Nothing to validate diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/Product.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/Product.cs index 8388def1672f..4003a00510ba 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/Product.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/Product.cs @@ -42,8 +42,11 @@ public Product() { } public string Name { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { //Nothing to validate diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/StringWrapper.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/StringWrapper.cs index 1c0d966bd6c8..92dcba1f1846 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/StringWrapper.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/RequiredOptional/Models/StringWrapper.cs @@ -36,8 +36,11 @@ public StringWrapper(string value) public string Value { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Value == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/AutoRestUrlTestService.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/AutoRestUrlTestService.cs index 3b0b79137a87..c3aef6201b2c 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/AutoRestUrlTestService.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/AutoRestUrlTestService.cs @@ -103,6 +103,9 @@ public AutoRestUrlTestService(HttpClientHandler rootHandler, params DelegatingHa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestUrlTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -124,6 +127,9 @@ public AutoRestUrlTestService(Uri baseUri, params DelegatingHandler[] handlers) /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestUrlTestService(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IPathItems.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IPathItems.cs index 80262fd87e66..b02eb63035c5 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IPathItems.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IPathItems.cs @@ -48,6 +48,12 @@ public partial interface IPathItems /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetAllWithValuesWithHttpMessagesAsync(string localStringPath, string pathItemStringPath, string localStringQuery = default(string), string pathItemStringQuery = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// send globalStringPath='globalStringPath', @@ -75,6 +81,12 @@ public partial interface IPathItems /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetGlobalQueryNullWithHttpMessagesAsync(string localStringPath, string pathItemStringPath, string localStringQuery = default(string), string pathItemStringQuery = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// send globalStringPath=globalStringPath, @@ -101,6 +113,12 @@ public partial interface IPathItems /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetGlobalAndLocalQueryNullWithHttpMessagesAsync(string localStringPath, string pathItemStringPath, string localStringQuery = default(string), string pathItemStringQuery = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// send globalStringPath='globalStringPath', @@ -127,6 +145,12 @@ public partial interface IPathItems /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task GetLocalPathItemQueryNullWithHttpMessagesAsync(string localStringPath, string pathItemStringPath, string localStringQuery = default(string), string pathItemStringQuery = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IPaths.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IPaths.cs index d8f9e2c76157..138b1527e8c7 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IPaths.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IPaths.cs @@ -30,6 +30,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetBooleanTrueWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get false Boolean value on path @@ -40,6 +43,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetBooleanFalseWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '1000000' integer value @@ -50,6 +56,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetIntOneMillionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '-1000000' integer value @@ -60,6 +69,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetIntNegativeOneMillionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '10000000000' 64 bit integer value @@ -70,6 +82,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetTenBillionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '-10000000000' 64 bit integer value @@ -80,6 +95,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetNegativeTenBillionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '1.034E+20' numeric value @@ -90,6 +108,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task FloatScientificPositiveWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '-1.034E-20' numeric value @@ -100,6 +121,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task FloatScientificNegativeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '9999999.999' numeric value @@ -110,6 +134,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DoubleDecimalPositiveWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '-9999999.999' numeric value @@ -120,6 +147,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DoubleDecimalNegativeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value @@ -130,6 +160,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task StringUnicodeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get 'begin!*'();:@ &=+$,/?#[]end @@ -140,6 +173,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task StringUrlEncodedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '' @@ -150,6 +186,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task StringEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null (should throw) @@ -163,6 +202,12 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task StringNullWithHttpMessagesAsync(string stringPath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get using uri with 'green color' in path parameter @@ -177,6 +222,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task EnumValidWithHttpMessagesAsync(UriColor enumPath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null (should throw on the client before the request is sent on @@ -192,6 +240,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task EnumNullWithHttpMessagesAsync(UriColor enumPath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array @@ -205,6 +256,12 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ByteMultiByteWithHttpMessagesAsync(byte[] bytePath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '' as byte array @@ -215,6 +272,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task ByteEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null as byte array (should throw) @@ -228,6 +288,12 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ByteNullWithHttpMessagesAsync(byte[] bytePath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '2012-01-01' as date @@ -238,6 +304,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DateValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null as date - this should throw or be unusable on the client @@ -252,6 +321,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DateNullWithHttpMessagesAsync(DateTime datePath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '2012-01-01T01:01:01Z' as date-time @@ -262,6 +334,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DateTimeValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null as date-time, should be disallowed or throw depending on @@ -276,6 +351,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DateTimeNullWithHttpMessagesAsync(DateTime dateTimePath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get 'lorem' encoded value as 'bG9yZW0' (base64url) @@ -289,6 +367,12 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task Base64UrlWithHttpMessagesAsync(byte[] base64UrlPath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of string ['ArrayPath1', 'begin!*'();:@ @@ -304,6 +388,12 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task ArrayCsvInPathWithHttpMessagesAsync(IList arrayPath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get the date 2016-04-13 encoded value as '1460505600' (Unix time) @@ -317,6 +407,9 @@ public partial interface IPaths /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task UnixTimeUrlWithHttpMessagesAsync(DateTime unixTimeUrlPath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IQueries.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IQueries.cs index 7799e14a37ca..304bc98230f5 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IQueries.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/IQueries.cs @@ -30,6 +30,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetBooleanTrueWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get false Boolean value on path @@ -40,6 +43,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetBooleanFalseWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null Boolean value on query (query string should be absent) @@ -53,6 +59,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetBooleanNullWithHttpMessagesAsync(bool? boolQuery = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '1000000' integer value @@ -63,6 +72,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetIntOneMillionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '-1000000' integer value @@ -73,6 +85,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetIntNegativeOneMillionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null integer value (no query parameter) @@ -86,6 +101,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetIntNullWithHttpMessagesAsync(int? intQuery = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '10000000000' 64 bit integer value @@ -96,6 +114,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetTenBillionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '-10000000000' 64 bit integer value @@ -106,6 +127,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetNegativeTenBillionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get 'null 64 bit integer value (no query param in uri) @@ -119,6 +143,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetLongNullWithHttpMessagesAsync(long? longQuery = default(long?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '1.034E+20' numeric value @@ -129,6 +156,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task FloatScientificPositiveWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '-1.034E-20' numeric value @@ -139,6 +169,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task FloatScientificNegativeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null numeric value (no query parameter) @@ -152,6 +185,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task FloatNullWithHttpMessagesAsync(double? floatQuery = default(double?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '9999999.999' numeric value @@ -162,6 +198,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DoubleDecimalPositiveWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '-9999999.999' numeric value @@ -172,6 +211,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DoubleDecimalNegativeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null numeric value (no query parameter) @@ -185,6 +227,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DoubleNullWithHttpMessagesAsync(double? doubleQuery = default(double?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value @@ -195,6 +240,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task StringUnicodeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get 'begin!*'();:@ &=+$,/?#[]end @@ -205,6 +253,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task StringUrlEncodedWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '' @@ -215,6 +266,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task StringEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null (no query parameter in url) @@ -228,6 +282,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task StringNullWithHttpMessagesAsync(string stringQuery = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get using uri with query parameter 'green color' @@ -242,6 +299,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task EnumValidWithHttpMessagesAsync(UriColor? enumQuery = default(UriColor?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null (no query parameter in url) @@ -256,6 +316,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task EnumNullWithHttpMessagesAsync(UriColor? enumQuery = default(UriColor?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array @@ -269,6 +332,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task ByteMultiByteWithHttpMessagesAsync(byte[] byteQuery = default(byte[]), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '' as byte array @@ -279,6 +345,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task ByteEmptyWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null as byte array (no query parameters in uri) @@ -292,6 +361,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task ByteNullWithHttpMessagesAsync(byte[] byteQuery = default(byte[]), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '2012-01-01' as date @@ -302,6 +374,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DateValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null as date - this should result in no query parameters in uri @@ -315,6 +390,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DateNullWithHttpMessagesAsync(DateTime? dateQuery = default(DateTime?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get '2012-01-01T01:01:01Z' as date-time @@ -325,6 +403,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DateTimeValidWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get null as date-time, should result in no query parameters in uri @@ -338,6 +419,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task DateTimeNullWithHttpMessagesAsync(DateTime? dateTimeQuery = default(DateTime?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of string ['ArrayQuery1', 'begin!*'();:@ @@ -353,6 +437,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task ArrayStringCsvValidWithHttpMessagesAsync(IList arrayQuery = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a null array of string using the csv-array format @@ -366,6 +453,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task ArrayStringCsvNullWithHttpMessagesAsync(IList arrayQuery = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an empty array [] of string using the csv-array format @@ -379,6 +469,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task ArrayStringCsvEmptyWithHttpMessagesAsync(IList arrayQuery = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of string ['ArrayQuery1', 'begin!*'();:@ @@ -394,6 +487,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task ArrayStringSsvValidWithHttpMessagesAsync(IList arrayQuery = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of string ['ArrayQuery1', 'begin!*'();:@ @@ -409,6 +505,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task ArrayStringTsvValidWithHttpMessagesAsync(IList arrayQuery = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an array of string ['ArrayQuery1', 'begin!*'();:@ @@ -424,6 +523,9 @@ public partial interface IQueries /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task ArrayStringPipesValidWithHttpMessagesAsync(IList arrayQuery = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Models/ErrorException.cs index d74e11982891..1b8ee0e27bbd 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/PathItems.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/PathItems.cs index 1aa9ea7ec486..4b4e39af6c5e 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/PathItems.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/PathItems.cs @@ -34,6 +34,9 @@ public partial class PathItems : IServiceOperations, IPa /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public PathItems(AutoRestUrlTestService client) { if (client == null) @@ -73,6 +76,12 @@ public PathItems(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -226,6 +235,12 @@ public PathItems(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -378,6 +393,12 @@ public PathItems(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -530,6 +551,12 @@ public PathItems(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Paths.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Paths.cs index 3892f728ba11..b1ed069d76d3 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Paths.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Paths.cs @@ -34,6 +34,9 @@ public partial class Paths : IServiceOperations, IPaths /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Paths(AutoRestUrlTestService client) { if (client == null) @@ -57,6 +60,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -161,6 +167,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -265,6 +274,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -369,6 +381,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -473,6 +488,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -577,6 +595,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -681,6 +702,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -785,6 +809,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -889,6 +916,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -993,6 +1023,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1097,6 +1130,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1201,6 +1237,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1305,6 +1344,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1412,6 +1454,12 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1523,6 +1571,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1630,6 +1681,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1736,6 +1790,12 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1843,6 +1903,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1950,6 +2013,12 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2057,6 +2126,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2165,6 +2237,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2268,6 +2343,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2376,6 +2454,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2482,6 +2563,12 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2594,6 +2681,12 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2704,6 +2797,9 @@ public Paths(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Queries.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Queries.cs index 67b122ad691a..63bcb8e8f023 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Queries.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Url/Queries.cs @@ -34,6 +34,9 @@ public partial class Queries : IServiceOperations, IQuer /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Queries(AutoRestUrlTestService client) { if (client == null) @@ -57,6 +60,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -166,6 +172,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -278,6 +287,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -389,6 +401,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -498,6 +513,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -610,6 +628,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -721,6 +742,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -830,6 +854,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -942,6 +969,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1053,6 +1083,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1162,6 +1195,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1274,6 +1310,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1385,6 +1424,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1494,6 +1536,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1606,6 +1651,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1717,6 +1765,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1829,6 +1880,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1941,6 +1995,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2056,6 +2113,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2171,6 +2231,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2286,6 +2349,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2400,6 +2466,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2511,6 +2580,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2626,6 +2698,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2737,6 +2812,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2849,6 +2927,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2960,6 +3041,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3072,6 +3156,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3188,6 +3275,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3302,6 +3392,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3416,6 +3509,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3532,6 +3628,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3648,6 +3747,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -3764,6 +3866,9 @@ public Queries(AutoRestUrlTestService client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/AutoRestValidationTest.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/AutoRestValidationTest.cs index 73459ebb7338..10084ec790a3 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/AutoRestValidationTest.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/AutoRestValidationTest.cs @@ -89,6 +89,9 @@ public AutoRestValidationTest(HttpClientHandler rootHandler, params DelegatingHa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestValidationTest(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -110,6 +113,9 @@ public AutoRestValidationTest(Uri baseUri, params DelegatingHandler[] handlers) /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public AutoRestValidationTest(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -171,6 +177,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -358,6 +373,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -545,6 +569,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -636,6 +663,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/Models/ErrorException.cs index d4233d317714..293b284ba92b 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/Models/Product.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/Models/Product.cs index e434110c5df7..89a58824b738 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/Models/Product.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/Validation/Models/Product.cs @@ -99,8 +99,11 @@ static Product() public static string ConstString { get; private set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Child == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/DateTimeOffset/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/DateTimeOffset/Models/ErrorException.cs index 82df25efe79f..3e0865f987bd 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/DateTimeOffset/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/DateTimeOffset/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/DateTimeOffset/SwaggerDateTimeOffsetClient.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/DateTimeOffset/SwaggerDateTimeOffsetClient.cs index 3bd502e2cd4a..6984eff4fedf 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/DateTimeOffset/SwaggerDateTimeOffsetClient.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/DateTimeOffset/SwaggerDateTimeOffsetClient.cs @@ -78,6 +78,9 @@ public SwaggerDateTimeOffsetClient(HttpClientHandler rootHandler, params Delegat /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SwaggerDateTimeOffsetClient(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -99,6 +102,9 @@ public SwaggerDateTimeOffsetClient(Uri baseUri, params DelegatingHandler[] handl /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SwaggerDateTimeOffsetClient(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -160,6 +166,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -301,6 +313,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -442,6 +460,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -583,6 +607,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/IPets.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/IPets.cs index 46d3f9aa0398..1ef5c28bb877 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/IPets.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/IPets.cs @@ -29,6 +29,9 @@ public partial interface IPets /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// Task GetWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/InternalClient.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/InternalClient.cs index b48d44a80b6c..a825802cbeea 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/InternalClient.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/InternalClient.cs @@ -83,6 +83,9 @@ internal InternalClient(HttpClientHandler rootHandler, params DelegatingHandler[ /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// internal InternalClient(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -104,6 +107,9 @@ internal InternalClient(Uri baseUri, params DelegatingHandler[] handlers) : this /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// internal InternalClient(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/Pets.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/Pets.cs index c546970f2483..21a439ec8e36 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/Pets.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Internal.Ctors/Pets.cs @@ -33,6 +33,9 @@ public partial class Pets : IServiceOperations, IPets /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public Pets(InternalClient client) { if (client == null) @@ -56,6 +59,9 @@ public Pets(InternalClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Polymorphic/Models/Error2Exception.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Polymorphic/Models/Error2Exception.cs index 02ba1374392c..d8253e4e8135 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Polymorphic/Models/Error2Exception.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Polymorphic/Models/Error2Exception.cs @@ -81,6 +81,9 @@ protected Error2Exception(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Polymorphic/PolymorphicAnimalStore.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Polymorphic/PolymorphicAnimalStore.cs index 86bf0ccd5653..7223c9928fc8 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Polymorphic/PolymorphicAnimalStore.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Polymorphic/PolymorphicAnimalStore.cs @@ -78,6 +78,9 @@ public PolymorphicAnimalStore(HttpClientHandler rootHandler, params DelegatingHa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public PolymorphicAnimalStore(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -99,6 +102,9 @@ public PolymorphicAnimalStore(Uri baseUri, params DelegatingHandler[] handlers) /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public PolymorphicAnimalStore(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -163,6 +169,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Primitives/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Primitives/Models/ErrorException.cs index d0b8eed0650a..494ecc6a7d28 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Primitives/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Primitives/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Primitives/SwaggerDataTypesClient.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Primitives/SwaggerDataTypesClient.cs index bc41c9c9bd81..0b8d18f61ea3 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Primitives/SwaggerDataTypesClient.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Primitives/SwaggerDataTypesClient.cs @@ -78,6 +78,9 @@ public SwaggerDataTypesClient(HttpClientHandler rootHandler, params DelegatingHa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SwaggerDataTypesClient(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -99,6 +102,9 @@ public SwaggerDataTypesClient(Uri baseUri, params DelegatingHandler[] handlers) /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SwaggerDataTypesClient(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -160,6 +166,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -301,6 +313,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -442,6 +460,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -583,6 +607,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.RecursiveTypes/Models/ErrorException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.RecursiveTypes/Models/ErrorException.cs index b2d308e0feba..d123813ef0c3 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.RecursiveTypes/Models/ErrorException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.RecursiveTypes/Models/ErrorException.cs @@ -81,6 +81,9 @@ protected ErrorException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.RecursiveTypes/RecursiveTypesAPI.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.RecursiveTypes/RecursiveTypesAPI.cs index ae58814c3bdb..021c8ee6abdd 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.RecursiveTypes/RecursiveTypesAPI.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.RecursiveTypes/RecursiveTypesAPI.cs @@ -78,6 +78,9 @@ public RecursiveTypesAPI(HttpClientHandler rootHandler, params DelegatingHandler /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public RecursiveTypesAPI(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -99,6 +102,9 @@ public RecursiveTypesAPI(Uri baseUri, params DelegatingHandler[] handlers) : thi /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public RecursiveTypesAPI(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -170,6 +176,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/ErrorModel.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/ErrorModel.cs index cf2f11b1b641..7c1217b0d2e5 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/ErrorModel.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/ErrorModel.cs @@ -42,8 +42,11 @@ public ErrorModel(int code, string message) public string Message { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Message == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/ErrorModelException.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/ErrorModelException.cs index d63ec3bc3a02..e37c836d1769 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/ErrorModelException.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/ErrorModelException.cs @@ -81,6 +81,9 @@ protected ErrorModelException(SerializationInfo info, StreamingContext context) /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/Pet.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/Pet.cs index 57c799ff0d08..20de96822b0e 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/Pet.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/Pet.cs @@ -54,8 +54,11 @@ public Pet() { } public string Tag { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Name == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/PetStyle.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/PetStyle.cs index 141e7cfcb870..01b8fbc57789 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/PetStyle.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/Models/PetStyle.cs @@ -36,8 +36,11 @@ public PetStyle(string name) public string Name { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Name == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/SequenceRequestResponseTest.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/SequenceRequestResponseTest.cs index 8548cb8d729d..e3ff0759cd80 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/SequenceRequestResponseTest.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/Mirror.Sequences/SequenceRequestResponseTest.cs @@ -79,6 +79,9 @@ public SequenceRequestResponseTest(HttpClientHandler rootHandler, params Delegat /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SequenceRequestResponseTest(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -100,6 +103,9 @@ public SequenceRequestResponseTest(Uri baseUri, params DelegatingHandler[] handl /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SequenceRequestResponseTest(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -158,6 +164,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -301,6 +316,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -434,6 +458,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/PetstoreV2/Models/Pet.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/PetstoreV2/Models/Pet.cs index 176ac348f759..4635bbfbb545 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/PetstoreV2/Models/Pet.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/PetstoreV2/Models/Pet.cs @@ -86,8 +86,11 @@ public Pet() { } public string Status { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Name == null) diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/PetstoreV2/SwaggerPetstoreV2.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/PetstoreV2/SwaggerPetstoreV2.cs index 9245c2c40a07..6d6c12815230 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Expected/PetstoreV2/SwaggerPetstoreV2.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Expected/PetstoreV2/SwaggerPetstoreV2.cs @@ -87,6 +87,9 @@ protected SwaggerPetstoreV2(HttpClientHandler rootHandler, params DelegatingHand /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected SwaggerPetstoreV2(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -108,6 +111,9 @@ protected SwaggerPetstoreV2(Uri baseUri, params DelegatingHandler[] handlers) : /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected SwaggerPetstoreV2(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -126,6 +132,9 @@ protected SwaggerPetstoreV2(Uri baseUri, HttpClientHandler rootHandler, params D /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SwaggerPetstoreV2(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -151,6 +160,9 @@ public SwaggerPetstoreV2(ServiceClientCredentials credentials, params Delegating /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SwaggerPetstoreV2(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -176,6 +188,9 @@ public SwaggerPetstoreV2(ServiceClientCredentials credentials, HttpClientHandler /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SwaggerPetstoreV2(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -209,6 +224,9 @@ public SwaggerPetstoreV2(Uri baseUri, ServiceClientCredentials credentials, para /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SwaggerPetstoreV2(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -276,6 +294,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -407,6 +434,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -521,6 +554,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -653,6 +695,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -784,6 +835,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -911,6 +968,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1046,6 +1109,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1153,6 +1219,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1269,6 +1341,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1398,6 +1479,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1533,6 +1623,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1645,6 +1741,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1754,6 +1856,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1863,6 +1971,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1975,6 +2089,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2124,6 +2247,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2222,6 +2348,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2348,6 +2483,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2464,6 +2605,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp/Templates/ExceptionTemplate.cshtml b/AutoRest/Generators/CSharp/CSharp/Templates/ExceptionTemplate.cshtml index 38e81fe27513..b046f411e7e8 100644 --- a/AutoRest/Generators/CSharp/CSharp/Templates/ExceptionTemplate.cshtml +++ b/AutoRest/Generators/CSharp/CSharp/Templates/ExceptionTemplate.cshtml @@ -78,6 +78,9 @@ namespace @(Settings.Namespace).Models /// /// Serialization info. /// Streaming context. + /// + /// Thrown when a required parameter is null + /// [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/AutoRest/Generators/CSharp/CSharp/Templates/MethodGroupInterfaceTemplate.cshtml b/AutoRest/Generators/CSharp/CSharp/Templates/MethodGroupInterfaceTemplate.cshtml index b61d2bc7d1c0..0ae7db520cc8 100644 --- a/AutoRest/Generators/CSharp/CSharp/Templates/MethodGroupInterfaceTemplate.cshtml +++ b/AutoRest/Generators/CSharp/CSharp/Templates/MethodGroupInterfaceTemplate.cshtml @@ -1,4 +1,5 @@ @using System +@using System.Linq; @using Microsoft.Rest.Generator.Utilities @inherits Microsoft.Rest.Generator.Template @Header("// ") @@ -44,6 +45,21 @@ namespace @Settings.Namespace @:/// @:/// The cancellation token. @:/// + @:/// + @:/// Thrown when the operation returned an invalid status code + @:/// + @if (method.Responses.Where(r => r.Value.Body != null).Any()) + { + @:/// + @:/// Thrown when unable to deserialize the response + @:/// + } + @if (method.ParameterTemplateModels.Where(p => !p.IsConstant && p.IsRequired && !p.Type.IsValueType()).Any()) + { + @:/// + @:/// Thrown when a required parameter is null + @:/// + } @:Task<@method.OperationResponseReturnTypeString> @(method.Name)WithHttpMessagesAsync(@(method.GetAsyncMethodParameterDeclaration(true))); } } diff --git a/AutoRest/Generators/CSharp/CSharp/Templates/MethodGroupTemplate.cshtml b/AutoRest/Generators/CSharp/CSharp/Templates/MethodGroupTemplate.cshtml index ab8b56e6d260..3d7ca7a8562d 100644 --- a/AutoRest/Generators/CSharp/CSharp/Templates/MethodGroupTemplate.cshtml +++ b/AutoRest/Generators/CSharp/CSharp/Templates/MethodGroupTemplate.cshtml @@ -33,6 +33,9 @@ namespace @Settings.Namespace /// /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// public @(Model.MethodGroupType)(@(Model.Name) client) { if (client == null) diff --git a/AutoRest/Generators/CSharp/CSharp/Templates/MethodTemplate.cshtml b/AutoRest/Generators/CSharp/CSharp/Templates/MethodTemplate.cshtml index 96077aaee3c8..bc9c4abc4708 100644 --- a/AutoRest/Generators/CSharp/CSharp/Templates/MethodTemplate.cshtml +++ b/AutoRest/Generators/CSharp/CSharp/Templates/MethodTemplate.cshtml @@ -28,6 +28,21 @@ /// /// The cancellation token. /// +/// +/// Thrown when the operation returned an invalid status code +/// +@if (Model.Responses.Where(r => r.Value.Body != null).Any()) +{ +@:/// +@:/// Thrown when unable to deserialize the response +@:/// +} +@if (Model.ParameterTemplateModels.Where(p => !p.IsConstant && p.IsRequired && !p.Type.IsValueType()).Any()) +{ +@:/// +@:/// Thrown when a required parameter is null +@:/// + } /// /// A response object containing the response body and response headers. /// diff --git a/AutoRest/Generators/CSharp/CSharp/Templates/ModelTemplate.cshtml b/AutoRest/Generators/CSharp/CSharp/Templates/ModelTemplate.cshtml index c9fa91236e94..de6f680d69b5 100644 --- a/AutoRest/Generators/CSharp/CSharp/Templates/ModelTemplate.cshtml +++ b/AutoRest/Generators/CSharp/CSharp/Templates/ModelTemplate.cshtml @@ -168,8 +168,11 @@ namespace @(Settings.Namespace).Models @if(@Model.ShouldValidateChain()) { @:/// - @:/// Validate the object. Throws ValidationException if validation fails. + @:/// Validate the object. @:/// + @:/// + @:/// Thrown if validation fails + @:/// @:public @Model.MethodQualifier void Validate() @:{ bool anythingToValidate = false; diff --git a/AutoRest/Generators/CSharp/CSharp/Templates/ServiceClientBodyTemplate.cshtml b/AutoRest/Generators/CSharp/CSharp/Templates/ServiceClientBodyTemplate.cshtml index 7561449c6c73..46bc213e0717 100644 --- a/AutoRest/Generators/CSharp/CSharp/Templates/ServiceClientBodyTemplate.cshtml +++ b/AutoRest/Generators/CSharp/CSharp/Templates/ServiceClientBodyTemplate.cshtml @@ -88,6 +88,9 @@ public JsonSerializerSettings DeserializationSettings { get; private set; } @:/// @:/// Optional. The delegating handlers to add to the http client pipeline. @:/// +@:/// +@:/// Thrown when a required parameter is null +@:/// @:@(Model.ContainsCredentials ? "protected" : Model.ConstructorVisibility) @(Model.Name)(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) @:{ @: if (baseUri == null) @@ -111,6 +114,9 @@ public JsonSerializerSettings DeserializationSettings { get; private set; } @:/// @:/// Optional. The delegating handlers to add to the http client pipeline. @:/// +@:/// +@:/// Thrown when a required parameter is null +@:/// @:@(Model.ContainsCredentials ? "protected" : Model.ConstructorVisibility) @(Model.Name)(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) @:{ @: if (baseUri == null) @@ -138,6 +144,9 @@ foreach (var param in parameters) @:/// @:/// Optional. The delegating handlers to add to the http client pipeline. @:/// +@:/// +@:/// Thrown when a required parameter is null +@:/// @:@(Model.ConstructorVisibility) @(Model.Name)(@(Model.RequiredConstructorParameters), params DelegatingHandler[] handlers) : this(handlers) @:{ foreach (var param in parameters) @@ -176,6 +185,9 @@ foreach (var param in parameters) @:/// @:/// Optional. The delegating handlers to add to the http client pipeline. @:/// +@:/// +@:/// Thrown when a required parameter is null +@:/// @:@(Model.ConstructorVisibility) @(Model.Name)(@(Model.RequiredConstructorParameters), HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) @:{ foreach (var param in parameters) @@ -216,6 +228,9 @@ foreach (var param in parameters) @:/// @:/// Optional. The delegating handlers to add to the http client pipeline. @:/// +@:/// +@:/// Thrown when a required parameter is null +@:/// @:@(Model.ConstructorVisibility) @(Model.Name)(Uri baseUri, @(Model.RequiredConstructorParameters), params DelegatingHandler[] handlers) : this(handlers) @:{ @: if (baseUri == null) @@ -265,6 +280,9 @@ foreach (var param in parameters) @:/// @:/// Optional. The delegating handlers to add to the http client pipeline. @:/// +@:/// +@:/// Thrown when a required parameter is null +@:/// @:@(Model.ConstructorVisibility) @(Model.Name)(Uri baseUri, @(Model.RequiredConstructorParameters), HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) @:{ @: if (baseUri == null) diff --git a/Samples/azure-storage/Azure.CSharp/IStorageAccountsOperations.cs b/Samples/azure-storage/Azure.CSharp/IStorageAccountsOperations.cs index 9befee3c73c9..009941a40654 100644 --- a/Samples/azure-storage/Azure.CSharp/IStorageAccountsOperations.cs +++ b/Samples/azure-storage/Azure.CSharp/IStorageAccountsOperations.cs @@ -29,6 +29,15 @@ public partial interface IStorageAccountsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task> CheckNameAvailabilityWithHttpMessagesAsync(StorageAccountCheckNameAvailabilityParameters accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Asynchronously creates a new storage account with the specified @@ -54,6 +63,15 @@ public partial interface IStorageAccountsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, StorageAccountCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Asynchronously creates a new storage account with the specified @@ -79,6 +97,15 @@ public partial interface IStorageAccountsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string accountName, StorageAccountCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes a storage account in Microsoft Azure. @@ -97,6 +124,12 @@ public partial interface IStorageAccountsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns the properties for the specified storage account including @@ -118,6 +151,15 @@ public partial interface IStorageAccountsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task> GetPropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Updates the account type or tags for a storage account. It can @@ -153,6 +195,15 @@ public partial interface IStorageAccountsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, StorageAccountUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Lists the access keys for the specified storage account. @@ -169,6 +220,15 @@ public partial interface IStorageAccountsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task> ListKeysWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Lists all the storage accounts available under the subscription. @@ -181,6 +241,15 @@ public partial interface IStorageAccountsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Lists all the storage accounts available under the given resource @@ -196,6 +265,15 @@ public partial interface IStorageAccountsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Regenerates the access keys for the specified storage account. @@ -218,6 +296,15 @@ public partial interface IStorageAccountsOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task> RegenerateKeyWithHttpMessagesAsync(string resourceGroupName, string accountName, StorageAccountRegenerateKeyParameters regenerateKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/Samples/azure-storage/Azure.CSharp/IUsageOperations.cs b/Samples/azure-storage/Azure.CSharp/IUsageOperations.cs index 42737e1107f1..2b55de9e50de 100644 --- a/Samples/azure-storage/Azure.CSharp/IUsageOperations.cs +++ b/Samples/azure-storage/Azure.CSharp/IUsageOperations.cs @@ -25,6 +25,15 @@ public partial interface IUsageOperations /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/Samples/azure-storage/Azure.CSharp/Models/CustomDomain.cs b/Samples/azure-storage/Azure.CSharp/Models/CustomDomain.cs index 5ada788894a5..230a851bc808 100644 --- a/Samples/azure-storage/Azure.CSharp/Models/CustomDomain.cs +++ b/Samples/azure-storage/Azure.CSharp/Models/CustomDomain.cs @@ -45,8 +45,11 @@ public CustomDomain() { } public bool? UseSubDomain { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Name == null) diff --git a/Samples/azure-storage/Azure.CSharp/Models/StorageAccount.cs b/Samples/azure-storage/Azure.CSharp/Models/StorageAccount.cs index 10213a935e43..dedd17fb0a30 100644 --- a/Samples/azure-storage/Azure.CSharp/Models/StorageAccount.cs +++ b/Samples/azure-storage/Azure.CSharp/Models/StorageAccount.cs @@ -34,8 +34,11 @@ public StorageAccount() { } public StorageAccountProperties Properties { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (this.Properties != null) diff --git a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountCheckNameAvailabilityParameters.cs b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountCheckNameAvailabilityParameters.cs index 9b2d92a2400d..685c8f58a741 100644 --- a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountCheckNameAvailabilityParameters.cs +++ b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountCheckNameAvailabilityParameters.cs @@ -38,8 +38,11 @@ public StorageAccountCheckNameAvailabilityParameters() { } public string Type { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Name == null) diff --git a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountCreateParameters.cs b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountCreateParameters.cs index 1c23f83ac300..182a1be67f7a 100644 --- a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountCreateParameters.cs +++ b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountCreateParameters.cs @@ -49,8 +49,11 @@ public StorageAccountCreateParameters() { } public StorageAccountPropertiesCreateParameters Properties { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Location == null) diff --git a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountProperties.cs b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountProperties.cs index 8282d7cc49c8..004cc5f93329 100644 --- a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountProperties.cs +++ b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountProperties.cs @@ -124,8 +124,11 @@ public StorageAccountProperties() { } public Endpoints SecondaryEndpoints { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (this.CustomDomain != null) diff --git a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountPropertiesCreateParameters.cs b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountPropertiesCreateParameters.cs index 0c2a98e26f0b..8cf587ba02d7 100644 --- a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountPropertiesCreateParameters.cs +++ b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountPropertiesCreateParameters.cs @@ -35,8 +35,11 @@ public StorageAccountPropertiesCreateParameters(AccountType accountType) public AccountType AccountType { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { } diff --git a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountPropertiesUpdateParameters.cs b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountPropertiesUpdateParameters.cs index 22ca07468f62..0540c6697ce0 100644 --- a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountPropertiesUpdateParameters.cs +++ b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountPropertiesUpdateParameters.cs @@ -47,8 +47,11 @@ public StorageAccountPropertiesUpdateParameters() { } public CustomDomain CustomDomain { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (this.CustomDomain != null) diff --git a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountRegenerateKeyParameters.cs b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountRegenerateKeyParameters.cs index a0afbe0f3b56..fc0421c3fa03 100644 --- a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountRegenerateKeyParameters.cs +++ b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountRegenerateKeyParameters.cs @@ -32,8 +32,11 @@ public StorageAccountRegenerateKeyParameters(string keyName) public string KeyName { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (KeyName == null) diff --git a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountUpdateParameters.cs b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountUpdateParameters.cs index 3346aab6e2f1..6bb6e245a632 100644 --- a/Samples/azure-storage/Azure.CSharp/Models/StorageAccountUpdateParameters.cs +++ b/Samples/azure-storage/Azure.CSharp/Models/StorageAccountUpdateParameters.cs @@ -42,8 +42,11 @@ public StorageAccountUpdateParameters() { } public StorageAccountPropertiesUpdateParameters Properties { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (this.Properties != null) diff --git a/Samples/azure-storage/Azure.CSharp/Models/Usage.cs b/Samples/azure-storage/Azure.CSharp/Models/Usage.cs index 4499cc048799..eed68680d72f 100644 --- a/Samples/azure-storage/Azure.CSharp/Models/Usage.cs +++ b/Samples/azure-storage/Azure.CSharp/Models/Usage.cs @@ -59,8 +59,11 @@ public Usage(UsageUnit unit, int currentValue, int limit, UsageName name) public UsageName Name { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Name == null) diff --git a/Samples/azure-storage/Azure.CSharp/StorageAccountsOperations.cs b/Samples/azure-storage/Azure.CSharp/StorageAccountsOperations.cs index 1b1c5f06a3e5..a801a17ae304 100644 --- a/Samples/azure-storage/Azure.CSharp/StorageAccountsOperations.cs +++ b/Samples/azure-storage/Azure.CSharp/StorageAccountsOperations.cs @@ -28,6 +28,9 @@ internal partial class StorageAccountsOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal StorageAccountsOperations(StorageManagementClient client) { if (client == null) @@ -56,6 +59,15 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -284,6 +296,15 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -494,6 +515,12 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -660,6 +687,15 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -870,6 +906,15 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1074,6 +1119,15 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1262,6 +1316,15 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1431,6 +1494,15 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1613,6 +1685,15 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/Samples/azure-storage/Azure.CSharp/StorageManagementClient.cs b/Samples/azure-storage/Azure.CSharp/StorageManagementClient.cs index 76bbbd61b233..94f5be4417b5 100644 --- a/Samples/azure-storage/Azure.CSharp/StorageManagementClient.cs +++ b/Samples/azure-storage/Azure.CSharp/StorageManagementClient.cs @@ -116,6 +116,9 @@ protected StorageManagementClient(HttpClientHandler rootHandler, params Delegati /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected StorageManagementClient(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -137,6 +140,9 @@ protected StorageManagementClient(Uri baseUri, params DelegatingHandler[] handle /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// protected StorageManagementClient(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -155,6 +161,9 @@ protected StorageManagementClient(Uri baseUri, HttpClientHandler rootHandler, pa /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public StorageManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) @@ -180,6 +189,9 @@ public StorageManagementClient(ServiceClientCredentials credentials, params Dele /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public StorageManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) @@ -205,6 +217,9 @@ public StorageManagementClient(ServiceClientCredentials credentials, HttpClientH /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public StorageManagementClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -238,6 +253,9 @@ public StorageManagementClient(Uri baseUri, ServiceClientCredentials credentials /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public StorageManagementClient(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) diff --git a/Samples/azure-storage/Azure.CSharp/UsageOperations.cs b/Samples/azure-storage/Azure.CSharp/UsageOperations.cs index 723b8f09212c..24361d3b723c 100644 --- a/Samples/azure-storage/Azure.CSharp/UsageOperations.cs +++ b/Samples/azure-storage/Azure.CSharp/UsageOperations.cs @@ -28,6 +28,9 @@ internal partial class UsageOperations : IServiceOperations /// Reference to the service client. /// + /// + /// Thrown when a required parameter is null + /// internal UsageOperations(StorageManagementClient client) { if (client == null) @@ -52,6 +55,15 @@ internal UsageOperations(StorageManagementClient client) /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// diff --git a/Samples/petstore/CSharp/Models/Pet.cs b/Samples/petstore/CSharp/Models/Pet.cs index 672c2aad6408..56c473aa47f1 100644 --- a/Samples/petstore/CSharp/Models/Pet.cs +++ b/Samples/petstore/CSharp/Models/Pet.cs @@ -61,8 +61,11 @@ public Pet() { } public string Status { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public virtual void Validate() { if (Name == null) diff --git a/Samples/petstore/CSharp/SwaggerPetstore.cs b/Samples/petstore/CSharp/SwaggerPetstore.cs index 7d157b55636f..dd4a2956f55f 100644 --- a/Samples/petstore/CSharp/SwaggerPetstore.cs +++ b/Samples/petstore/CSharp/SwaggerPetstore.cs @@ -75,6 +75,9 @@ public SwaggerPetstore(HttpClientHandler rootHandler, params DelegatingHandler[] /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SwaggerPetstore(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) @@ -96,6 +99,9 @@ public SwaggerPetstore(Uri baseUri, params DelegatingHandler[] handlers) : this( /// /// Optional. The delegating handlers to add to the http client pipeline. /// + /// + /// Thrown when a required parameter is null + /// public SwaggerPetstore(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) @@ -155,6 +161,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -254,6 +263,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -357,6 +369,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -461,6 +476,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -583,6 +604,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -705,6 +732,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -819,6 +852,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -937,6 +976,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1051,6 +1096,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1160,6 +1208,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1275,6 +1326,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1385,6 +1442,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -1504,6 +1567,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1622,6 +1694,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -1721,6 +1799,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1820,6 +1901,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -1919,6 +2003,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2021,6 +2108,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// /// /// A response object containing the response body and response headers. /// @@ -2143,6 +2236,9 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// /// /// A response object containing the response body and response headers. /// @@ -2235,6 +2331,15 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2355,6 +2460,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -2461,6 +2572,12 @@ private void Initialize() /// /// The cancellation token. /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. ///