diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs index 57d3f3e553a5a..506537c75d436 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs @@ -251,17 +251,31 @@ public Apps(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.Endpoint"); } - if (skip < 0) + if (skip != null) + { + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } + } + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take > 500) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs index 9c3a6476c12de..bebeafd46c022 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs @@ -488,17 +488,31 @@ public Examples(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) + { + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } + } + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take > 500) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -672,7 +686,7 @@ public Examples(LUISAuthoringClient client) /// /// A response object containing the response body and response headers. /// - public async Task> DeleteWithHttpMessagesAsync(System.Guid appId, string versionId, int exampleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> DeleteWithHttpMessagesAsync(System.Guid appId, string versionId, long exampleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/ExamplesExtensions.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/ExamplesExtensions.cs index 366157544a3a3..7ef7464ab15ea 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/ExamplesExtensions.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/ExamplesExtensions.cs @@ -131,7 +131,7 @@ public static partial class ExamplesExtensions /// /// The cancellation token. /// - public static async Task DeleteAsync(this IExamples operations, System.Guid appId, string versionId, int exampleId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IExamples operations, System.Guid appId, string versionId, long exampleId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteWithHttpMessagesAsync(appId, versionId, exampleId, null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs index d76caa0bde636..1492cff3565f9 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs @@ -269,17 +269,31 @@ public Features(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) + { + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } + } + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take > 500) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -461,17 +475,31 @@ public Features(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) + { + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } + } + else if(skip == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take > 500) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/IExamples.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/IExamples.cs index c86e1aa83d18f..46dcf9e5d73d1 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/IExamples.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/IExamples.cs @@ -149,6 +149,6 @@ public partial interface IExamples /// /// Thrown when a required parameter is null /// - Task> DeleteWithHttpMessagesAsync(System.Guid appId, string versionId, int exampleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> DeleteWithHttpMessagesAsync(System.Guid appId, string versionId, long exampleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs index 090e976ff3ee0..ba27b5ad0ddcd 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs @@ -268,17 +268,31 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } } - if (take > 500) + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take < 0) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } + } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -633,17 +647,31 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } } - if (take > 500) + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take < 0) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } + } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -825,17 +853,31 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } } - if (take > 500) + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take < 0) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } + } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -1017,17 +1059,31 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } } - if (take > 500) + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -1209,17 +1265,31 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) + { + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } + } + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take > 500) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -1745,17 +1815,31 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } } - if (take > 500) + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } + if (take != null) + { + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -2095,17 +2179,31 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } } - if (take > 500) + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take < 0) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } + } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -2294,17 +2392,31 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "modelId"); } - if (skip < 0) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } + } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take > 500) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -6921,13 +7033,16 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (take > 500) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); - } - if (take < 0) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -7114,13 +7229,16 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (take > 500) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); - } - if (take < 0) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -9689,17 +9807,31 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } } - if (take > 500) + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -10054,17 +10186,31 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) + { + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } + } + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take > 500) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Models/LabelExampleResponse.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Models/LabelExampleResponse.cs index 3899b6c314ee4..c46cd72645455 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Models/LabelExampleResponse.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Models/LabelExampleResponse.cs @@ -31,7 +31,7 @@ public LabelExampleResponse() /// /// The example utterance. /// The newly created sample ID. - public LabelExampleResponse(string utteranceText = default(string), int? exampleId = default(int?)) + public LabelExampleResponse(string utteranceText = default(string), long? exampleId = default(long?)) { UtteranceText = utteranceText; ExampleId = exampleId; @@ -53,7 +53,7 @@ public LabelExampleResponse() /// Gets or sets the newly created sample ID. /// [JsonProperty(PropertyName = "ExampleId")] - public int? ExampleId { get; set; } + public long? ExampleId { get; set; } } } diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Pattern.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Pattern.cs index 65f82698898b4..9d88ba0da45c1 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Pattern.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Pattern.cs @@ -268,17 +268,31 @@ public Pattern(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) + { + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } + } + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take > 500) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -1319,17 +1333,31 @@ public Pattern(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) + if (skip != null) + { + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } + } + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take > 500) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Versions.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Versions.cs index d04f8ea1db2c8..9d880b045ea24 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Versions.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Versions.cs @@ -261,17 +261,31 @@ public Versions(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.Endpoint"); } - if (skip < 0) + if (skip != null) + { + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } + } + else if (skip == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); } - if (take > 500) + if (take != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (take > 500) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + } + if (take < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + } } - if (take < 0) + else if (take == null) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled;