From bbd07aa3a2595c7769ed8c4a2b6654f4c1ce14e3 Mon Sep 17 00:00:00 2001 From: Younes Date: Mon, 8 Feb 2021 20:41:38 +0200 Subject: [PATCH 1/4] Changes ExampleId type to long --- .../src/Generated/Apps.cs | 22 +- .../src/Generated/Examples.cs | 22 +- .../src/Generated/Features.cs | 44 +-- .../src/Generated/Model.cs | 250 +++++++++++------- .../Generated/Models/LabelExampleResponse.cs | 4 +- .../src/Generated/Pattern.cs | 44 +-- .../src/Generated/Versions.cs | 22 +- 7 files changed, 258 insertions(+), 150 deletions(-) diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs index 57d3f3e553a5..ab2855634fa7 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs @@ -251,17 +251,23 @@ public Apps(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.Endpoint"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // 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 9c3a6476c12d..c9609c2d4d3d 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs @@ -488,17 +488,23 @@ public Examples(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs index d76caa0bde63..e0f399b4c0a5 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs @@ -269,17 +269,23 @@ public Features(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -461,17 +467,23 @@ public Features(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs index 090e976ff3ee..a50ac3338bd3 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs @@ -268,17 +268,23 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -633,17 +639,23 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -825,17 +837,23 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -1017,17 +1035,23 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -1209,17 +1233,23 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -1745,17 +1775,23 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -2095,17 +2131,23 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -2294,17 +2336,23 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "modelId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -6921,13 +6969,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 +7165,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 +9743,23 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -10054,17 +10114,23 @@ public Model(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // 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 3899b6c314ee..c46cd7264545 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 65f82698898b..8df53274b007 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Pattern.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Pattern.cs @@ -268,17 +268,23 @@ public Pattern(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -1319,17 +1325,23 @@ public Pattern(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "versionId"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // 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 d04f8ea1db2c..4f6cebbf07c1 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Versions.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Versions.cs @@ -261,17 +261,23 @@ public Versions(LUISAuthoringClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.Endpoint"); } - if (skip < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); - } - if (take > 500) + if (skip != null) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "take", 500); + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "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); + } } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; From 72f5581a6c6d949a015862b755205b3184489aa1 Mon Sep 17 00:00:00 2001 From: Younes Date: Wed, 10 Feb 2021 13:24:13 +0200 Subject: [PATCH 2/4] Fixes build errors --- .../Language.LUIS.Authoring/src/Generated/Examples.cs | 2 +- .../Language.LUIS.Authoring/src/Generated/ExamplesExtensions.cs | 2 +- .../Language.LUIS.Authoring/src/Generated/IExamples.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs index c9609c2d4d3d..d72d61d1bf29 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs @@ -678,7 +678,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 366157544a3a..7ef7464ab15e 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/IExamples.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/IExamples.cs index c86e1aa83d18..46dcf9e5d73d 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)); } } From 0f8fc69774da4551d51ba2ad98ead79182b4aae9 Mon Sep 17 00:00:00 2001 From: Younes Date: Wed, 10 Feb 2021 14:19:45 +0200 Subject: [PATCH 3/4] Validates skip and take not equal null --- .../src/Generated/Apps.cs | 8 ++ .../src/Generated/Examples.cs | 8 ++ .../src/Generated/Features.cs | 16 ++++ .../src/Generated/Model.cs | 80 +++++++++++++++++++ .../src/Generated/Pattern.cs | 16 ++++ .../src/Generated/Versions.cs | 8 ++ 6 files changed, 136 insertions(+) diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs index ab2855634fa7..506537c75d43 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Apps.cs @@ -258,6 +258,10 @@ public Apps(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -269,6 +273,10 @@ public Apps(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs index d72d61d1bf29..bebeafd46c02 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Examples.cs @@ -495,6 +495,10 @@ public Examples(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -506,6 +510,10 @@ public Examples(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs index e0f399b4c0a5..1492cff3565f 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Features.cs @@ -276,6 +276,10 @@ public Features(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -287,6 +291,10 @@ public Features(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -474,6 +482,10 @@ public Features(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if(skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -485,6 +497,10 @@ public Features(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs index a50ac3338bd3..ba27b5ad0ddc 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Model.cs @@ -275,6 +275,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -286,6 +290,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -646,6 +654,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -657,6 +669,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -844,6 +860,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -855,6 +875,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1042,6 +1066,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -1053,6 +1081,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1240,6 +1272,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -1251,6 +1287,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1782,6 +1822,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -1793,6 +1837,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2138,6 +2186,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -2149,6 +2201,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2343,6 +2399,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -2354,6 +2414,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -9750,6 +9814,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -9761,6 +9829,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -10121,6 +10193,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -10132,6 +10208,10 @@ public Model(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Pattern.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Pattern.cs index 8df53274b007..9d88ba0da45c 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Pattern.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Pattern.cs @@ -275,6 +275,10 @@ public Pattern(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -286,6 +290,10 @@ public Pattern(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1332,6 +1340,10 @@ public Pattern(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -1343,6 +1355,10 @@ public Pattern(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Versions.cs b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Versions.cs index 4f6cebbf07c1..9d880b045ea2 100644 --- a/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Versions.cs +++ b/sdk/cognitiveservices/Language.LUIS.Authoring/src/Generated/Versions.cs @@ -268,6 +268,10 @@ public Versions(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); } } + else if (skip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skip", 0); + } if (take != null) { if (take > 500) @@ -279,6 +283,10 @@ public Versions(LUISAuthoringClient client) throw new ValidationException(ValidationRules.InclusiveMinimum, "take", 0); } } + else if (take == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "take", 0); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; From 54eedca41d2c05e374b15fd90a9dd4dcbb994fd9 Mon Sep 17 00:00:00 2001 From: Younes Date: Wed, 10 Feb 2021 15:21:42 +0200 Subject: [PATCH 4/4] retrigger checks