From e79d98cff29787d6ee84bdb75042608e4c303208 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 31 Jan 2019 17:01:53 +0800 Subject: [PATCH 1/9] update multiple recognition SDK. --- .../Vision/Face/Face/Generated/FaceClient.cs | 40 +++++++++++ .../Face/Face/Generated/FaceListOperations.cs | 8 ++- .../Generated/FaceListOperationsExtensions.cs | 7 +- .../Face/Face/Generated/FaceOperations.cs | 22 +++++- .../Generated/FaceOperationsExtensions.cs | 22 ++++-- .../Face/Generated/IFaceListOperations.cs | 5 +- .../Face/Face/Generated/IFaceOperations.cs | 18 ++++- .../Generated/ILargeFaceListOperations.cs | 5 +- .../Generated/ILargePersonGroupOperations.cs | 5 +- .../Face/Generated/IPersonGroupOperations.cs | 5 +- .../Face/Generated/LargeFaceListOperations.cs | 8 ++- .../LargeFaceListOperationsExtensions.cs | 7 +- .../Generated/LargePersonGroupOperations.cs | 8 ++- .../LargePersonGroupOperationsExtensions.cs | 7 +- .../Face/Generated/Models/DetectedFace.cs | 12 +++- .../Face/Face/Generated/Models/FaceList.cs | 8 ++- .../Face/Generated/Models/LargeFaceList.cs | 8 ++- .../Face/Generated/Models/LargePersonGroup.cs | 8 ++- .../Face/Generated/Models/MetaDataContract.cs | 70 +++++++++++++++++++ .../Face/Face/Generated/Models/PersonGroup.cs | 8 ++- .../Face/Generated/Models/RecognitionModel.cs | 60 ++++++++++++++++ .../Face/Generated/PersonGroupOperations.cs | 8 ++- .../PersonGroupOperationsExtensions.cs | 7 +- 23 files changed, 315 insertions(+), 41 deletions(-) create mode 100644 src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs create mode 100644 src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceClient.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceClient.cs index 95fe7f33e869..2bc145cada1d 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceClient.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceClient.cs @@ -90,6 +90,19 @@ public partial class FaceClient : ServiceClient, IFaceClient /// public virtual ISnapshotOperations Snapshot { get; private set; } + /// + /// Initializes a new instance of the FaceClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling FaceClient.Dispose(). False: will not dispose provided httpClient + protected FaceClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + /// /// Initializes a new instance of the FaceClient class. /// @@ -140,6 +153,33 @@ public FaceClient(ServiceClientCredentials credentials, params DelegatingHandler } } + /// + /// Initializes a new instance of the FaceClient class. + /// + /// + /// Required. Subscription credentials which uniquely identify client subscription. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling FaceClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public FaceClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + /// /// Initializes a new instance of the FaceClient class. /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs index a39b0a3657c2..1acaf4b6e38d 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs @@ -63,6 +63,9 @@ public FaceListOperations(FaceClient client) /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -81,7 +84,7 @@ public FaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -116,11 +119,12 @@ public FaceListOperations(FaceClient client) throw new ValidationException(ValidationRules.MaxLength, "userData", 16384); } } - NameAndUserDataContract body = new NameAndUserDataContract(); + MetaDataContract body = new MetaDataContract(); if (name != null || userData != null) { body.Name = name; body.UserData = userData; + body.RecognitionModel = recognitionModel; } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs index 6b29ae8ced98..08b075ae6d20 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs @@ -38,12 +38,15 @@ public static partial class FaceListOperationsExtensions /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task CreateAsync(this IFaceListOperations operations, string faceListId, string name = default(string), string userData = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this IFaceListOperations operations, string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.CreateWithHttpMessagesAsync(faceListId, name, userData, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.CreateWithHttpMessagesAsync(faceListId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs index b7f27dd6c6be..dba02b893aa9 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs @@ -858,6 +858,13 @@ public FaceOperations(FaceClient client) /// and emotion. Note that each face attribute analysis has additional /// computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face features + /// are extracted, so a recognition model version could be provided when + /// performing a Detection. If the user does not provide recognition model, + /// default is 'recognition_v01'. Possible values include: 'recognition_v01', + /// 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -879,7 +886,7 @@ public FaceOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -904,6 +911,7 @@ public FaceOperations(FaceClient client) tracingParameters.Add("returnFaceId", returnFaceId); tracingParameters.Add("returnFaceLandmarks", returnFaceLandmarks); tracingParameters.Add("returnFaceAttributes", returnFaceAttributes); + tracingParameters.Add("recognitionModel", recognitionModel); tracingParameters.Add("imageUrl", imageUrl); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "DetectWithUrl", tracingParameters); @@ -925,6 +933,7 @@ public FaceOperations(FaceClient client) { _queryParameters.Add(string.Format("returnFaceAttributes={0}", System.Uri.EscapeDataString(string.Join(",", returnFaceAttributes)))); } + _queryParameters.Add(string.Format("RecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(recognitionModel, Client.SerializationSettings).Trim('"')))); if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -1259,6 +1268,13 @@ public FaceOperations(FaceClient client) /// and emotion. Note that each face attribute analysis has additional /// computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face features + /// are extracted, so a recognition model version could be provided when + /// performing a Detection. If the user does not provide recognition model, + /// default is 'recognition_v01'. Possible values include: 'recognition_v01', + /// 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -1280,7 +1296,7 @@ public FaceOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -1301,6 +1317,7 @@ public FaceOperations(FaceClient client) tracingParameters.Add("returnFaceLandmarks", returnFaceLandmarks); tracingParameters.Add("returnFaceAttributes", returnFaceAttributes); tracingParameters.Add("image", image); + tracingParameters.Add("recognitionModel", recognitionModel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "DetectWithStream", tracingParameters); } @@ -1321,6 +1338,7 @@ public FaceOperations(FaceClient client) { _queryParameters.Add(string.Format("returnFaceAttributes={0}", System.Uri.EscapeDataString(string.Join(",", returnFaceAttributes)))); } + _queryParameters.Add(string.Format("RecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(recognitionModel, Client.SerializationSettings).Trim('"')))); if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs index 7e205915d035..43416f907131 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs @@ -181,12 +181,19 @@ public static partial class FaceOperationsExtensions /// and emotion. Note that each face attribute analysis has additional /// computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face features + /// are extracted, so a recognition model version could be provided when + /// performing a Detection. If the user does not provide recognition model, + /// default is 'recognition_v01'. Possible values include: 'recognition_v01', + /// 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task> DetectWithUrlAsync(this IFaceOperations operations, string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> DetectWithUrlAsync(this IFaceOperations operations, string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DetectWithUrlWithHttpMessagesAsync(url, returnFaceId, returnFaceLandmarks, returnFaceAttributes, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DetectWithUrlWithHttpMessagesAsync(url, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -255,12 +262,19 @@ public static partial class FaceOperationsExtensions /// and emotion. Note that each face attribute analysis has additional /// computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face features + /// are extracted, so a recognition model version could be provided when + /// performing a Detection. If the user does not provide recognition model, + /// default is 'recognition_v01'. Possible values include: 'recognition_v01', + /// 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task> DetectWithStreamAsync(this IFaceOperations operations, Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> DetectWithStreamAsync(this IFaceOperations operations, Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DetectWithStreamWithHttpMessagesAsync(image, returnFaceId, returnFaceLandmarks, returnFaceAttributes, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DetectWithStreamWithHttpMessagesAsync(image, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs index 2519d4dbccf3..22da6b92da58 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs @@ -36,6 +36,9 @@ public partial interface IFaceListOperations /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -48,7 +51,7 @@ public partial interface IFaceListOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve a face list's information. /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs index 5a22b62ab1d2..354b353dca2b 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs @@ -193,6 +193,13 @@ public partial interface IFaceOperations /// facialHair, glasses and emotion. Note that each face attribute /// analysis has additional computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face + /// features are extracted, so a recognition model version could be + /// provided when performing a Detection. If the user does not provide + /// recognition model, default is 'recognition_v01'. Possible values + /// include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -208,7 +215,7 @@ public partial interface IFaceOperations /// /// Thrown when a required parameter is null /// - Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Verify whether two faces belong to a same person. Compares a face /// Id with a Person Id @@ -271,6 +278,13 @@ public partial interface IFaceOperations /// facialHair, glasses and emotion. Note that each face attribute /// analysis has additional computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face + /// features are extracted, so a recognition model version could be + /// provided when performing a Detection. If the user does not provide + /// recognition model, default is 'recognition_v01'. Possible values + /// include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -286,6 +300,6 @@ public partial interface IFaceOperations /// /// Thrown when a required parameter is null /// - Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs index b3a7fc7b57f8..d577d2cc3fb5 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs @@ -36,6 +36,9 @@ public partial interface ILargeFaceListOperations /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -48,7 +51,7 @@ public partial interface ILargeFaceListOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve a large face list's information. /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs index 1dc0e72f7309..79212f81d873 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs @@ -35,6 +35,9 @@ public partial interface ILargePersonGroupOperations /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -47,7 +50,7 @@ public partial interface ILargePersonGroupOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete an existing large person group. Persisted face features of /// all people in the large person group will also be deleted. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs index 0fef02f6a473..4a3e70a6585f 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs @@ -35,6 +35,9 @@ public partial interface IPersonGroupOperations /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -47,7 +50,7 @@ public partial interface IPersonGroupOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete an existing person group. Persisted face features of all /// people in the person group will also be deleted. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs index 727024226951..a908456d8e00 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs @@ -63,6 +63,9 @@ public LargeFaceListOperations(FaceClient client) /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -81,7 +84,7 @@ public LargeFaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -116,11 +119,12 @@ public LargeFaceListOperations(FaceClient client) throw new ValidationException(ValidationRules.MaxLength, "userData", 16384); } } - NameAndUserDataContract body = new NameAndUserDataContract(); + MetaDataContract body = new MetaDataContract(); if (name != null || userData != null) { body.Name = name; body.UserData = userData; + body.RecognitionModel = recognitionModel; } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs index 9acd9c5398b0..8a590752c27a 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs @@ -38,12 +38,15 @@ public static partial class LargeFaceListOperationsExtensions /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task CreateAsync(this ILargeFaceListOperations operations, string largeFaceListId, string name = default(string), string userData = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this ILargeFaceListOperations operations, string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.CreateWithHttpMessagesAsync(largeFaceListId, name, userData, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.CreateWithHttpMessagesAsync(largeFaceListId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs index 97ebad890187..580c17a5390f 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs @@ -63,6 +63,9 @@ public LargePersonGroupOperations(FaceClient client) /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -81,7 +84,7 @@ public LargePersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -116,11 +119,12 @@ public LargePersonGroupOperations(FaceClient client) throw new ValidationException(ValidationRules.MaxLength, "userData", 16384); } } - NameAndUserDataContract body = new NameAndUserDataContract(); + MetaDataContract body = new MetaDataContract(); if (name != null || userData != null) { body.Name = name; body.UserData = userData; + body.RecognitionModel = recognitionModel; } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs index e22c33ea2f77..88535a08c674 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs @@ -37,12 +37,15 @@ public static partial class LargePersonGroupOperationsExtensions /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task CreateAsync(this ILargePersonGroupOperations operations, string largePersonGroupId, string name = default(string), string userData = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this ILargePersonGroupOperations operations, string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.CreateWithHttpMessagesAsync(largePersonGroupId, name, userData, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.CreateWithHttpMessagesAsync(largePersonGroupId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs index 2d64fce0d116..0ac9b9fa0765 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs @@ -30,9 +30,12 @@ public DetectedFace() /// /// Initializes a new instance of the DetectedFace class. /// - public DetectedFace(FaceRectangle faceRectangle, System.Guid? faceId = default(System.Guid?), FaceLandmarks faceLandmarks = default(FaceLandmarks), FaceAttributes faceAttributes = default(FaceAttributes)) + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' + public DetectedFace(RecognitionModel recognitionModel, FaceRectangle faceRectangle, System.Guid? faceId = default(System.Guid?), FaceLandmarks faceLandmarks = default(FaceLandmarks), FaceAttributes faceAttributes = default(FaceAttributes)) { FaceId = faceId; + RecognitionModel = recognitionModel; FaceRectangle = faceRectangle; FaceLandmarks = faceLandmarks; FaceAttributes = faceAttributes; @@ -49,6 +52,13 @@ public DetectedFace() [JsonProperty(PropertyName = "faceId")] public System.Guid? FaceId { get; set; } + /// + /// Gets or sets possible values include: 'recognition_v01', + /// 'recognition_v02' + /// + [JsonProperty(PropertyName = "RecognitionModel")] + public RecognitionModel RecognitionModel { get; set; } + /// /// [JsonProperty(PropertyName = "faceRectangle")] diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs index 8b4dc1030a00..0a0c6c2fd788 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models /// /// Face list object. /// - public partial class FaceList : NameAndUserDataContract + public partial class FaceList : MetaDataContract { /// /// Initializes a new instance of the FaceList class. @@ -38,10 +38,12 @@ public FaceList() /// 128. /// User specified data. Length should not /// exceed 16KB. + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' /// Persisted faces within the face /// list. - public FaceList(string faceListId, string name = default(string), string userData = default(string), IList persistedFaces = default(IList)) - : base(name, userData) + public FaceList(string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), IList persistedFaces = default(IList)) + : base(name, userData, recognitionModel) { FaceListId = faceListId; PersistedFaces = persistedFaces; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs index d5c6da592b97..f66850361e59 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models /// /// Large face list object. /// - public partial class LargeFaceList : NameAndUserDataContract + public partial class LargeFaceList : MetaDataContract { /// /// Initializes a new instance of the LargeFaceList class. @@ -36,8 +36,10 @@ public LargeFaceList() /// 128. /// User specified data. Length should not /// exceed 16KB. - public LargeFaceList(string largeFaceListId, string name = default(string), string userData = default(string)) - : base(name, userData) + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' + public LargeFaceList(string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + : base(name, userData, recognitionModel) { LargeFaceListId = largeFaceListId; CustomInit(); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs index 18d800d5d556..1bfca0602bf4 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models /// /// Large person group object. /// - public partial class LargePersonGroup : NameAndUserDataContract + public partial class LargePersonGroup : MetaDataContract { /// /// Initializes a new instance of the LargePersonGroup class. @@ -36,8 +36,10 @@ public LargePersonGroup() /// 128. /// User specified data. Length should not /// exceed 16KB. - public LargePersonGroup(string largePersonGroupId, string name = default(string), string userData = default(string)) - : base(name, userData) + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' + public LargePersonGroup(string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + : base(name, userData, recognitionModel) { LargePersonGroupId = largePersonGroupId; CustomInit(); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs new file mode 100644 index 000000000000..5bae8ed57590 --- /dev/null +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A combination of user defined name and user specified data and + /// recognition model name for largePersonGroup/personGroup, and + /// largeFaceList/faceList. + /// + public partial class MetaDataContract : NameAndUserDataContract + { + /// + /// Initializes a new instance of the MetaDataContract class. + /// + public MetaDataContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MetaDataContract class. + /// + /// User defined name, maximum length is + /// 128. + /// User specified data. Length should not + /// exceed 16KB. + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' + public MetaDataContract(string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + : base(name, userData) + { + RecognitionModel = recognitionModel; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'recognition_v01', + /// 'recognition_v02' + /// + [JsonProperty(PropertyName = "RecognitionModel")] + public RecognitionModel RecognitionModel { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs index 7794e32f2bdb..a70eefedfa54 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models /// /// Person group object. /// - public partial class PersonGroup : NameAndUserDataContract + public partial class PersonGroup : MetaDataContract { /// /// Initializes a new instance of the PersonGroup class. @@ -36,8 +36,10 @@ public PersonGroup() /// 128. /// User specified data. Length should not /// exceed 16KB. - public PersonGroup(string personGroupId, string name = default(string), string userData = default(string)) - : base(name, userData) + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' + public PersonGroup(string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + : base(name, userData, recognitionModel) { PersonGroupId = personGroupId; CustomInit(); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs new file mode 100644 index 000000000000..19f1c30af27e --- /dev/null +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for RecognitionModel. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RecognitionModel + { + [EnumMember(Value = "recognition_v01")] + RecognitionV01, + [EnumMember(Value = "recognition_v02")] + RecognitionV02 + } + internal static class RecognitionModelEnumExtension + { + internal static string ToSerializedValue(this RecognitionModel? value) + { + return value == null ? null : ((RecognitionModel)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this RecognitionModel value) + { + switch( value ) + { + case RecognitionModel.RecognitionV01: + return "recognition_v01"; + case RecognitionModel.RecognitionV02: + return "recognition_v02"; + } + return null; + } + + internal static RecognitionModel? ParseRecognitionModel(this string value) + { + switch( value ) + { + case "recognition_v01": + return RecognitionModel.RecognitionV01; + case "recognition_v02": + return RecognitionModel.RecognitionV02; + } + return null; + } + } +} diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs index 1f6a387a086e..982cbc7abe30 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs @@ -63,6 +63,9 @@ public PersonGroupOperations(FaceClient client) /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -81,7 +84,7 @@ public PersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -116,11 +119,12 @@ public PersonGroupOperations(FaceClient client) throw new ValidationException(ValidationRules.MaxLength, "userData", 16384); } } - NameAndUserDataContract body = new NameAndUserDataContract(); + MetaDataContract body = new MetaDataContract(); if (name != null || userData != null) { body.Name = name; body.UserData = userData; + body.RecognitionModel = recognitionModel; } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs index 728e30fa9e28..67c1a04c768f 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs @@ -37,12 +37,15 @@ public static partial class PersonGroupOperationsExtensions /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task CreateAsync(this IPersonGroupOperations operations, string personGroupId, string name = default(string), string userData = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this IPersonGroupOperations operations, string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.CreateWithHttpMessagesAsync(personGroupId, name, userData, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.CreateWithHttpMessagesAsync(personGroupId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// From e46714b11923458862324463f2fda47ff5299ba1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 31 Jan 2019 17:01:53 +0800 Subject: [PATCH 2/9] update multiple recognition SDK. --- .../Vision/Face/Face/Generated/FaceClient.cs | 40 +++++++++++ .../Face/Face/Generated/FaceListOperations.cs | 8 ++- .../Generated/FaceListOperationsExtensions.cs | 7 +- .../Face/Face/Generated/FaceOperations.cs | 22 +++++- .../Generated/FaceOperationsExtensions.cs | 22 ++++-- .../Face/Generated/IFaceListOperations.cs | 5 +- .../Face/Face/Generated/IFaceOperations.cs | 18 ++++- .../Generated/ILargeFaceListOperations.cs | 5 +- .../Generated/ILargePersonGroupOperations.cs | 5 +- .../Face/Generated/IPersonGroupOperations.cs | 5 +- .../Face/Generated/LargeFaceListOperations.cs | 8 ++- .../LargeFaceListOperationsExtensions.cs | 7 +- .../Generated/LargePersonGroupOperations.cs | 8 ++- .../LargePersonGroupOperationsExtensions.cs | 7 +- .../Face/Generated/Models/DetectedFace.cs | 12 +++- .../Face/Face/Generated/Models/FaceList.cs | 8 ++- .../Face/Generated/Models/LargeFaceList.cs | 8 ++- .../Face/Generated/Models/LargePersonGroup.cs | 8 ++- .../Face/Generated/Models/MetaDataContract.cs | 70 +++++++++++++++++++ .../Face/Face/Generated/Models/PersonGroup.cs | 8 ++- .../Face/Generated/Models/RecognitionModel.cs | 60 ++++++++++++++++ .../Face/Generated/PersonGroupOperations.cs | 8 ++- .../PersonGroupOperationsExtensions.cs | 7 +- 23 files changed, 315 insertions(+), 41 deletions(-) create mode 100644 src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs create mode 100644 src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceClient.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceClient.cs index 95fe7f33e869..2bc145cada1d 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceClient.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceClient.cs @@ -90,6 +90,19 @@ public partial class FaceClient : ServiceClient, IFaceClient /// public virtual ISnapshotOperations Snapshot { get; private set; } + /// + /// Initializes a new instance of the FaceClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling FaceClient.Dispose(). False: will not dispose provided httpClient + protected FaceClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + /// /// Initializes a new instance of the FaceClient class. /// @@ -140,6 +153,33 @@ public FaceClient(ServiceClientCredentials credentials, params DelegatingHandler } } + /// + /// Initializes a new instance of the FaceClient class. + /// + /// + /// Required. Subscription credentials which uniquely identify client subscription. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling FaceClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public FaceClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + /// /// Initializes a new instance of the FaceClient class. /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs index a39b0a3657c2..1acaf4b6e38d 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs @@ -63,6 +63,9 @@ public FaceListOperations(FaceClient client) /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -81,7 +84,7 @@ public FaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -116,11 +119,12 @@ public FaceListOperations(FaceClient client) throw new ValidationException(ValidationRules.MaxLength, "userData", 16384); } } - NameAndUserDataContract body = new NameAndUserDataContract(); + MetaDataContract body = new MetaDataContract(); if (name != null || userData != null) { body.Name = name; body.UserData = userData; + body.RecognitionModel = recognitionModel; } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs index 6b29ae8ced98..08b075ae6d20 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs @@ -38,12 +38,15 @@ public static partial class FaceListOperationsExtensions /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task CreateAsync(this IFaceListOperations operations, string faceListId, string name = default(string), string userData = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this IFaceListOperations operations, string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.CreateWithHttpMessagesAsync(faceListId, name, userData, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.CreateWithHttpMessagesAsync(faceListId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs index b7f27dd6c6be..dba02b893aa9 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs @@ -858,6 +858,13 @@ public FaceOperations(FaceClient client) /// and emotion. Note that each face attribute analysis has additional /// computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face features + /// are extracted, so a recognition model version could be provided when + /// performing a Detection. If the user does not provide recognition model, + /// default is 'recognition_v01'. Possible values include: 'recognition_v01', + /// 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -879,7 +886,7 @@ public FaceOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -904,6 +911,7 @@ public FaceOperations(FaceClient client) tracingParameters.Add("returnFaceId", returnFaceId); tracingParameters.Add("returnFaceLandmarks", returnFaceLandmarks); tracingParameters.Add("returnFaceAttributes", returnFaceAttributes); + tracingParameters.Add("recognitionModel", recognitionModel); tracingParameters.Add("imageUrl", imageUrl); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "DetectWithUrl", tracingParameters); @@ -925,6 +933,7 @@ public FaceOperations(FaceClient client) { _queryParameters.Add(string.Format("returnFaceAttributes={0}", System.Uri.EscapeDataString(string.Join(",", returnFaceAttributes)))); } + _queryParameters.Add(string.Format("RecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(recognitionModel, Client.SerializationSettings).Trim('"')))); if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -1259,6 +1268,13 @@ public FaceOperations(FaceClient client) /// and emotion. Note that each face attribute analysis has additional /// computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face features + /// are extracted, so a recognition model version could be provided when + /// performing a Detection. If the user does not provide recognition model, + /// default is 'recognition_v01'. Possible values include: 'recognition_v01', + /// 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -1280,7 +1296,7 @@ public FaceOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -1301,6 +1317,7 @@ public FaceOperations(FaceClient client) tracingParameters.Add("returnFaceLandmarks", returnFaceLandmarks); tracingParameters.Add("returnFaceAttributes", returnFaceAttributes); tracingParameters.Add("image", image); + tracingParameters.Add("recognitionModel", recognitionModel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "DetectWithStream", tracingParameters); } @@ -1321,6 +1338,7 @@ public FaceOperations(FaceClient client) { _queryParameters.Add(string.Format("returnFaceAttributes={0}", System.Uri.EscapeDataString(string.Join(",", returnFaceAttributes)))); } + _queryParameters.Add(string.Format("RecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(recognitionModel, Client.SerializationSettings).Trim('"')))); if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs index 7e205915d035..43416f907131 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs @@ -181,12 +181,19 @@ public static partial class FaceOperationsExtensions /// and emotion. Note that each face attribute analysis has additional /// computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face features + /// are extracted, so a recognition model version could be provided when + /// performing a Detection. If the user does not provide recognition model, + /// default is 'recognition_v01'. Possible values include: 'recognition_v01', + /// 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task> DetectWithUrlAsync(this IFaceOperations operations, string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> DetectWithUrlAsync(this IFaceOperations operations, string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DetectWithUrlWithHttpMessagesAsync(url, returnFaceId, returnFaceLandmarks, returnFaceAttributes, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DetectWithUrlWithHttpMessagesAsync(url, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -255,12 +262,19 @@ public static partial class FaceOperationsExtensions /// and emotion. Note that each face attribute analysis has additional /// computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face features + /// are extracted, so a recognition model version could be provided when + /// performing a Detection. If the user does not provide recognition model, + /// default is 'recognition_v01'. Possible values include: 'recognition_v01', + /// 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task> DetectWithStreamAsync(this IFaceOperations operations, Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> DetectWithStreamAsync(this IFaceOperations operations, Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DetectWithStreamWithHttpMessagesAsync(image, returnFaceId, returnFaceLandmarks, returnFaceAttributes, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DetectWithStreamWithHttpMessagesAsync(image, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs index 2519d4dbccf3..22da6b92da58 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs @@ -36,6 +36,9 @@ public partial interface IFaceListOperations /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -48,7 +51,7 @@ public partial interface IFaceListOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve a face list's information. /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs index 5a22b62ab1d2..354b353dca2b 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs @@ -193,6 +193,13 @@ public partial interface IFaceOperations /// facialHair, glasses and emotion. Note that each face attribute /// analysis has additional computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face + /// features are extracted, so a recognition model version could be + /// provided when performing a Detection. If the user does not provide + /// recognition model, default is 'recognition_v01'. Possible values + /// include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -208,7 +215,7 @@ public partial interface IFaceOperations /// /// Thrown when a required parameter is null /// - Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Verify whether two faces belong to a same person. Compares a face /// Id with a Person Id @@ -271,6 +278,13 @@ public partial interface IFaceOperations /// facialHair, glasses and emotion. Note that each face attribute /// analysis has additional computational and time cost. /// + /// + /// Recognition model name. Recognition model is used when the face + /// features are extracted, so a recognition model version could be + /// provided when performing a Detection. If the user does not provide + /// recognition model, default is 'recognition_v01'. Possible values + /// include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -286,6 +300,6 @@ public partial interface IFaceOperations /// /// Thrown when a required parameter is null /// - Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs index b3a7fc7b57f8..d577d2cc3fb5 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs @@ -36,6 +36,9 @@ public partial interface ILargeFaceListOperations /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -48,7 +51,7 @@ public partial interface ILargeFaceListOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve a large face list's information. /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs index 1dc0e72f7309..79212f81d873 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs @@ -35,6 +35,9 @@ public partial interface ILargePersonGroupOperations /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -47,7 +50,7 @@ public partial interface ILargePersonGroupOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete an existing large person group. Persisted face features of /// all people in the large person group will also be deleted. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs index 0fef02f6a473..4a3e70a6585f 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs @@ -35,6 +35,9 @@ public partial interface IPersonGroupOperations /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The headers that will be added to request. /// @@ -47,7 +50,7 @@ public partial interface IPersonGroupOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete an existing person group. Persisted face features of all /// people in the person group will also be deleted. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs index 727024226951..a908456d8e00 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs @@ -63,6 +63,9 @@ public LargeFaceListOperations(FaceClient client) /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -81,7 +84,7 @@ public LargeFaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -116,11 +119,12 @@ public LargeFaceListOperations(FaceClient client) throw new ValidationException(ValidationRules.MaxLength, "userData", 16384); } } - NameAndUserDataContract body = new NameAndUserDataContract(); + MetaDataContract body = new MetaDataContract(); if (name != null || userData != null) { body.Name = name; body.UserData = userData; + body.RecognitionModel = recognitionModel; } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs index 9acd9c5398b0..8a590752c27a 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs @@ -38,12 +38,15 @@ public static partial class LargeFaceListOperationsExtensions /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task CreateAsync(this ILargeFaceListOperations operations, string largeFaceListId, string name = default(string), string userData = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this ILargeFaceListOperations operations, string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.CreateWithHttpMessagesAsync(largeFaceListId, name, userData, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.CreateWithHttpMessagesAsync(largeFaceListId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs index 97ebad890187..580c17a5390f 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs @@ -63,6 +63,9 @@ public LargePersonGroupOperations(FaceClient client) /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -81,7 +84,7 @@ public LargePersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -116,11 +119,12 @@ public LargePersonGroupOperations(FaceClient client) throw new ValidationException(ValidationRules.MaxLength, "userData", 16384); } } - NameAndUserDataContract body = new NameAndUserDataContract(); + MetaDataContract body = new MetaDataContract(); if (name != null || userData != null) { body.Name = name; body.UserData = userData; + body.RecognitionModel = recognitionModel; } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs index e22c33ea2f77..88535a08c674 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs @@ -37,12 +37,15 @@ public static partial class LargePersonGroupOperationsExtensions /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task CreateAsync(this ILargePersonGroupOperations operations, string largePersonGroupId, string name = default(string), string userData = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this ILargePersonGroupOperations operations, string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.CreateWithHttpMessagesAsync(largePersonGroupId, name, userData, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.CreateWithHttpMessagesAsync(largePersonGroupId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs index 2d64fce0d116..0ac9b9fa0765 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs @@ -30,9 +30,12 @@ public DetectedFace() /// /// Initializes a new instance of the DetectedFace class. /// - public DetectedFace(FaceRectangle faceRectangle, System.Guid? faceId = default(System.Guid?), FaceLandmarks faceLandmarks = default(FaceLandmarks), FaceAttributes faceAttributes = default(FaceAttributes)) + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' + public DetectedFace(RecognitionModel recognitionModel, FaceRectangle faceRectangle, System.Guid? faceId = default(System.Guid?), FaceLandmarks faceLandmarks = default(FaceLandmarks), FaceAttributes faceAttributes = default(FaceAttributes)) { FaceId = faceId; + RecognitionModel = recognitionModel; FaceRectangle = faceRectangle; FaceLandmarks = faceLandmarks; FaceAttributes = faceAttributes; @@ -49,6 +52,13 @@ public DetectedFace() [JsonProperty(PropertyName = "faceId")] public System.Guid? FaceId { get; set; } + /// + /// Gets or sets possible values include: 'recognition_v01', + /// 'recognition_v02' + /// + [JsonProperty(PropertyName = "RecognitionModel")] + public RecognitionModel RecognitionModel { get; set; } + /// /// [JsonProperty(PropertyName = "faceRectangle")] diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs index 8b4dc1030a00..0a0c6c2fd788 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models /// /// Face list object. /// - public partial class FaceList : NameAndUserDataContract + public partial class FaceList : MetaDataContract { /// /// Initializes a new instance of the FaceList class. @@ -38,10 +38,12 @@ public FaceList() /// 128. /// User specified data. Length should not /// exceed 16KB. + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' /// Persisted faces within the face /// list. - public FaceList(string faceListId, string name = default(string), string userData = default(string), IList persistedFaces = default(IList)) - : base(name, userData) + public FaceList(string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), IList persistedFaces = default(IList)) + : base(name, userData, recognitionModel) { FaceListId = faceListId; PersistedFaces = persistedFaces; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs index d5c6da592b97..f66850361e59 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models /// /// Large face list object. /// - public partial class LargeFaceList : NameAndUserDataContract + public partial class LargeFaceList : MetaDataContract { /// /// Initializes a new instance of the LargeFaceList class. @@ -36,8 +36,10 @@ public LargeFaceList() /// 128. /// User specified data. Length should not /// exceed 16KB. - public LargeFaceList(string largeFaceListId, string name = default(string), string userData = default(string)) - : base(name, userData) + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' + public LargeFaceList(string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + : base(name, userData, recognitionModel) { LargeFaceListId = largeFaceListId; CustomInit(); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs index 18d800d5d556..1bfca0602bf4 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models /// /// Large person group object. /// - public partial class LargePersonGroup : NameAndUserDataContract + public partial class LargePersonGroup : MetaDataContract { /// /// Initializes a new instance of the LargePersonGroup class. @@ -36,8 +36,10 @@ public LargePersonGroup() /// 128. /// User specified data. Length should not /// exceed 16KB. - public LargePersonGroup(string largePersonGroupId, string name = default(string), string userData = default(string)) - : base(name, userData) + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' + public LargePersonGroup(string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + : base(name, userData, recognitionModel) { LargePersonGroupId = largePersonGroupId; CustomInit(); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs new file mode 100644 index 000000000000..5bae8ed57590 --- /dev/null +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A combination of user defined name and user specified data and + /// recognition model name for largePersonGroup/personGroup, and + /// largeFaceList/faceList. + /// + public partial class MetaDataContract : NameAndUserDataContract + { + /// + /// Initializes a new instance of the MetaDataContract class. + /// + public MetaDataContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MetaDataContract class. + /// + /// User defined name, maximum length is + /// 128. + /// User specified data. Length should not + /// exceed 16KB. + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' + public MetaDataContract(string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + : base(name, userData) + { + RecognitionModel = recognitionModel; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'recognition_v01', + /// 'recognition_v02' + /// + [JsonProperty(PropertyName = "RecognitionModel")] + public RecognitionModel RecognitionModel { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs index 7794e32f2bdb..a70eefedfa54 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models /// /// Person group object. /// - public partial class PersonGroup : NameAndUserDataContract + public partial class PersonGroup : MetaDataContract { /// /// Initializes a new instance of the PersonGroup class. @@ -36,8 +36,10 @@ public PersonGroup() /// 128. /// User specified data. Length should not /// exceed 16KB. - public PersonGroup(string personGroupId, string name = default(string), string userData = default(string)) - : base(name, userData) + /// Possible values include: + /// 'recognition_v01', 'recognition_v02' + public PersonGroup(string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + : base(name, userData, recognitionModel) { PersonGroupId = personGroupId; CustomInit(); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs new file mode 100644 index 000000000000..19f1c30af27e --- /dev/null +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for RecognitionModel. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RecognitionModel + { + [EnumMember(Value = "recognition_v01")] + RecognitionV01, + [EnumMember(Value = "recognition_v02")] + RecognitionV02 + } + internal static class RecognitionModelEnumExtension + { + internal static string ToSerializedValue(this RecognitionModel? value) + { + return value == null ? null : ((RecognitionModel)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this RecognitionModel value) + { + switch( value ) + { + case RecognitionModel.RecognitionV01: + return "recognition_v01"; + case RecognitionModel.RecognitionV02: + return "recognition_v02"; + } + return null; + } + + internal static RecognitionModel? ParseRecognitionModel(this string value) + { + switch( value ) + { + case "recognition_v01": + return RecognitionModel.RecognitionV01; + case "recognition_v02": + return RecognitionModel.RecognitionV02; + } + return null; + } + } +} diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs index 1f6a387a086e..982cbc7abe30 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs @@ -63,6 +63,9 @@ public PersonGroupOperations(FaceClient client) /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// Headers that will be added to request. /// @@ -81,7 +84,7 @@ public PersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -116,11 +119,12 @@ public PersonGroupOperations(FaceClient client) throw new ValidationException(ValidationRules.MaxLength, "userData", 16384); } } - NameAndUserDataContract body = new NameAndUserDataContract(); + MetaDataContract body = new MetaDataContract(); if (name != null || userData != null) { body.Name = name; body.UserData = userData; + body.RecognitionModel = recognitionModel; } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs index 728e30fa9e28..67c1a04c768f 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs @@ -37,12 +37,15 @@ public static partial class PersonGroupOperationsExtensions /// /// User specified data. Length should not exceed 16KB. /// + /// + /// Possible values include: 'recognition_v01', 'recognition_v02' + /// /// /// The cancellation token. /// - public static async Task CreateAsync(this IPersonGroupOperations operations, string personGroupId, string name = default(string), string userData = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this IPersonGroupOperations operations, string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.CreateWithHttpMessagesAsync(personGroupId, name, userData, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.CreateWithHttpMessagesAsync(personGroupId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// From cdf852f0d55af802e1cc7f3fa69fc49bab6b1515 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 27 Feb 2019 14:31:48 +0800 Subject: [PATCH 3/9] Update recognitionModel option. --- .../Face/Face.Tests/FaceDetectionTests.cs | 7 +++-- .../Face/Face.Tests/FaceFindSimilarTests.cs | 18 +++++++------ .../Face/Face.Tests/FaceIdentifyTests.cs | 14 +++++----- .../Face/Face.Tests/FaceVerificationTests.cs | 26 ++++++++++--------- .../Vision/Face/Face.Tests/SnapshotTests.cs | 10 ++++--- 5 files changed, 43 insertions(+), 32 deletions(-) diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs index 986a7c3331ff..b2446e8660b2 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs @@ -10,6 +10,8 @@ namespace FaceSDK.Tests { public class FaceDetectionTests : BaseTests { + private static readonly RecognitionModel recognitionModel = RecognitionModel.RecognitionV02; + [Fact] public void FaceDetectionWithAttributes() { @@ -40,7 +42,8 @@ public void FaceDetectionWithAttributes() FaceAttributeType.Noise, FaceAttributeType.Occlusion, FaceAttributeType.Smile - } + }, + recognitionModel: recognitionModel ).Result; Assert.Equal(1, faceList.Count); @@ -149,7 +152,7 @@ public void FaceDetectionNoFace() IFaceClient client = GetFaceClient(HttpMockServer.CreateInstance()); using (FileStream stream = new FileStream(Path.Combine("TestImages", "NoFace.jpg"), FileMode.Open)) { - IList faceList = client.Face.DetectWithStreamAsync(stream).Result; + IList faceList = client.Face.DetectWithStreamAsync(stream, recognitionModel: recognitionModel).Result; Assert.Equal(0, faceList.Count); } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs index 52afc4410257..c5b8139ca9ec 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs @@ -12,6 +12,8 @@ namespace FaceSDK.Tests { public class FaceFindSimilarTests : BaseTests { + private static readonly RecognitionModel recognitionModel = RecognitionModel.RecognitionV02; + [Fact] public void FaceFindSimilarFacePositive() { @@ -29,7 +31,7 @@ public void FaceFindSimilarFacePositive() using (FileStream stream = new FileStream(Path.Combine("TestImages", "Satya4.jpg"), FileMode.Open)) { - faceId1 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId1 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; Assert.NotNull(faceId1); } @@ -50,7 +52,7 @@ public void FaceFindSimilarFaceListPositive() IFaceClient client = GetFaceClient(HttpMockServer.CreateInstance()); Guid? faceId1 = null; string faceListId = "face-list-id"; - client.FaceList.CreateAsync(faceListId, "fakeFaceList").Wait(); + client.FaceList.CreateAsync(faceListId, "fakeFaceList", recognitionModel: recognitionModel).Wait(); try { var satyaPersistedFaceIds = AddFaceListFace(client, faceListId, "Satya"); @@ -58,7 +60,7 @@ public void FaceFindSimilarFaceListPositive() using (FileStream stream = new FileStream(Path.Combine("TestImages", "Satya4.jpg"), FileMode.Open)) { - faceId1 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId1 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; Assert.NotNull(faceId1); } @@ -84,7 +86,7 @@ public void FaceFindSimilarLargeFaceListPositive() IFaceClient client = GetFaceClient(HttpMockServer.CreateInstance()); Guid? faceId1 = null; string largeFaceListId = "large-face-list-id"; - client.LargeFaceList.CreateAsync(largeFaceListId, "fakeLargeFaceList").Wait(); + client.LargeFaceList.CreateAsync(largeFaceListId, "fakeLargeFaceList", recognitionModel: recognitionModel).Wait(); try { var satyaPersistedFaceIds = AddLargeFaceListFace(client, largeFaceListId, "Satya"); @@ -96,7 +98,7 @@ public void FaceFindSimilarLargeFaceListPositive() using (FileStream stream = new FileStream(Path.Combine("TestImages", "Satya4.jpg"), FileMode.Open)) { - faceId1 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId1 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; Assert.NotNull(faceId1); } @@ -120,7 +122,7 @@ public void FaceFindSimilarLargeFaceListPositive() DetectedFace face = null; using (FileStream stream = new FileStream(Path.Combine("TestImages", fileName + i + ".jpg"), FileMode.Open)) { - face = client.Face.DetectWithStreamAsync(stream, true).Result[0]; + face = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0]; } using (FileStream stream = new FileStream(Path.Combine("TestImages", fileName + i + ".jpg"), FileMode.Open)) @@ -146,7 +148,7 @@ public void FaceFindSimilarLargeFaceListPositive() DetectedFace face = null; using (FileStream stream = new FileStream(Path.Combine("TestImages", fileName + i + ".jpg"), FileMode.Open)) { - face = client.Face.DetectWithStreamAsync(stream, true).Result[0]; + face = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0]; } using (FileStream stream = new FileStream(Path.Combine("TestImages", fileName + i + ".jpg"), FileMode.Open)) @@ -172,7 +174,7 @@ public void FaceFindSimilarLargeFaceListPositive() DetectedFace face = null; using (FileStream stream = new FileStream(Path.Combine("TestImages", fileName + i + ".jpg"), FileMode.Open)) { - face = client.Face.DetectWithStreamAsync(stream).Result[0]; + face = client.Face.DetectWithStreamAsync(stream, recognitionModel: recognitionModel).Result[0]; } faceIdList.Add(face.FaceId); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs index addadb821849..de55e64b2a9b 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs @@ -12,6 +12,8 @@ namespace FaceSDK.Tests { public class FaceIdentifyTests : BaseTests { + private static readonly RecognitionModel recognitionModel = RecognitionModel.RecognitionV02; + [Fact] public void FaceIdentificationPersonGroupPositive() { @@ -22,7 +24,7 @@ public void FaceIdentificationPersonGroupPositive() IFaceClient client = GetFaceClient(HttpMockServer.CreateInstance()); Guid? faceId1 = null; string personGroupId = "person-group-id"; - client.PersonGroup.CreateAsync(personGroupId, "fakePersonGroup").Wait(); + client.PersonGroup.CreateAsync(personGroupId, "fakePersonGroup", recognitionModel: recognitionModel).Wait(); try { Person satyaPerson = client.PersonGroupPerson.CreateAsync(personGroupId, "Satya").Result; @@ -36,7 +38,7 @@ public void FaceIdentificationPersonGroupPositive() using (FileStream stream = new FileStream(Path.Combine("TestImages", "Satya4.jpg"), FileMode.Open)) { - faceId1 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId1 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; Assert.NotNull(faceId1); } @@ -62,7 +64,7 @@ public void FaceIdentificationLargePersonGroupPositive() IFaceClient client = GetFaceClient(HttpMockServer.CreateInstance()); Guid? faceId1 = null; string largePersonGroupId = "large-person-group-id"; - client.LargePersonGroup.CreateAsync(largePersonGroupId, "fakeLargePersonGroup").Wait(); + client.LargePersonGroup.CreateAsync(largePersonGroupId, "fakeLargePersonGroup", recognitionModel: recognitionModel).Wait(); try { Person satyaPerson = client.LargePersonGroupPerson.CreateAsync(largePersonGroupId, "Satya").Result; @@ -76,7 +78,7 @@ public void FaceIdentificationLargePersonGroupPositive() using (FileStream stream = new FileStream(Path.Combine("TestImages", "Satya4.jpg"), FileMode.Open)) { - faceId1 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId1 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; Assert.NotNull(faceId1); } @@ -99,7 +101,7 @@ private void AddPersonGroupPersonFace(IFaceClient client, string personGroupId, DetectedFace face = null; using (FileStream stream = new FileStream(Path.Combine("TestImages", fileName + i + ".jpg"), FileMode.Open)) { - face = client.Face.DetectWithStreamAsync(stream, true).Result[0]; + face = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0]; } using (FileStream stream = new FileStream(Path.Combine("TestImages", fileName + i + ".jpg"), FileMode.Open)) @@ -120,7 +122,7 @@ private void AddLargePersonGroupPersonFace(IFaceClient client, string largePerso DetectedFace face = null; using (FileStream stream = new FileStream(Path.Combine("TestImages", fileName + i + ".jpg"), FileMode.Open)) { - face = client.Face.DetectWithStreamAsync(stream, true).Result[0]; + face = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0]; } using (FileStream stream = new FileStream(Path.Combine("TestImages", fileName + i + ".jpg"), FileMode.Open)) diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs index f20dd29044f2..cdb486c103c5 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs @@ -10,6 +10,8 @@ namespace FaceSDK.Tests { public class FaceVerificationTests : BaseTests { + private static readonly RecognitionModel recognitionModel = RecognitionModel.RecognitionV02; + [Fact] public void FaceVerificationFacePositive() { @@ -23,12 +25,12 @@ public void FaceVerificationFacePositive() Guid? faceId2 = null; using (FileStream stream = new FileStream(Path.Combine("TestImages", "verificationBase1.png"), FileMode.Open)) { - faceId1 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId1 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; } using (FileStream stream = new FileStream(Path.Combine("TestImages", "verificationCompare1.png"), FileMode.Open)) { - faceId2 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId2 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; } Assert.NotNull(faceId1); @@ -50,7 +52,7 @@ public void FaceVerificationPersonGroupPositive() Guid? faceId2 = null; string personGroupId = "person-group-id"; - client.PersonGroup.CreateAsync(personGroupId, "fakePersonGroup").Wait(); + client.PersonGroup.CreateAsync(personGroupId, "fakePersonGroup", recognitionModel: recognitionModel).Wait(); try { Person createPersonResult = client.PersonGroupPerson.CreateAsync(personGroupId, "David").Result; @@ -61,7 +63,7 @@ public void FaceVerificationPersonGroupPositive() using (FileStream stream = new FileStream(Path.Combine("TestImages", "verificationCompare1.png"), FileMode.Open)) { - faceId2 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId2 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; } Assert.NotNull(faceId2); @@ -87,7 +89,7 @@ public void FaceVerificationLargePersonGroupPositive() Guid? faceId2 = null; string largePersonGroupId = "large-person-group-id"; - client.LargePersonGroup.CreateAsync(largePersonGroupId, "fakeLargePersonGroup").Wait(); + client.LargePersonGroup.CreateAsync(largePersonGroupId, "fakeLargePersonGroup", recognitionModel: recognitionModel).Wait(); try { Person createPersonResult = client.LargePersonGroupPerson.CreateAsync(largePersonGroupId, "David").Result; @@ -98,7 +100,7 @@ public void FaceVerificationLargePersonGroupPositive() using (FileStream stream = new FileStream(Path.Combine("TestImages", "verificationCompare1.png"), FileMode.Open)) { - faceId2 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId2 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; } Assert.NotNull(faceId2); @@ -126,12 +128,12 @@ public void FaceVerificationFaceNegative() Guid? faceId2 = null; using (FileStream stream = new FileStream(Path.Combine("TestImages", "verificationBase1.png"), FileMode.Open)) { - faceId1 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId1 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; } using (FileStream stream = new FileStream(Path.Combine("TestImages", "verificationCompare2.png"), FileMode.Open)) { - faceId2 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId2 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; } Assert.NotNull(faceId1); @@ -153,7 +155,7 @@ public void FaceVerificationPersonGroupNegative() Guid? faceId2 = null; string personGroupId = "person-group-id"; - client.PersonGroup.CreateAsync(personGroupId, "fakePersonGroup").Wait(); + client.PersonGroup.CreateAsync(personGroupId, "fakePersonGroup", recognitionModel: recognitionModel).Wait(); try { Person createPersonResult = client.PersonGroupPerson.CreateAsync(personGroupId, "David").Result; @@ -164,7 +166,7 @@ public void FaceVerificationPersonGroupNegative() using (FileStream stream = new FileStream(Path.Combine("TestImages", "verificationCompare2.png"), FileMode.Open)) { - faceId2 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId2 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; } Assert.NotNull(faceId2); @@ -190,7 +192,7 @@ public void FaceVerificationLargePersonGroupNegative() Guid? faceId2 = null; string largePersonGroupId = "large-person-group-id"; - client.LargePersonGroup.CreateAsync(largePersonGroupId, "fakeLargePersonGroup").Wait(); + client.LargePersonGroup.CreateAsync(largePersonGroupId, "fakeLargePersonGroup", recognitionModel: recognitionModel).Wait(); try { Person createPersonResult = client.LargePersonGroupPerson.CreateAsync(largePersonGroupId, "David").Result; @@ -201,7 +203,7 @@ public void FaceVerificationLargePersonGroupNegative() using (FileStream stream = new FileStream(Path.Combine("TestImages", "verificationCompare2.png"), FileMode.Open)) { - faceId2 = client.Face.DetectWithStreamAsync(stream, true).Result[0].FaceId; + faceId2 = client.Face.DetectWithStreamAsync(stream, true, recognitionModel: recognitionModel).Result[0].FaceId; } Assert.NotNull(faceId2); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs index c5f9959ade23..abc01516c9ce 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs @@ -17,6 +17,8 @@ public class SnapshotTests : BaseTests // of Cognitive Service Face. We can leave it as `Guid.Empty` in the `playback` test mode. private static readonly List ApplyScope = new List { Guid.Empty }; + private static readonly RecognitionModel recognitionModel = RecognitionModel.RecognitionV02; + [Fact] public void FaceSnapshotTestFaceList() { @@ -29,7 +31,7 @@ public void FaceSnapshotTestFaceList() var userdata = $"userdata{sourceFaceListId}"; IFaceClient client = GetFaceClient(HttpMockServer.CreateInstance()); - client.FaceList.CreateAsync(sourceFaceListId, name, userdata).Wait(); + client.FaceList.CreateAsync(sourceFaceListId, name, userdata, recognitionModel: recognitionModel).Wait(); using (FileStream stream = new FileStream(Path.Combine("TestImages", "Satya4.jpg"), FileMode.Open)) { @@ -84,7 +86,7 @@ public void FaceSnapshotTestLargeFaceList() var userdata = $"userdata{sourceLargeFacelistId}"; IFaceClient client = GetFaceClient(HttpMockServer.CreateInstance()); - client.LargeFaceList.CreateAsync(sourceLargeFacelistId, name, userdata).Wait(); + client.LargeFaceList.CreateAsync(sourceLargeFacelistId, name, userdata, recognitionModel: recognitionModel).Wait(); using (FileStream stream = new FileStream(Path.Combine("TestImages", "Satya4.jpg"), FileMode.Open)) { @@ -145,7 +147,7 @@ public void FaceSnapshotTestLargePersonGroup() var userdata = $"userdata{sourceLargePersonGroupId}"; IFaceClient client = GetFaceClient(HttpMockServer.CreateInstance()); - client.LargePersonGroup.CreateAsync(sourceLargePersonGroupId, name, userdata).Wait(); + client.LargePersonGroup.CreateAsync(sourceLargePersonGroupId, name, userdata, recognitionModel: recognitionModel).Wait(); var personName = $"personName{sourceLargePersonGroupId}"; var personUserdata = $"personUserdata{sourceLargePersonGroupId}"; @@ -215,7 +217,7 @@ public void FaceSnapshotTestPersonGroup() var userdata = $"userdata{sourcePersonGroupId}"; IFaceClient client = GetFaceClient(HttpMockServer.CreateInstance()); - client.PersonGroup.CreateAsync(sourcePersonGroupId, name, userdata).Wait(); + client.PersonGroup.CreateAsync(sourcePersonGroupId, name, userdata, recognitionModel: recognitionModel).Wait(); var personName = $"personName{sourcePersonGroupId}"; var personUserdata = $"personUserdata{sourcePersonGroupId}"; From 2a13c18d2c23a4006692eb07846a5349c0cd22f6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 13 Mar 2019 14:24:10 +0800 Subject: [PATCH 4/9] Change RecognitionModel from enum to string. --- .../Face/Face.Tests/FaceDetectionTests.cs | 2 +- .../Face/Face.Tests/FaceFindSimilarTests.cs | 2 +- .../Face/Face.Tests/FaceIdentifyTests.cs | 2 +- .../Face/Face.Tests/FaceVerificationTests.cs | 2 +- .../Vision/Face/Face.Tests/SnapshotTests.cs | 2 +- .../Face/Face/Generated/FaceListOperations.cs | 45 ++++- .../Generated/FaceListOperationsExtensions.cs | 43 ++++- .../Face/Face/Generated/FaceOperations.cs | 158 ++++++++++++++++-- .../Generated/FaceOperationsExtensions.cs | 148 ++++++++++++++-- .../Face/Generated/IFaceListOperations.cs | 47 +++++- .../Face/Face/Generated/IFaceOperations.cs | 153 +++++++++++++++-- .../Generated/ILargeFaceListOperations.cs | 67 +++++++- .../Generated/ILargePersonGroupOperations.cs | 62 ++++++- .../Face/Generated/IPersonGroupOperations.cs | 63 ++++++- .../Face/Generated/LargeFaceListOperations.cs | 63 ++++++- .../LargeFaceListOperationsExtensions.cs | 61 ++++++- .../Generated/LargePersonGroupOperations.cs | 62 ++++++- .../LargePersonGroupOperationsExtensions.cs | 60 ++++++- .../Face/Generated/Models/DetectedFace.cs | 10 +- .../Face/Face/Generated/Models/FaceList.cs | 2 +- .../Face/Generated/Models/LargeFaceList.cs | 2 +- .../Face/Generated/Models/LargePersonGroup.cs | 2 +- .../Face/Generated/Models/MetaDataContract.cs | 6 +- .../Face/Face/Generated/Models/PersonGroup.cs | 2 +- .../Face/Generated/Models/RecognitionModel.cs | 44 +---- .../Face/Generated/PersonGroupOperations.cs | 60 ++++++- .../PersonGroupOperationsExtensions.cs | 58 ++++++- 27 files changed, 1056 insertions(+), 172 deletions(-) diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs index b2446e8660b2..cd098bb61da8 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs @@ -10,7 +10,7 @@ namespace FaceSDK.Tests { public class FaceDetectionTests : BaseTests { - private static readonly RecognitionModel recognitionModel = RecognitionModel.RecognitionV02; + private static readonly string recognitionModel = RecognitionModel.RecognitionV02; [Fact] public void FaceDetectionWithAttributes() diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs index c5b8139ca9ec..78ee6fe93f23 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs @@ -12,7 +12,7 @@ namespace FaceSDK.Tests { public class FaceFindSimilarTests : BaseTests { - private static readonly RecognitionModel recognitionModel = RecognitionModel.RecognitionV02; + private static readonly string recognitionModel = RecognitionModel.RecognitionV02; [Fact] public void FaceFindSimilarFacePositive() diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs index de55e64b2a9b..83db5ef37f50 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs @@ -12,7 +12,7 @@ namespace FaceSDK.Tests { public class FaceIdentifyTests : BaseTests { - private static readonly RecognitionModel recognitionModel = RecognitionModel.RecognitionV02; + private static readonly string recognitionModel = RecognitionModel.RecognitionV02; [Fact] public void FaceIdentificationPersonGroupPositive() diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs index cdb486c103c5..89fe81733e89 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs @@ -10,7 +10,7 @@ namespace FaceSDK.Tests { public class FaceVerificationTests : BaseTests { - private static readonly RecognitionModel recognitionModel = RecognitionModel.RecognitionV02; + private static readonly string recognitionModel = RecognitionModel.RecognitionV02; [Fact] public void FaceVerificationFacePositive() diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs index abc01516c9ce..98da24166ca0 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs @@ -17,7 +17,7 @@ public class SnapshotTests : BaseTests // of Cognitive Service Face. We can leave it as `Guid.Empty` in the `playback` test mode. private static readonly List ApplyScope = new List { Guid.Empty }; - private static readonly RecognitionModel recognitionModel = RecognitionModel.RecognitionV02; + private static readonly string recognitionModel = RecognitionModel.RecognitionV02; [Fact] public void FaceSnapshotTestFaceList() diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs index 1acaf4b6e38d..29881a023e0a 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs @@ -51,8 +51,36 @@ public FaceListOperations(FaceClient client) public FaceClient Client { get; private set; } /// - /// Create an empty face list. Up to 64 face lists are allowed to exist in one + /// Create an empty face list with user-specified faceListId, name, an optional + /// userData and recognitionModel. Up to 64 face lists are allowed in one /// subscription. + /// <br /> Face list is a list of faces, up to 1,000 faces, and used by + /// [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// <br /> After creation, user should use [FaceList - Add + /// Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395250) + /// to import the faces. Faces are stored on server until [FaceList - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f) + /// is called. + /// <br /> Find Similar is used for scenario like finding celebrity-like + /// faces, similar face filtering, or as a light way face identification. But + /// if the actual use is to identify person, please use + /// [PersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244) + /// / + /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) + /// and [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> Please consider + /// [LargeFaceList](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) + /// when the face number is large. It can support up to 1,000,000 faces. + /// 'recognitionModel' should be specified to associate with this face list. + /// The default value for 'recognitionModel' is 'recognition_v01', if the + /// latest model needed, please explicitly specify the model you need in this + /// parameter. New faces that are added to an existing face list will use the + /// recognition model that's already associated with the collection. Existing + /// face features in a face list can't be updated to features extracted by + /// another version of recognition model. + /// /// /// /// Id referencing a particular face list. @@ -84,7 +112,7 @@ public FaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -120,7 +148,7 @@ public FaceListOperations(FaceClient client) } } MetaDataContract body = new MetaDataContract(); - if (name != null || userData != null) + if (name != null || userData != null || recognitionModel != null) { body.Name = name; body.UserData = userData; @@ -232,7 +260,9 @@ public FaceListOperations(FaceClient client) } /// - /// Retrieve a face list's information. + /// Retrieve a face list’s faceListId, name, userData, recognitionModel and + /// faces in the face list. + /// /// /// /// Id referencing a particular face list. @@ -716,8 +746,11 @@ public FaceListOperations(FaceClient client) } /// - /// Retrieve information about all existing face lists. Only faceListId, name - /// and userData will be returned. + /// List face lists’ faceListId, name, userData and recognitionModel. <br + /// /> + /// To get face information inside faceList use [FaceList - + /// Get](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524c) + /// /// /// /// Headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs index 08b075ae6d20..9bf0fbfcdd4f 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs @@ -23,8 +23,36 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face public static partial class FaceListOperationsExtensions { /// - /// Create an empty face list. Up to 64 face lists are allowed to exist in one + /// Create an empty face list with user-specified faceListId, name, an optional + /// userData and recognitionModel. Up to 64 face lists are allowed in one /// subscription. + /// <br /> Face list is a list of faces, up to 1,000 faces, and used by + /// [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// <br /> After creation, user should use [FaceList - Add + /// Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395250) + /// to import the faces. Faces are stored on server until [FaceList - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f) + /// is called. + /// <br /> Find Similar is used for scenario like finding celebrity-like + /// faces, similar face filtering, or as a light way face identification. But + /// if the actual use is to identify person, please use + /// [PersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244) + /// / + /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) + /// and [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> Please consider + /// [LargeFaceList](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) + /// when the face number is large. It can support up to 1,000,000 faces. + /// 'recognitionModel' should be specified to associate with this face list. + /// The default value for 'recognitionModel' is 'recognition_v01', if the + /// latest model needed, please explicitly specify the model you need in this + /// parameter. New faces that are added to an existing face list will use the + /// recognition model that's already associated with the collection. Existing + /// face features in a face list can't be updated to features extracted by + /// another version of recognition model. + /// /// /// /// The operations group for this extension method. @@ -44,13 +72,15 @@ public static partial class FaceListOperationsExtensions /// /// The cancellation token. /// - public static async Task CreateAsync(this IFaceListOperations operations, string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this IFaceListOperations operations, string faceListId, string name = default(string), string userData = default(string), string recognitionModel = default(string), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CreateWithHttpMessagesAsync(faceListId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Retrieve a face list's information. + /// Retrieve a face list’s faceListId, name, userData, recognitionModel and + /// faces in the face list. + /// /// /// /// The operations group for this extension method. @@ -111,8 +141,11 @@ public static partial class FaceListOperationsExtensions } /// - /// Retrieve information about all existing face lists. Only faceListId, name - /// and userData will be returned. + /// List face lists’ faceListId, name, userData and recognitionModel. <br + /// /> + /// To get face information inside faceList use [FaceList - + /// Get](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524c) + /// /// /// /// The operations group for this extension method. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs index dba02b893aa9..7dbe839add6a 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs @@ -51,8 +51,33 @@ public FaceOperations(FaceClient client) public FaceClient Client { get; private set; } /// - /// Given query face's faceId, find the similar-looking faces from a faceId - /// array, a face list or a large face list. + /// Given query face's faceId, to search the similar-looking faces from a + /// faceId array, a face list or a large face list. faceId array contains the + /// faces created by [Face - + /// Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + /// which will expire 24 hours after creation. A "faceListId" is created by + /// [FaceList - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524b) + /// containing persistedFaceIds that will not expire. And a "largeFaceListId" + /// is created by [LargeFaceList - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) + /// containing persistedFaceIds that will also not expire. Depending on the + /// input the returned similar faces list contains faceIds or persistedFaceIds + /// ranked by similarity. + /// <br/> + /// <br/> Find similar has two working modes, "matchPerson" and + /// "matchFace". "matchPerson" is the default mode that it tries to find faces + /// of the same person as possible by using internal same-person thresholds. It + /// is useful to find a known person's other photos. Note that an empty list + /// will be returned if no faces pass the internal thresholds. "matchFace" mode + /// ignores same-person thresholds and returns ranked similar faces anyway, + /// even the similarity is low. It can be used in the cases like searching + /// celebrity-looking faces. + /// <br/> + /// <br/>The 'recognitionModel' associated with the query face's faceId + /// should be the same as the 'recognitionModel' used by the target faceId + /// array, face list or large face list. + /// /// /// /// FaceId of the query face. User needs to call Face - Detect first to get a @@ -281,6 +306,21 @@ public FaceOperations(FaceClient client) /// /// Divide candidate faces into groups based on face similarity. + /// * The output is one or more disjointed face groups and a messyGroup. A face + /// group contains faces that have similar looking, often of the same person. + /// Face groups are ranked by group size, i.e. number of faces. Notice that + /// faces belonging to a same person might be split into several groups in the + /// result. + /// * MessyGroup is a special face group containing faces that cannot find any + /// similar counterpart face from original faces. The messyGroup will not + /// appear in the result if all faces found their counterparts. + /// * Group API needs at least 2 candidate faces and 1000 at most. We suggest + /// to try [Face - + /// Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a) + /// when you only have 2 candidate faces. + /// * The 'recognitionModel' associated with the query faces' faceIds should be + /// the same. + /// /// /// /// Array of candidate faceId created by Face - Detect. The maximum is 1000 @@ -453,6 +493,36 @@ public FaceOperations(FaceClient client) /// /// 1-to-many identification to find the closest matches of the specific query /// person face from a person group or large person group. + /// <br/> For each face in the faceIds array, Face Identify will compute + /// similarities between the query face and all the faces in the person group + /// (given by personGroupId) or large person group (given by + /// largePersonGroupId), and return candidate person(s) for that face ranked by + /// similarity confidence. The person group/large person group should be + /// trained to make it ready for identification. See more in [PersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249) + /// and [LargePersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4). + /// <br/> + /// + /// Remarks: + /// * The algorithm allows more than one face to be identified independently at + /// the same request, but no more than 10 faces. + /// * Each person in the person group/large person group could have more than + /// one face, but no more than 248 faces. + /// * Higher face image quality means better identification precision. Please + /// consider high-quality faces: frontal, clear, and face size is 200x200 + /// pixels (100 pixels between eyes) or bigger. + /// * Number of candidates returned is restricted by maxNumOfCandidatesReturned + /// and confidenceThreshold. If no person is identified, the returned + /// candidates will be an empty array. + /// * Try [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237) + /// when you need to find similar faces from a face list/large face list + /// instead of a person group/large person group. + /// * The 'recognitionModel' associated with the query faces' faceIds should be + /// the same as the 'recognitionModel' used by the target person group or large + /// person group. + /// /// /// /// Array of query faces faceIds, created by the Face - Detect. Each of the @@ -678,6 +748,17 @@ public FaceOperations(FaceClient client) /// /// Verify whether two faces belong to a same person or whether one face /// belongs to a person. + /// <br/> + /// Remarks: + /// * Higher face image quality means better identification precision. Please + /// consider high-quality faces: frontal, clear, and face size is 200x200 + /// pixels (100 pixels between eyes) or bigger. + /// * For the scenarios that are sensitive to accuracy please make your own + /// judgment. + /// * The 'recognitionModel' associated with the query faces' faceIds should be + /// the same as the 'recognitionModel' used by the target face, person group or + /// large person group. + /// /// /// /// FaceId of the first face, comes from Face - Detect @@ -837,8 +918,45 @@ public FaceOperations(FaceClient client) } /// - /// Detect human faces in an image and returns face locations, and optionally - /// with faceIds, landmarks, and attributes. + /// Detect human faces in an image, return face rectangles, and optionally with + /// faceIds, landmarks, and attributes. + /// * Optional parameters including faceId, landmarks, and attributes. + /// Attributes include age, gender, headPose, smile, facialHair, glasses, + /// emotion, hair, makeup, occlusion, accessories, blur, exposure and noise. + /// * The extracted face feature, instead of the actual image, will be stored + /// on server. The faceId is an identifier of the face feature and will be used + /// in [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239), + /// [Face - + /// Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a), + /// and [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// It will expire 24 hours after the detection call. + /// * Higher face image quality means better detection and recognition + /// precision. Please consider high-quality faces: frontal, clear, and face + /// size is 200x200 pixels (100 pixels between eyes) or bigger. + /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The + /// allowed image file size is from 1KB to 6MB. + /// * Faces are detectable when its size is 36x36 to 4096x4096 pixels. If need + /// to detect very small but clear faces, please try to enlarge the input + /// image. + /// * Up to 64 faces can be returned for an image. Faces are ranked by face + /// rectangle size from large to small. + /// * Face detector prefer frontal and near-frontal faces. There are cases that + /// faces may not be detected, e.g. exceptionally large face angles (head-pose) + /// or being occluded, or wrong image orientation. + /// * Attributes (age, gender, headPose, smile, facialHair, glasses, emotion, + /// hair, makeup, occlusion, accessories, blur, exposure and noise) may not be + /// perfectly accurate. HeadPose's pitch value is a reserved field and will + /// always return 0. + /// * Different 'recognitionModel' values are provided. If follow-up operations + /// like Verify, Identify, Find Similar are needed, please specify the + /// recognition model with 'recognitionModel' parameter. The default value for + /// 'recognitionModel' is 'recognition_v01', if latest model needed, please + /// explicitly specify the model you need in this parameter. Once specified, + /// the detected faceIds will be associated with the specified recognition + /// model. More details, please refer to [How to specify a recognition model]() + /// /// /// /// Publicly reachable URL of an image @@ -860,10 +978,11 @@ public FaceOperations(FaceClient client) /// /// /// Recognition model name. Recognition model is used when the face features - /// are extracted, so a recognition model version could be provided when - /// performing a Detection. If the user does not provide recognition model, - /// default is 'recognition_v01'. Possible values include: 'recognition_v01', - /// 'recognition_v02' + /// are extracted and associated with (Large)FaceList or (Large)PersonGroup. So + /// a recognition model version could be provided when performing a Detection + /// and create (Large)FaceList or (Large)PersonGroup create. If the user does + /// not provide recognition model, default is 'recognition_v01'. Possible + /// values include: 'recognition_v01', 'recognition_v02' /// /// /// Headers that will be added to request. @@ -886,7 +1005,7 @@ public FaceOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -933,7 +1052,10 @@ public FaceOperations(FaceClient client) { _queryParameters.Add(string.Format("returnFaceAttributes={0}", System.Uri.EscapeDataString(string.Join(",", returnFaceAttributes)))); } - _queryParameters.Add(string.Format("RecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(recognitionModel, Client.SerializationSettings).Trim('"')))); + if (recognitionModel != null) + { + _queryParameters.Add(string.Format("RecognitionModel={0}", System.Uri.EscapeDataString(recognitionModel))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -1270,10 +1392,11 @@ public FaceOperations(FaceClient client) /// /// /// Recognition model name. Recognition model is used when the face features - /// are extracted, so a recognition model version could be provided when - /// performing a Detection. If the user does not provide recognition model, - /// default is 'recognition_v01'. Possible values include: 'recognition_v01', - /// 'recognition_v02' + /// are extracted and associated with (Large)FaceList or (Large)PersonGroup. So + /// a recognition model version could be provided when performing a Detection + /// and create (Large)FaceList or (Large)PersonGroup create. If the user does + /// not provide recognition model, default is 'recognition_v01'. Possible + /// values include: 'recognition_v01', 'recognition_v02' /// /// /// Headers that will be added to request. @@ -1296,7 +1419,7 @@ public FaceOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -1338,7 +1461,10 @@ public FaceOperations(FaceClient client) { _queryParameters.Add(string.Format("returnFaceAttributes={0}", System.Uri.EscapeDataString(string.Join(",", returnFaceAttributes)))); } - _queryParameters.Add(string.Format("RecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(recognitionModel, Client.SerializationSettings).Trim('"')))); + if (recognitionModel != null) + { + _queryParameters.Add(string.Format("RecognitionModel={0}", System.Uri.EscapeDataString(recognitionModel))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs index 43416f907131..04842cad76d1 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs @@ -23,8 +23,33 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face public static partial class FaceOperationsExtensions { /// - /// Given query face's faceId, find the similar-looking faces from a faceId - /// array, a face list or a large face list. + /// Given query face's faceId, to search the similar-looking faces from a + /// faceId array, a face list or a large face list. faceId array contains the + /// faces created by [Face - + /// Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + /// which will expire 24 hours after creation. A "faceListId" is created by + /// [FaceList - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524b) + /// containing persistedFaceIds that will not expire. And a "largeFaceListId" + /// is created by [LargeFaceList - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) + /// containing persistedFaceIds that will also not expire. Depending on the + /// input the returned similar faces list contains faceIds or persistedFaceIds + /// ranked by similarity. + /// <br/> + /// <br/> Find similar has two working modes, "matchPerson" and + /// "matchFace". "matchPerson" is the default mode that it tries to find faces + /// of the same person as possible by using internal same-person thresholds. It + /// is useful to find a known person's other photos. Note that an empty list + /// will be returned if no faces pass the internal thresholds. "matchFace" mode + /// ignores same-person thresholds and returns ranked similar faces anyway, + /// even the similarity is low. It can be used in the cases like searching + /// celebrity-looking faces. + /// <br/> + /// <br/>The 'recognitionModel' associated with the query face's faceId + /// should be the same as the 'recognitionModel' used by the target faceId + /// array, face list or large face list. + /// /// /// /// The operations group for this extension method. @@ -72,6 +97,21 @@ public static partial class FaceOperationsExtensions /// /// Divide candidate faces into groups based on face similarity. + /// * The output is one or more disjointed face groups and a messyGroup. A face + /// group contains faces that have similar looking, often of the same person. + /// Face groups are ranked by group size, i.e. number of faces. Notice that + /// faces belonging to a same person might be split into several groups in the + /// result. + /// * MessyGroup is a special face group containing faces that cannot find any + /// similar counterpart face from original faces. The messyGroup will not + /// appear in the result if all faces found their counterparts. + /// * Group API needs at least 2 candidate faces and 1000 at most. We suggest + /// to try [Face - + /// Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a) + /// when you only have 2 candidate faces. + /// * The 'recognitionModel' associated with the query faces' faceIds should be + /// the same. + /// /// /// /// The operations group for this extension method. @@ -94,6 +134,36 @@ public static partial class FaceOperationsExtensions /// /// 1-to-many identification to find the closest matches of the specific query /// person face from a person group or large person group. + /// <br/> For each face in the faceIds array, Face Identify will compute + /// similarities between the query face and all the faces in the person group + /// (given by personGroupId) or large person group (given by + /// largePersonGroupId), and return candidate person(s) for that face ranked by + /// similarity confidence. The person group/large person group should be + /// trained to make it ready for identification. See more in [PersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249) + /// and [LargePersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4). + /// <br/> + /// + /// Remarks: + /// * The algorithm allows more than one face to be identified independently at + /// the same request, but no more than 10 faces. + /// * Each person in the person group/large person group could have more than + /// one face, but no more than 248 faces. + /// * Higher face image quality means better identification precision. Please + /// consider high-quality faces: frontal, clear, and face size is 200x200 + /// pixels (100 pixels between eyes) or bigger. + /// * Number of candidates returned is restricted by maxNumOfCandidatesReturned + /// and confidenceThreshold. If no person is identified, the returned + /// candidates will be an empty array. + /// * Try [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237) + /// when you need to find similar faces from a face list/large face list + /// instead of a person group/large person group. + /// * The 'recognitionModel' associated with the query faces' faceIds should be + /// the same as the 'recognitionModel' used by the target person group or large + /// person group. + /// /// /// /// The operations group for this extension method. @@ -135,6 +205,17 @@ public static partial class FaceOperationsExtensions /// /// Verify whether two faces belong to a same person or whether one face /// belongs to a person. + /// <br/> + /// Remarks: + /// * Higher face image quality means better identification precision. Please + /// consider high-quality faces: frontal, clear, and face size is 200x200 + /// pixels (100 pixels between eyes) or bigger. + /// * For the scenarios that are sensitive to accuracy please make your own + /// judgment. + /// * The 'recognitionModel' associated with the query faces' faceIds should be + /// the same as the 'recognitionModel' used by the target face, person group or + /// large person group. + /// /// /// /// The operations group for this extension method. @@ -157,8 +238,45 @@ public static partial class FaceOperationsExtensions } /// - /// Detect human faces in an image and returns face locations, and optionally - /// with faceIds, landmarks, and attributes. + /// Detect human faces in an image, return face rectangles, and optionally with + /// faceIds, landmarks, and attributes. + /// * Optional parameters including faceId, landmarks, and attributes. + /// Attributes include age, gender, headPose, smile, facialHair, glasses, + /// emotion, hair, makeup, occlusion, accessories, blur, exposure and noise. + /// * The extracted face feature, instead of the actual image, will be stored + /// on server. The faceId is an identifier of the face feature and will be used + /// in [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239), + /// [Face - + /// Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a), + /// and [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// It will expire 24 hours after the detection call. + /// * Higher face image quality means better detection and recognition + /// precision. Please consider high-quality faces: frontal, clear, and face + /// size is 200x200 pixels (100 pixels between eyes) or bigger. + /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The + /// allowed image file size is from 1KB to 6MB. + /// * Faces are detectable when its size is 36x36 to 4096x4096 pixels. If need + /// to detect very small but clear faces, please try to enlarge the input + /// image. + /// * Up to 64 faces can be returned for an image. Faces are ranked by face + /// rectangle size from large to small. + /// * Face detector prefer frontal and near-frontal faces. There are cases that + /// faces may not be detected, e.g. exceptionally large face angles (head-pose) + /// or being occluded, or wrong image orientation. + /// * Attributes (age, gender, headPose, smile, facialHair, glasses, emotion, + /// hair, makeup, occlusion, accessories, blur, exposure and noise) may not be + /// perfectly accurate. HeadPose's pitch value is a reserved field and will + /// always return 0. + /// * Different 'recognitionModel' values are provided. If follow-up operations + /// like Verify, Identify, Find Similar are needed, please specify the + /// recognition model with 'recognitionModel' parameter. The default value for + /// 'recognitionModel' is 'recognition_v01', if latest model needed, please + /// explicitly specify the model you need in this parameter. Once specified, + /// the detected faceIds will be associated with the specified recognition + /// model. More details, please refer to [How to specify a recognition model]() + /// /// /// /// The operations group for this extension method. @@ -183,15 +301,16 @@ public static partial class FaceOperationsExtensions /// /// /// Recognition model name. Recognition model is used when the face features - /// are extracted, so a recognition model version could be provided when - /// performing a Detection. If the user does not provide recognition model, - /// default is 'recognition_v01'. Possible values include: 'recognition_v01', - /// 'recognition_v02' + /// are extracted and associated with (Large)FaceList or (Large)PersonGroup. So + /// a recognition model version could be provided when performing a Detection + /// and create (Large)FaceList or (Large)PersonGroup create. If the user does + /// not provide recognition model, default is 'recognition_v01'. Possible + /// values include: 'recognition_v01', 'recognition_v02' /// /// /// The cancellation token. /// - public static async Task> DetectWithUrlAsync(this IFaceOperations operations, string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> DetectWithUrlAsync(this IFaceOperations operations, string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DetectWithUrlWithHttpMessagesAsync(url, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, null, cancellationToken).ConfigureAwait(false)) { @@ -264,15 +383,16 @@ public static partial class FaceOperationsExtensions /// /// /// Recognition model name. Recognition model is used when the face features - /// are extracted, so a recognition model version could be provided when - /// performing a Detection. If the user does not provide recognition model, - /// default is 'recognition_v01'. Possible values include: 'recognition_v01', - /// 'recognition_v02' + /// are extracted and associated with (Large)FaceList or (Large)PersonGroup. So + /// a recognition model version could be provided when performing a Detection + /// and create (Large)FaceList or (Large)PersonGroup create. If the user does + /// not provide recognition model, default is 'recognition_v01'. Possible + /// values include: 'recognition_v01', 'recognition_v02' /// /// /// The cancellation token. /// - public static async Task> DetectWithStreamAsync(this IFaceOperations operations, Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> DetectWithStreamAsync(this IFaceOperations operations, Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DetectWithStreamWithHttpMessagesAsync(image, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, null, cancellationToken).ConfigureAwait(false)) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs index 22da6b92da58..00256812299c 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs @@ -24,8 +24,38 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face public partial interface IFaceListOperations { /// - /// Create an empty face list. Up to 64 face lists are allowed to exist - /// in one subscription. + /// Create an empty face list with user-specified faceListId, name, an + /// optional userData and recognitionModel. Up to 64 face lists are + /// allowed in one subscription. + /// <br /> Face list is a list of faces, up to 1,000 faces, and + /// used by [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// <br /> After creation, user should use [FaceList - Add + /// Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395250) + /// to import the faces. Faces are stored on server until [FaceList - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f) + /// is called. + /// <br /> Find Similar is used for scenario like finding + /// celebrity-like faces, similar face filtering, or as a light way + /// face identification. But if the actual use is to identify person, + /// please use + /// [PersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244) + /// / + /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) + /// and [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> Please consider + /// [LargeFaceList](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) + /// when the face number is large. It can support up to 1,000,000 + /// faces. 'recognitionModel' should be specified to associate with + /// this face list. The default value for 'recognitionModel' is + /// 'recognition_v01', if the latest model needed, please explicitly + /// specify the model you need in this parameter. New faces that are + /// added to an existing face list will use the recognition model + /// that's already associated with the collection. Existing face + /// features in a face list can't be updated to features extracted by + /// another version of recognition model. + /// /// /// /// Id referencing a particular face list. @@ -51,9 +81,11 @@ public partial interface IFaceListOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string faceListId, string name = default(string), string userData = default(string), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Retrieve a face list's information. + /// Retrieve a face list’s faceListId, name, userData, recognitionModel + /// and faces in the face list. + /// /// /// /// Id referencing a particular face list. @@ -120,8 +152,11 @@ public partial interface IFaceListOperations /// Task DeleteWithHttpMessagesAsync(string faceListId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Retrieve information about all existing face lists. Only - /// faceListId, name and userData will be returned. + /// List face lists’ faceListId, name, userData and recognitionModel. + /// <br /> + /// To get face information inside faceList use [FaceList - + /// Get](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524c) + /// /// /// /// The headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs index 354b353dca2b..8d5c4bfd2445 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs @@ -24,8 +24,34 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face public partial interface IFaceOperations { /// - /// Given query face's faceId, find the similar-looking faces from a - /// faceId array, a face list or a large face list. + /// Given query face's faceId, to search the similar-looking faces from + /// a faceId array, a face list or a large face list. faceId array + /// contains the faces created by [Face - + /// Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + /// which will expire 24 hours after creation. A "faceListId" is + /// created by [FaceList - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524b) + /// containing persistedFaceIds that will not expire. And a + /// "largeFaceListId" is created by [LargeFaceList - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) + /// containing persistedFaceIds that will also not expire. Depending on + /// the input the returned similar faces list contains faceIds or + /// persistedFaceIds ranked by similarity. + /// <br/> + /// <br/> Find similar has two working modes, "matchPerson" and + /// "matchFace". "matchPerson" is the default mode that it tries to + /// find faces of the same person as possible by using internal + /// same-person thresholds. It is useful to find a known person's other + /// photos. Note that an empty list will be returned if no faces pass + /// the internal thresholds. "matchFace" mode ignores same-person + /// thresholds and returns ranked similar faces anyway, even the + /// similarity is low. It can be used in the cases like searching + /// celebrity-looking faces. + /// <br/> + /// <br/>The 'recognitionModel' associated with the query face's + /// faceId should be the same as the 'recognitionModel' used by the + /// target faceId array, face list or large face list. + /// /// /// /// FaceId of the query face. User needs to call Face - Detect first to @@ -79,6 +105,22 @@ public partial interface IFaceOperations Task>> FindSimilarWithHttpMessagesAsync(System.Guid faceId, string faceListId = default(string), string largeFaceListId = default(string), IList faceIds = default(IList), int? maxNumOfCandidatesReturned = 20, FindSimilarMatchMode mode = default(FindSimilarMatchMode), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Divide candidate faces into groups based on face similarity. + /// * The output is one or more disjointed face groups and a + /// messyGroup. A face group contains faces that have similar looking, + /// often of the same person. Face groups are ranked by group size, + /// i.e. number of faces. Notice that faces belonging to a same person + /// might be split into several groups in the result. + /// * MessyGroup is a special face group containing faces that cannot + /// find any similar counterpart face from original faces. The + /// messyGroup will not appear in the result if all faces found their + /// counterparts. + /// * Group API needs at least 2 candidate faces and 1000 at most. We + /// suggest to try [Face - + /// Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a) + /// when you only have 2 candidate faces. + /// * The 'recognitionModel' associated with the query faces' faceIds + /// should be the same. + /// /// /// /// Array of candidate faceId created by Face - Detect. The maximum is @@ -104,6 +146,37 @@ public partial interface IFaceOperations /// 1-to-many identification to find the closest matches of the /// specific query person face from a person group or large person /// group. + /// <br/> For each face in the faceIds array, Face Identify will + /// compute similarities between the query face and all the faces in + /// the person group (given by personGroupId) or large person group + /// (given by largePersonGroupId), and return candidate person(s) for + /// that face ranked by similarity confidence. The person group/large + /// person group should be trained to make it ready for identification. + /// See more in [PersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249) + /// and [LargePersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4). + /// <br/> + /// + /// Remarks: + /// * The algorithm allows more than one face to be identified + /// independently at the same request, but no more than 10 faces. + /// * Each person in the person group/large person group could have + /// more than one face, but no more than 248 faces. + /// * Higher face image quality means better identification precision. + /// Please consider high-quality faces: frontal, clear, and face size + /// is 200x200 pixels (100 pixels between eyes) or bigger. + /// * Number of candidates returned is restricted by + /// maxNumOfCandidatesReturned and confidenceThreshold. If no person is + /// identified, the returned candidates will be an empty array. + /// * Try [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237) + /// when you need to find similar faces from a face list/large face + /// list instead of a person group/large person group. + /// * The 'recognitionModel' associated with the query faces' faceIds + /// should be the same as the 'recognitionModel' used by the target + /// person group or large person group. + /// /// /// /// Array of query faces faceIds, created by the Face - Detect. Each of @@ -148,6 +221,17 @@ public partial interface IFaceOperations /// /// Verify whether two faces belong to a same person or whether one /// face belongs to a person. + /// <br/> + /// Remarks: + /// * Higher face image quality means better identification precision. + /// Please consider high-quality faces: frontal, clear, and face size + /// is 200x200 pixels (100 pixels between eyes) or bigger. + /// * For the scenarios that are sensitive to accuracy please make your + /// own judgment. + /// * The 'recognitionModel' associated with the query faces' faceIds + /// should be the same as the 'recognitionModel' used by the target + /// face, person group or large person group. + /// /// /// /// FaceId of the first face, comes from Face - Detect @@ -172,8 +256,47 @@ public partial interface IFaceOperations /// Task> VerifyFaceToFaceWithHttpMessagesAsync(System.Guid faceId1, System.Guid faceId2, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Detect human faces in an image and returns face locations, and + /// Detect human faces in an image, return face rectangles, and /// optionally with faceIds, landmarks, and attributes. + /// * Optional parameters including faceId, landmarks, and attributes. + /// Attributes include age, gender, headPose, smile, facialHair, + /// glasses, emotion, hair, makeup, occlusion, accessories, blur, + /// exposure and noise. + /// * The extracted face feature, instead of the actual image, will be + /// stored on server. The faceId is an identifier of the face feature + /// and will be used in [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239), + /// [Face - + /// Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a), + /// and [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// It will expire 24 hours after the detection call. + /// * Higher face image quality means better detection and recognition + /// precision. Please consider high-quality faces: frontal, clear, and + /// face size is 200x200 pixels (100 pixels between eyes) or bigger. + /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. + /// The allowed image file size is from 1KB to 6MB. + /// * Faces are detectable when its size is 36x36 to 4096x4096 pixels. + /// If need to detect very small but clear faces, please try to enlarge + /// the input image. + /// * Up to 64 faces can be returned for an image. Faces are ranked by + /// face rectangle size from large to small. + /// * Face detector prefer frontal and near-frontal faces. There are + /// cases that faces may not be detected, e.g. exceptionally large face + /// angles (head-pose) or being occluded, or wrong image orientation. + /// * Attributes (age, gender, headPose, smile, facialHair, glasses, + /// emotion, hair, makeup, occlusion, accessories, blur, exposure and + /// noise) may not be perfectly accurate. HeadPose's pitch value is a + /// reserved field and will always return 0. + /// * Different 'recognitionModel' values are provided. If follow-up + /// operations like Verify, Identify, Find Similar are needed, please + /// specify the recognition model with 'recognitionModel' parameter. + /// The default value for 'recognitionModel' is 'recognition_v01', if + /// latest model needed, please explicitly specify the model you need + /// in this parameter. Once specified, the detected faceIds will be + /// associated with the specified recognition model. More details, + /// please refer to [How to specify a recognition model]() + /// /// /// /// Publicly reachable URL of an image @@ -195,10 +318,12 @@ public partial interface IFaceOperations /// /// /// Recognition model name. Recognition model is used when the face - /// features are extracted, so a recognition model version could be - /// provided when performing a Detection. If the user does not provide - /// recognition model, default is 'recognition_v01'. Possible values - /// include: 'recognition_v01', 'recognition_v02' + /// features are extracted and associated with (Large)FaceList or + /// (Large)PersonGroup. So a recognition model version could be + /// provided when performing a Detection and create (Large)FaceList or + /// (Large)PersonGroup create. If the user does not provide recognition + /// model, default is 'recognition_v01'. Possible values include: + /// 'recognition_v01', 'recognition_v02' /// /// /// The headers that will be added to request. @@ -215,7 +340,7 @@ public partial interface IFaceOperations /// /// Thrown when a required parameter is null /// - Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Verify whether two faces belong to a same person. Compares a face /// Id with a Person Id @@ -280,10 +405,12 @@ public partial interface IFaceOperations /// /// /// Recognition model name. Recognition model is used when the face - /// features are extracted, so a recognition model version could be - /// provided when performing a Detection. If the user does not provide - /// recognition model, default is 'recognition_v01'. Possible values - /// include: 'recognition_v01', 'recognition_v02' + /// features are extracted and associated with (Large)FaceList or + /// (Large)PersonGroup. So a recognition model version could be + /// provided when performing a Detection and create (Large)FaceList or + /// (Large)PersonGroup create. If the user does not provide recognition + /// model, default is 'recognition_v01'. Possible values include: + /// 'recognition_v01', 'recognition_v02' /// /// /// The headers that will be added to request. @@ -300,6 +427,6 @@ public partial interface IFaceOperations /// /// Thrown when a required parameter is null /// - Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs index d577d2cc3fb5..c4940d3617af 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs @@ -24,8 +24,42 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face public partial interface ILargeFaceListOperations { /// - /// Create an empty large face list. Up to 64 large face lists are - /// allowed to exist in one subscription. + /// Create an empty large face list with user-specified + /// largeFaceListId, name, an optional userData and recognitionModel. + /// <br /> Large face list is a list of faces, up to 1,000,000 + /// faces, and used by [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// <br /> After creation, user should use [LargeFaceList Face - + /// Add](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3) + /// to import the faces and [LargeFaceList - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/5a158422d2de3616c086f2d1) + /// to make it ready for [Face - + /// FindSimilar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// Faces are stored on server until [LargeFaceList - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd) + /// is called. + /// <br /> Find Similar is used for scenario like finding + /// celebrity-like faces, similar face filtering, or as a light way + /// face identification. But if the actual use is to identify person, + /// please use + /// [PersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244) + /// / + /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) + /// and [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> + /// * Free-tier subscription quota: 64 large face lists. + /// * S0-tier subscription quota: 1,000,000 large face lists. + /// + /// 'recognitionModel' should be specified to associate with this large + /// face list. The default value for 'recognitionModel' is + /// 'recognition_v01', if the latest model needed, please explicitly + /// specify the model you need in this parameter. New faces that are + /// added to an existing large face list will use the recognition model + /// that's already associated with the collection. Existing face + /// features in a large face list can't be updated to features + /// extracted by another version of recognition model. + /// /// /// /// Id referencing a particular large face list. @@ -51,9 +85,10 @@ public partial interface ILargeFaceListOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Retrieve a large face list's information. + /// Retrieve a large face list’s largeFaceListId, name, userData and + /// recognitionModel. /// /// /// Id referencing a particular large face list. @@ -143,8 +178,28 @@ public partial interface ILargeFaceListOperations /// Task> GetTrainingStatusWithHttpMessagesAsync(string largeFaceListId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Retrieve information about all existing large face lists. Only - /// largeFaceListId, name and userData will be returned. + /// List large face lists’ information of largeFaceListId, name, + /// userData and recognitionModel. <br /> + /// To get face information inside largeFaceList use [LargeFaceList + /// Face - + /// Get](/docs/services/563879b61984550e40cbbe8d/operations/5a158cf2d2de3616c086f2d5) + /// * Large face lists are stored in alphabetical order of + /// largeFaceListId. + /// * "start" parameter (string, optional) is a user-provided + /// largeFaceListId value that returned entries have larger ids by + /// string comparison. "start" set to empty to indicate return from the + /// first item. + /// * "top" parameter (int, optional) specifies the number of entries + /// to return. A maximal of 1000 entries can be returned in one call. + /// To fetch more, you can specify "start" with the last retuned + /// entry’s Id of the current call. + /// + /// For example, total 5 large person lists: "list1", ..., "list5". + /// <br /> "start=&top=" will return all 5 lists. + /// <br /> "start=&top=2" will return "list1", "list2". + /// <br /> "start=list2&top=3" will return "list3", "list4", + /// "list5". + /// /// /// /// The headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs index 79212f81d873..aab99f1c4c3a 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs @@ -23,8 +23,37 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face public partial interface ILargePersonGroupOperations { /// - /// Create a new large person group with specified largePersonGroupId, - /// name and user-provided userData. + /// Create a new large person group with user-specified + /// largePersonGroupId, name, an optional userData and + /// recognitionModel. + /// <br /> A large person group is the container of the uploaded + /// person data, including face images and face recognition feature, + /// and up to 1,000,000 people. + /// <br /> After creation, use [LargePersonGroup Person - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/599adcba3a7b9412a4d53f40) + /// to add person into the group, and call [LargePersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4) + /// to get this group ready for [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> The person face, image, and userData will be stored on + /// server until [LargePersonGroup Person - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/599ade5c6ac60f11b48b5aa2) + /// or [LargePersonGroup - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/599adc216ac60f11b48b5a9f) + /// is called. + /// <br /> + /// * Free-tier subscription quota: 1,000 large person groups. + /// * S0-tier subscription quota: 1,000,000 large person groups. + /// + /// 'recognitionModel' should be specified to associate with this large + /// person group. The default value for 'recognitionModel' is + /// 'recognition_v01', if the latest model needed, please explicitly + /// specify the model you need in this parameter. New faces that are + /// added to an existing large person group will use the recognition + /// model that's already associated with the collection. Existing face + /// features in a large person group can't be updated to features + /// extracted by another version of recognition model. + /// /// /// /// Id referencing a particular large person group. @@ -50,7 +79,7 @@ public partial interface ILargePersonGroupOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete an existing large person group. Persisted face features of /// all people in the large person group will also be deleted. @@ -73,7 +102,12 @@ public partial interface ILargePersonGroupOperations Task DeleteWithHttpMessagesAsync(string largePersonGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve the information of a large person group, including its - /// name and userData. + /// name, userData and recognitionModel. This API returns large person + /// group information only, use [LargePersonGroup Person - + /// List](/docs/services/563879b61984550e40cbbe8d/operations/599adda06ac60f11b48b5aa1) + /// instead to retrieve person information under the large person + /// group. + /// /// /// /// Id referencing a particular large person group. @@ -145,7 +179,25 @@ public partial interface ILargePersonGroupOperations /// Task> GetTrainingStatusWithHttpMessagesAsync(string largePersonGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List large person groups and their information. + /// List all existing large person groups’s largePesonGroupId, name, + /// userData and recognitionModel. + /// * Large person groups are stored in alphabetical order of + /// largePersonGroupId. + /// * "start" parameter (string, optional) is a user-provided + /// largePersonGroupId value that returned entries have larger ids by + /// string comparison. "start" set to empty to indicate return from the + /// first item. + /// * "top" parameter (int, optional) specifies the number of entries + /// to return. A maximal of 1000 entries can be returned in one call. + /// To fetch more, you can specify "start" with the last retuned + /// entry’s Id of the current call. + /// + /// For example, total 5 large person groups: "group1", ..., "group5". + /// <br /> "start=&top=" will return all 5 groups. + /// <br /> "start=&top=2" will return "group1", "group2". + /// <br /> "start=group2&top=3" will return "group3", + /// "group4", "group5". + /// /// /// /// List large person groups from the least largePersonGroupId greater diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs index 4a3e70a6585f..c0e4793fb249 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs @@ -23,8 +23,40 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face public partial interface IPersonGroupOperations { /// - /// Create a new person group with specified personGroupId, name and - /// user-provided userData. + /// Create a new person group with specified personGroupId, name, + /// user-provided userData and recognitionModel. + /// <br /> A person group is the container of the uploaded person + /// data, including face images and face recognition features. + /// <br /> After creation, use [PersonGroup Person - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523c) + /// to add persons into the group, and then call [PersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249) + /// to get this group ready for [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> The person's face, image, and userData will be stored + /// on server until [PersonGroup Person - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) + /// or [PersonGroup - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) + /// is called. + /// <br /> + /// * Free-tier subscription quota: 1,000 person groups. Each holds up + /// to 1,000 persons. + /// * S0-tier subscription quota: 1,000,000 person groups. Each holds + /// up to 10,000 persons. + /// * to handle larger scale face identification problem, please + /// consider using + /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). + /// + /// 'recognitionModel' should be specified to associate with this + /// person group. The default value for 'recognitionModel' is + /// 'recognition_v01', if the latest model needed, please explicitly + /// specify the model you need in this parameter. New faces that are + /// added to an existing person group will use the recognition model + /// that's already associated with the collection. Existing face + /// features in a person group can't be updated to features extracted + /// by another version of recognition model. + /// /// /// /// Id referencing a particular person group. @@ -50,7 +82,7 @@ public partial interface IPersonGroupOperations /// /// Thrown when a required parameter is null /// - Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete an existing person group. Persisted face features of all /// people in the person group will also be deleted. @@ -72,8 +104,10 @@ public partial interface IPersonGroupOperations /// Task DeleteWithHttpMessagesAsync(string personGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Retrieve the information of a person group, including its name and - /// userData. + /// Retrieve person group name, userData and recognitionModel. To get + /// person information under this personGroup, use [PersonGroup Person + /// - + /// List](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395241). /// /// /// Id referencing a particular person group. @@ -145,7 +179,24 @@ public partial interface IPersonGroupOperations /// Task> GetTrainingStatusWithHttpMessagesAsync(string personGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List person groups and their information. + /// List person groups’s pesonGroupId, name, userData and + /// recognitionModel. + /// * Person groups are stored in alphabetical order of personGroupId. + /// * "start" parameter (string, optional) is a user-provided + /// personGroupId value that returned entries have larger ids by string + /// comparison. "start" set to empty to indicate return from the first + /// item. + /// * "top" parameter (int, optional) specifies the number of entries + /// to return. A maximal of 1000 entries can be returned in one call. + /// To fetch more, you can specify "start" with the last retuned + /// entry’s Id of the current call. + /// + /// For example, total 5 person groups: "group1", ..., "group5". + /// <br /> "start=&top=" will return all 5 groups. + /// <br /> "start=&top=2" will return "group1", "group2". + /// <br /> "start=group2&top=3" will return "group3", + /// "group4", "group5". + /// /// /// /// List person groups from the least personGroupId greater than the diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs index a908456d8e00..28bccf86b4ad 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs @@ -51,8 +51,40 @@ public LargeFaceListOperations(FaceClient client) public FaceClient Client { get; private set; } /// - /// Create an empty large face list. Up to 64 large face lists are allowed to - /// exist in one subscription. + /// Create an empty large face list with user-specified largeFaceListId, name, + /// an optional userData and recognitionModel. + /// <br /> Large face list is a list of faces, up to 1,000,000 faces, and + /// used by [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// <br /> After creation, user should use [LargeFaceList Face - + /// Add](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3) + /// to import the faces and [LargeFaceList - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/5a158422d2de3616c086f2d1) + /// to make it ready for [Face - + /// FindSimilar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// Faces are stored on server until [LargeFaceList - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd) + /// is called. + /// <br /> Find Similar is used for scenario like finding celebrity-like + /// faces, similar face filtering, or as a light way face identification. But + /// if the actual use is to identify person, please use + /// [PersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244) + /// / + /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) + /// and [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> + /// * Free-tier subscription quota: 64 large face lists. + /// * S0-tier subscription quota: 1,000,000 large face lists. + /// + /// 'recognitionModel' should be specified to associate with this large face + /// list. The default value for 'recognitionModel' is 'recognition_v01', if the + /// latest model needed, please explicitly specify the model you need in this + /// parameter. New faces that are added to an existing large face list will use + /// the recognition model that's already associated with the collection. + /// Existing face features in a large face list can't be updated to features + /// extracted by another version of recognition model. + /// /// /// /// Id referencing a particular large face list. @@ -84,7 +116,7 @@ public LargeFaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string largeFaceListId, string name = default(string), string userData = default(string), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -120,7 +152,7 @@ public LargeFaceListOperations(FaceClient client) } } MetaDataContract body = new MetaDataContract(); - if (name != null || userData != null) + if (name != null || userData != null || recognitionModel != null) { body.Name = name; body.UserData = userData; @@ -232,7 +264,8 @@ public LargeFaceListOperations(FaceClient client) } /// - /// Retrieve a large face list's information. + /// Retrieve a large face list’s largeFaceListId, name, userData and + /// recognitionModel. /// /// /// Id referencing a particular large face list. @@ -880,8 +913,24 @@ public LargeFaceListOperations(FaceClient client) } /// - /// Retrieve information about all existing large face lists. Only - /// largeFaceListId, name and userData will be returned. + /// List large face lists’ information of largeFaceListId, name, userData and + /// recognitionModel. <br /> + /// To get face information inside largeFaceList use [LargeFaceList Face - + /// Get](/docs/services/563879b61984550e40cbbe8d/operations/5a158cf2d2de3616c086f2d5) + /// * Large face lists are stored in alphabetical order of largeFaceListId. + /// * "start" parameter (string, optional) is a user-provided largeFaceListId + /// value that returned entries have larger ids by string comparison. "start" + /// set to empty to indicate return from the first item. + /// * "top" parameter (int, optional) specifies the number of entries to + /// return. A maximal of 1000 entries can be returned in one call. To fetch + /// more, you can specify "start" with the last retuned entry’s Id of the + /// current call. + /// + /// For example, total 5 large person lists: "list1", ..., "list5". + /// <br /> "start=&top=" will return all 5 lists. + /// <br /> "start=&top=2" will return "list1", "list2". + /// <br /> "start=list2&top=3" will return "list3", "list4", "list5". + /// /// /// /// Headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs index 8a590752c27a..6f4251809351 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs @@ -23,8 +23,40 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face public static partial class LargeFaceListOperationsExtensions { /// - /// Create an empty large face list. Up to 64 large face lists are allowed to - /// exist in one subscription. + /// Create an empty large face list with user-specified largeFaceListId, name, + /// an optional userData and recognitionModel. + /// <br /> Large face list is a list of faces, up to 1,000,000 faces, and + /// used by [Face - Find + /// Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// <br /> After creation, user should use [LargeFaceList Face - + /// Add](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3) + /// to import the faces and [LargeFaceList - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/5a158422d2de3616c086f2d1) + /// to make it ready for [Face - + /// FindSimilar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + /// Faces are stored on server until [LargeFaceList - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd) + /// is called. + /// <br /> Find Similar is used for scenario like finding celebrity-like + /// faces, similar face filtering, or as a light way face identification. But + /// if the actual use is to identify person, please use + /// [PersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244) + /// / + /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) + /// and [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> + /// * Free-tier subscription quota: 64 large face lists. + /// * S0-tier subscription quota: 1,000,000 large face lists. + /// + /// 'recognitionModel' should be specified to associate with this large face + /// list. The default value for 'recognitionModel' is 'recognition_v01', if the + /// latest model needed, please explicitly specify the model you need in this + /// parameter. New faces that are added to an existing large face list will use + /// the recognition model that's already associated with the collection. + /// Existing face features in a large face list can't be updated to features + /// extracted by another version of recognition model. + /// /// /// /// The operations group for this extension method. @@ -44,13 +76,14 @@ public static partial class LargeFaceListOperationsExtensions /// /// The cancellation token. /// - public static async Task CreateAsync(this ILargeFaceListOperations operations, string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this ILargeFaceListOperations operations, string largeFaceListId, string name = default(string), string userData = default(string), string recognitionModel = default(string), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CreateWithHttpMessagesAsync(largeFaceListId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Retrieve a large face list's information. + /// Retrieve a large face list’s largeFaceListId, name, userData and + /// recognitionModel. /// /// /// The operations group for this extension method. @@ -131,8 +164,24 @@ public static partial class LargeFaceListOperationsExtensions } /// - /// Retrieve information about all existing large face lists. Only - /// largeFaceListId, name and userData will be returned. + /// List large face lists’ information of largeFaceListId, name, userData and + /// recognitionModel. <br /> + /// To get face information inside largeFaceList use [LargeFaceList Face - + /// Get](/docs/services/563879b61984550e40cbbe8d/operations/5a158cf2d2de3616c086f2d5) + /// * Large face lists are stored in alphabetical order of largeFaceListId. + /// * "start" parameter (string, optional) is a user-provided largeFaceListId + /// value that returned entries have larger ids by string comparison. "start" + /// set to empty to indicate return from the first item. + /// * "top" parameter (int, optional) specifies the number of entries to + /// return. A maximal of 1000 entries can be returned in one call. To fetch + /// more, you can specify "start" with the last retuned entry’s Id of the + /// current call. + /// + /// For example, total 5 large person lists: "list1", ..., "list5". + /// <br /> "start=&top=" will return all 5 lists. + /// <br /> "start=&top=2" will return "list1", "list2". + /// <br /> "start=list2&top=3" will return "list3", "list4", "list5". + /// /// /// /// The operations group for this extension method. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs index 580c17a5390f..aff16ff25b19 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs @@ -51,8 +51,35 @@ public LargePersonGroupOperations(FaceClient client) public FaceClient Client { get; private set; } /// - /// Create a new large person group with specified largePersonGroupId, name and - /// user-provided userData. + /// Create a new large person group with user-specified largePersonGroupId, + /// name, an optional userData and recognitionModel. + /// <br /> A large person group is the container of the uploaded person + /// data, including face images and face recognition feature, and up to + /// 1,000,000 people. + /// <br /> After creation, use [LargePersonGroup Person - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/599adcba3a7b9412a4d53f40) + /// to add person into the group, and call [LargePersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4) + /// to get this group ready for [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> The person face, image, and userData will be stored on server + /// until [LargePersonGroup Person - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/599ade5c6ac60f11b48b5aa2) + /// or [LargePersonGroup - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/599adc216ac60f11b48b5a9f) + /// is called. + /// <br /> + /// * Free-tier subscription quota: 1,000 large person groups. + /// * S0-tier subscription quota: 1,000,000 large person groups. + /// + /// 'recognitionModel' should be specified to associate with this large person + /// group. The default value for 'recognitionModel' is 'recognition_v01', if + /// the latest model needed, please explicitly specify the model you need in + /// this parameter. New faces that are added to an existing large person group + /// will use the recognition model that's already associated with the + /// collection. Existing face features in a large person group can't be updated + /// to features extracted by another version of recognition model. + /// /// /// /// Id referencing a particular large person group. @@ -84,7 +111,7 @@ public LargePersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string largePersonGroupId, string name = default(string), string userData = default(string), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -120,7 +147,7 @@ public LargePersonGroupOperations(FaceClient client) } } MetaDataContract body = new MetaDataContract(); - if (name != null || userData != null) + if (name != null || userData != null || recognitionModel != null) { body.Name = name; body.UserData = userData; @@ -376,8 +403,12 @@ public LargePersonGroupOperations(FaceClient client) } /// - /// Retrieve the information of a large person group, including its name and - /// userData. + /// Retrieve the information of a large person group, including its name, + /// userData and recognitionModel. This API returns large person group + /// information only, use [LargePersonGroup Person - + /// List](/docs/services/563879b61984550e40cbbe8d/operations/599adda06ac60f11b48b5aa1) + /// instead to retrieve person information under the large person group. + /// /// /// /// Id referencing a particular large person group. @@ -883,7 +914,24 @@ public LargePersonGroupOperations(FaceClient client) } /// - /// List large person groups and their information. + /// List all existing large person groups’s largePesonGroupId, name, userData + /// and recognitionModel. + /// * Large person groups are stored in alphabetical order of + /// largePersonGroupId. + /// * "start" parameter (string, optional) is a user-provided + /// largePersonGroupId value that returned entries have larger ids by string + /// comparison. "start" set to empty to indicate return from the first item. + /// * "top" parameter (int, optional) specifies the number of entries to + /// return. A maximal of 1000 entries can be returned in one call. To fetch + /// more, you can specify "start" with the last retuned entry’s Id of the + /// current call. + /// + /// For example, total 5 large person groups: "group1", ..., "group5". + /// <br /> "start=&top=" will return all 5 groups. + /// <br /> "start=&top=2" will return "group1", "group2". + /// <br /> "start=group2&top=3" will return "group3", "group4", + /// "group5". + /// /// /// /// List large person groups from the least largePersonGroupId greater than the diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs index 88535a08c674..ccc4dda956c6 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs @@ -22,8 +22,35 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face public static partial class LargePersonGroupOperationsExtensions { /// - /// Create a new large person group with specified largePersonGroupId, name and - /// user-provided userData. + /// Create a new large person group with user-specified largePersonGroupId, + /// name, an optional userData and recognitionModel. + /// <br /> A large person group is the container of the uploaded person + /// data, including face images and face recognition feature, and up to + /// 1,000,000 people. + /// <br /> After creation, use [LargePersonGroup Person - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/599adcba3a7b9412a4d53f40) + /// to add person into the group, and call [LargePersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4) + /// to get this group ready for [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> The person face, image, and userData will be stored on server + /// until [LargePersonGroup Person - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/599ade5c6ac60f11b48b5aa2) + /// or [LargePersonGroup - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/599adc216ac60f11b48b5a9f) + /// is called. + /// <br /> + /// * Free-tier subscription quota: 1,000 large person groups. + /// * S0-tier subscription quota: 1,000,000 large person groups. + /// + /// 'recognitionModel' should be specified to associate with this large person + /// group. The default value for 'recognitionModel' is 'recognition_v01', if + /// the latest model needed, please explicitly specify the model you need in + /// this parameter. New faces that are added to an existing large person group + /// will use the recognition model that's already associated with the + /// collection. Existing face features in a large person group can't be updated + /// to features extracted by another version of recognition model. + /// /// /// /// The operations group for this extension method. @@ -43,7 +70,7 @@ public static partial class LargePersonGroupOperationsExtensions /// /// The cancellation token. /// - public static async Task CreateAsync(this ILargePersonGroupOperations operations, string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this ILargePersonGroupOperations operations, string largePersonGroupId, string name = default(string), string userData = default(string), string recognitionModel = default(string), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CreateWithHttpMessagesAsync(largePersonGroupId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } @@ -67,8 +94,12 @@ public static partial class LargePersonGroupOperationsExtensions } /// - /// Retrieve the information of a large person group, including its name and - /// userData. + /// Retrieve the information of a large person group, including its name, + /// userData and recognitionModel. This API returns large person group + /// information only, use [LargePersonGroup Person - + /// List](/docs/services/563879b61984550e40cbbe8d/operations/599adda06ac60f11b48b5aa1) + /// instead to retrieve person information under the large person group. + /// /// /// /// The operations group for this extension method. @@ -133,7 +164,24 @@ public static partial class LargePersonGroupOperationsExtensions } /// - /// List large person groups and their information. + /// List all existing large person groups’s largePesonGroupId, name, userData + /// and recognitionModel. + /// * Large person groups are stored in alphabetical order of + /// largePersonGroupId. + /// * "start" parameter (string, optional) is a user-provided + /// largePersonGroupId value that returned entries have larger ids by string + /// comparison. "start" set to empty to indicate return from the first item. + /// * "top" parameter (int, optional) specifies the number of entries to + /// return. A maximal of 1000 entries can be returned in one call. To fetch + /// more, you can specify "start" with the last retuned entry’s Id of the + /// current call. + /// + /// For example, total 5 large person groups: "group1", ..., "group5". + /// <br /> "start=&top=" will return all 5 groups. + /// <br /> "start=&top=2" will return "group1", "group2". + /// <br /> "start=group2&top=3" will return "group3", "group4", + /// "group5". + /// /// /// /// The operations group for this extension method. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs index 0ac9b9fa0765..aebc7aadb104 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs @@ -32,7 +32,7 @@ public DetectedFace() /// /// Possible values include: /// 'recognition_v01', 'recognition_v02' - public DetectedFace(RecognitionModel recognitionModel, FaceRectangle faceRectangle, System.Guid? faceId = default(System.Guid?), FaceLandmarks faceLandmarks = default(FaceLandmarks), FaceAttributes faceAttributes = default(FaceAttributes)) + public DetectedFace(string recognitionModel, FaceRectangle faceRectangle, System.Guid? faceId = default(System.Guid?), FaceLandmarks faceLandmarks = default(FaceLandmarks), FaceAttributes faceAttributes = default(FaceAttributes)) { FaceId = faceId; RecognitionModel = recognitionModel; @@ -56,8 +56,8 @@ public DetectedFace() /// Gets or sets possible values include: 'recognition_v01', /// 'recognition_v02' /// - [JsonProperty(PropertyName = "RecognitionModel")] - public RecognitionModel RecognitionModel { get; set; } + [JsonProperty(PropertyName = "recognitionModel")] + public string RecognitionModel { get; set; } /// /// @@ -82,6 +82,10 @@ public DetectedFace() /// public virtual void Validate() { + if (RecognitionModel == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RecognitionModel"); + } if (FaceRectangle == null) { throw new ValidationException(ValidationRules.CannotBeNull, "FaceRectangle"); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs index 0a0c6c2fd788..8d1964f520ca 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs @@ -42,7 +42,7 @@ public FaceList() /// 'recognition_v01', 'recognition_v02' /// Persisted faces within the face /// list. - public FaceList(string faceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), IList persistedFaces = default(IList)) + public FaceList(string faceListId, string name = default(string), string userData = default(string), string recognitionModel = default(string), IList persistedFaces = default(IList)) : base(name, userData, recognitionModel) { FaceListId = faceListId; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs index f66850361e59..15f80796ada5 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs @@ -38,7 +38,7 @@ public LargeFaceList() /// exceed 16KB. /// Possible values include: /// 'recognition_v01', 'recognition_v02' - public LargeFaceList(string largeFaceListId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + public LargeFaceList(string largeFaceListId, string name = default(string), string userData = default(string), string recognitionModel = default(string)) : base(name, userData, recognitionModel) { LargeFaceListId = largeFaceListId; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs index 1bfca0602bf4..d067973fb4a7 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs @@ -38,7 +38,7 @@ public LargePersonGroup() /// exceed 16KB. /// Possible values include: /// 'recognition_v01', 'recognition_v02' - public LargePersonGroup(string largePersonGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + public LargePersonGroup(string largePersonGroupId, string name = default(string), string userData = default(string), string recognitionModel = default(string)) : base(name, userData, recognitionModel) { LargePersonGroupId = largePersonGroupId; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs index 5bae8ed57590..1691b146a1e5 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs @@ -37,7 +37,7 @@ public MetaDataContract() /// exceed 16KB. /// Possible values include: /// 'recognition_v01', 'recognition_v02' - public MetaDataContract(string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + public MetaDataContract(string name = default(string), string userData = default(string), string recognitionModel = default(string)) : base(name, userData) { RecognitionModel = recognitionModel; @@ -53,8 +53,8 @@ public MetaDataContract() /// Gets or sets possible values include: 'recognition_v01', /// 'recognition_v02' /// - [JsonProperty(PropertyName = "RecognitionModel")] - public RecognitionModel RecognitionModel { get; set; } + [JsonProperty(PropertyName = "recognitionModel")] + public string RecognitionModel { get; set; } /// /// Validate the object. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs index a70eefedfa54..932e07d2c8bc 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs @@ -38,7 +38,7 @@ public PersonGroup() /// exceed 16KB. /// Possible values include: /// 'recognition_v01', 'recognition_v02' - public PersonGroup(string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel)) + public PersonGroup(string personGroupId, string name = default(string), string userData = default(string), string recognitionModel = default(string)) : base(name, userData, recognitionModel) { PersonGroupId = personGroupId; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs index 19f1c30af27e..3a33d3125b0d 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs @@ -10,51 +10,13 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for RecognitionModel. /// - [JsonConverter(typeof(StringEnumConverter))] - public enum RecognitionModel + public static class RecognitionModel { - [EnumMember(Value = "recognition_v01")] - RecognitionV01, - [EnumMember(Value = "recognition_v02")] - RecognitionV02 - } - internal static class RecognitionModelEnumExtension - { - internal static string ToSerializedValue(this RecognitionModel? value) - { - return value == null ? null : ((RecognitionModel)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this RecognitionModel value) - { - switch( value ) - { - case RecognitionModel.RecognitionV01: - return "recognition_v01"; - case RecognitionModel.RecognitionV02: - return "recognition_v02"; - } - return null; - } - - internal static RecognitionModel? ParseRecognitionModel(this string value) - { - switch( value ) - { - case "recognition_v01": - return RecognitionModel.RecognitionV01; - case "recognition_v02": - return RecognitionModel.RecognitionV02; - } - return null; - } + public const string RecognitionV01 = "recognition_v01"; + public const string RecognitionV02 = "recognition_v02"; } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs index 982cbc7abe30..77b2caa3f320 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs @@ -51,8 +51,38 @@ public PersonGroupOperations(FaceClient client) public FaceClient Client { get; private set; } /// - /// Create a new person group with specified personGroupId, name and - /// user-provided userData. + /// Create a new person group with specified personGroupId, name, user-provided + /// userData and recognitionModel. + /// <br /> A person group is the container of the uploaded person data, + /// including face images and face recognition features. + /// <br /> After creation, use [PersonGroup Person - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523c) + /// to add persons into the group, and then call [PersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249) + /// to get this group ready for [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> The person's face, image, and userData will be stored on + /// server until [PersonGroup Person - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) + /// or [PersonGroup - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) + /// is called. + /// <br /> + /// * Free-tier subscription quota: 1,000 person groups. Each holds up to 1,000 + /// persons. + /// * S0-tier subscription quota: 1,000,000 person groups. Each holds up to + /// 10,000 persons. + /// * to handle larger scale face identification problem, please consider using + /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). + /// + /// 'recognitionModel' should be specified to associate with this person group. + /// The default value for 'recognitionModel' is 'recognition_v01', if the + /// latest model needed, please explicitly specify the model you need in this + /// parameter. New faces that are added to an existing person group will use + /// the recognition model that's already associated with the collection. + /// Existing face features in a person group can't be updated to features + /// extracted by another version of recognition model. + /// /// /// /// Id referencing a particular person group. @@ -84,7 +114,7 @@ public PersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateWithHttpMessagesAsync(string personGroupId, string name = default(string), string userData = default(string), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -120,7 +150,7 @@ public PersonGroupOperations(FaceClient client) } } MetaDataContract body = new MetaDataContract(); - if (name != null || userData != null) + if (name != null || userData != null || recognitionModel != null) { body.Name = name; body.UserData = userData; @@ -376,8 +406,9 @@ public PersonGroupOperations(FaceClient client) } /// - /// Retrieve the information of a person group, including its name and - /// userData. + /// Retrieve person group name, userData and recognitionModel. To get person + /// information under this personGroup, use [PersonGroup Person - + /// List](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395241). /// /// /// Id referencing a particular person group. @@ -882,7 +913,22 @@ public PersonGroupOperations(FaceClient client) } /// - /// List person groups and their information. + /// List person groups’s pesonGroupId, name, userData and recognitionModel. + /// * Person groups are stored in alphabetical order of personGroupId. + /// * "start" parameter (string, optional) is a user-provided personGroupId + /// value that returned entries have larger ids by string comparison. "start" + /// set to empty to indicate return from the first item. + /// * "top" parameter (int, optional) specifies the number of entries to + /// return. A maximal of 1000 entries can be returned in one call. To fetch + /// more, you can specify "start" with the last retuned entry’s Id of the + /// current call. + /// + /// For example, total 5 person groups: "group1", ..., "group5". + /// <br /> "start=&top=" will return all 5 groups. + /// <br /> "start=&top=2" will return "group1", "group2". + /// <br /> "start=group2&top=3" will return "group3", "group4", + /// "group5". + /// /// /// /// List person groups from the least personGroupId greater than the "start". diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs index 67c1a04c768f..6c3eb70feba9 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs @@ -22,8 +22,38 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face public static partial class PersonGroupOperationsExtensions { /// - /// Create a new person group with specified personGroupId, name and - /// user-provided userData. + /// Create a new person group with specified personGroupId, name, user-provided + /// userData and recognitionModel. + /// <br /> A person group is the container of the uploaded person data, + /// including face images and face recognition features. + /// <br /> After creation, use [PersonGroup Person - + /// Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523c) + /// to add persons into the group, and then call [PersonGroup - + /// Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249) + /// to get this group ready for [Face - + /// Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + /// <br /> The person's face, image, and userData will be stored on + /// server until [PersonGroup Person - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) + /// or [PersonGroup - + /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) + /// is called. + /// <br /> + /// * Free-tier subscription quota: 1,000 person groups. Each holds up to 1,000 + /// persons. + /// * S0-tier subscription quota: 1,000,000 person groups. Each holds up to + /// 10,000 persons. + /// * to handle larger scale face identification problem, please consider using + /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). + /// + /// 'recognitionModel' should be specified to associate with this person group. + /// The default value for 'recognitionModel' is 'recognition_v01', if the + /// latest model needed, please explicitly specify the model you need in this + /// parameter. New faces that are added to an existing person group will use + /// the recognition model that's already associated with the collection. + /// Existing face features in a person group can't be updated to features + /// extracted by another version of recognition model. + /// /// /// /// The operations group for this extension method. @@ -43,7 +73,7 @@ public static partial class PersonGroupOperationsExtensions /// /// The cancellation token. /// - public static async Task CreateAsync(this IPersonGroupOperations operations, string personGroupId, string name = default(string), string userData = default(string), RecognitionModel recognitionModel = default(RecognitionModel), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this IPersonGroupOperations operations, string personGroupId, string name = default(string), string userData = default(string), string recognitionModel = default(string), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CreateWithHttpMessagesAsync(personGroupId, name, userData, recognitionModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); } @@ -67,8 +97,9 @@ public static partial class PersonGroupOperationsExtensions } /// - /// Retrieve the information of a person group, including its name and - /// userData. + /// Retrieve person group name, userData and recognitionModel. To get person + /// information under this personGroup, use [PersonGroup Person - + /// List](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395241). /// /// /// The operations group for this extension method. @@ -132,7 +163,22 @@ public static partial class PersonGroupOperationsExtensions } /// - /// List person groups and their information. + /// List person groups’s pesonGroupId, name, userData and recognitionModel. + /// * Person groups are stored in alphabetical order of personGroupId. + /// * "start" parameter (string, optional) is a user-provided personGroupId + /// value that returned entries have larger ids by string comparison. "start" + /// set to empty to indicate return from the first item. + /// * "top" parameter (int, optional) specifies the number of entries to + /// return. A maximal of 1000 entries can be returned in one call. To fetch + /// more, you can specify "start" with the last retuned entry’s Id of the + /// current call. + /// + /// For example, total 5 person groups: "group1", ..., "group5". + /// <br /> "start=&top=" will return all 5 groups. + /// <br /> "start=&top=2" will return "group1", "group2". + /// <br /> "start=group2&top=3" will return "group3", "group4", + /// "group5". + /// /// /// /// The operations group for this extension method. From f2eaeea9dfc18e3008960b26b34ee9f63fbd9662 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 14 Mar 2019 15:11:59 +0800 Subject: [PATCH 5/9] Add link, Consistent with swagger. --- .../Face/Face/Generated/FaceOperations.cs | 45 ++++++++++--------- .../Generated/FaceOperationsExtensions.cs | 41 ++++++++--------- .../Face/Face/Generated/IFaceOperations.cs | 42 ++++++++--------- .../Generated/ILargeFaceListOperations.cs | 7 +-- .../Generated/ILargePersonGroupOperations.cs | 6 +-- .../Face/Generated/IPersonGroupOperations.cs | 6 +-- .../Face/Generated/LargeFaceListOperations.cs | 7 +-- .../LargeFaceListOperationsExtensions.cs | 7 +-- .../Generated/LargePersonGroupOperations.cs | 6 +-- .../LargePersonGroupOperationsExtensions.cs | 6 +-- .../Face/Generated/PersonGroupOperations.cs | 7 +-- .../PersonGroupOperationsExtensions.cs | 7 +-- 12 files changed, 98 insertions(+), 89 deletions(-) diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs index 7dbe839add6a..3d06b36aebb8 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs @@ -64,8 +64,7 @@ public FaceOperations(FaceClient client) /// containing persistedFaceIds that will also not expire. Depending on the /// input the returned similar faces list contains faceIds or persistedFaceIds /// ranked by similarity. - /// <br/> - /// <br/> Find similar has two working modes, "matchPerson" and + /// <br/>Find similar has two working modes, "matchPerson" and /// "matchFace". "matchPerson" is the default mode that it tries to find faces /// of the same person as possible by using internal same-person thresholds. It /// is useful to find a known person's other photos. Note that an empty list @@ -73,7 +72,6 @@ public FaceOperations(FaceClient client) /// ignores same-person thresholds and returns ranked similar faces anyway, /// even the similarity is low. It can be used in the cases like searching /// celebrity-looking faces. - /// <br/> /// <br/>The 'recognitionModel' associated with the query face's faceId /// should be the same as the 'recognitionModel' used by the target faceId /// array, face list or large face list. @@ -305,7 +303,7 @@ public FaceOperations(FaceClient client) } /// - /// Divide candidate faces into groups based on face similarity. + /// Divide candidate faces into groups based on face similarity.<br /> /// * The output is one or more disjointed face groups and a messyGroup. A face /// group contains faces that have similar looking, often of the same person. /// Face groups are ranked by group size, i.e. number of faces. Notice that @@ -504,7 +502,7 @@ public FaceOperations(FaceClient client) /// Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4). /// <br/> /// - /// Remarks: + /// Remarks:<br /> /// * The algorithm allows more than one face to be identified independently at /// the same request, but no more than 10 faces. /// * Each person in the person group/large person group could have more than @@ -749,7 +747,7 @@ public FaceOperations(FaceClient client) /// Verify whether two faces belong to a same person or whether one face /// belongs to a person. /// <br/> - /// Remarks: + /// Remarks:<br /> /// * Higher face image quality means better identification precision. Please /// consider high-quality faces: frontal, clear, and face size is 200x200 /// pixels (100 pixels between eyes) or bigger. @@ -919,7 +917,7 @@ public FaceOperations(FaceClient client) /// /// Detect human faces in an image, return face rectangles, and optionally with - /// faceIds, landmarks, and attributes. + /// faceIds, landmarks, and attributes.<br /> /// * Optional parameters including faceId, landmarks, and attributes. /// Attributes include age, gender, headPose, smile, facialHair, glasses, /// emotion, hair, makeup, occlusion, accessories, blur, exposure and noise. @@ -955,7 +953,8 @@ public FaceOperations(FaceClient client) /// 'recognitionModel' is 'recognition_v01', if latest model needed, please /// explicitly specify the model you need in this parameter. Once specified, /// the detected faceIds will be associated with the specified recognition - /// model. More details, please refer to [How to specify a recognition model]() + /// model. More details, please refer to [How to specify a recognition + /// model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model) /// /// /// @@ -977,12 +976,13 @@ public FaceOperations(FaceClient client) /// computational and time cost. /// /// - /// Recognition model name. Recognition model is used when the face features - /// are extracted and associated with (Large)FaceList or (Large)PersonGroup. So - /// a recognition model version could be provided when performing a Detection - /// and create (Large)FaceList or (Large)PersonGroup create. If the user does - /// not provide recognition model, default is 'recognition_v01'. Possible - /// values include: 'recognition_v01', 'recognition_v02' + /// Name of recognition model. Recognition model is used when the face features + /// are extracted and associated with detected faceIds, (Large)FaceList or + /// (Large)PersonGroup. A recognition model name can be provided when + /// performing Face - Detect or (Large)FaceList - Create or (Large)PersonGroup + /// - Create. The default value is 'recognition_v01', if latest model needed, + /// please explicitly specify the model you need. Possible values include: + /// 'recognition_v01', 'recognition_v02' /// /// /// Headers that will be added to request. @@ -1054,7 +1054,7 @@ public FaceOperations(FaceClient client) } if (recognitionModel != null) { - _queryParameters.Add(string.Format("RecognitionModel={0}", System.Uri.EscapeDataString(recognitionModel))); + _queryParameters.Add(string.Format("recognitionModel={0}", System.Uri.EscapeDataString(recognitionModel))); } if (_queryParameters.Count > 0) { @@ -1391,12 +1391,13 @@ public FaceOperations(FaceClient client) /// computational and time cost. /// /// - /// Recognition model name. Recognition model is used when the face features - /// are extracted and associated with (Large)FaceList or (Large)PersonGroup. So - /// a recognition model version could be provided when performing a Detection - /// and create (Large)FaceList or (Large)PersonGroup create. If the user does - /// not provide recognition model, default is 'recognition_v01'. Possible - /// values include: 'recognition_v01', 'recognition_v02' + /// Name of recognition model. Recognition model is used when the face features + /// are extracted and associated with detected faceIds, (Large)FaceList or + /// (Large)PersonGroup. A recognition model name can be provided when + /// performing Face - Detect or (Large)FaceList - Create or (Large)PersonGroup + /// - Create. The default value is 'recognition_v01', if latest model needed, + /// please explicitly specify the model you need. Possible values include: + /// 'recognition_v01', 'recognition_v02' /// /// /// Headers that will be added to request. @@ -1463,7 +1464,7 @@ public FaceOperations(FaceClient client) } if (recognitionModel != null) { - _queryParameters.Add(string.Format("RecognitionModel={0}", System.Uri.EscapeDataString(recognitionModel))); + _queryParameters.Add(string.Format("recognitionModel={0}", System.Uri.EscapeDataString(recognitionModel))); } if (_queryParameters.Count > 0) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs index 04842cad76d1..801074a4a9a4 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs @@ -36,8 +36,7 @@ public static partial class FaceOperationsExtensions /// containing persistedFaceIds that will also not expire. Depending on the /// input the returned similar faces list contains faceIds or persistedFaceIds /// ranked by similarity. - /// <br/> - /// <br/> Find similar has two working modes, "matchPerson" and + /// <br/>Find similar has two working modes, "matchPerson" and /// "matchFace". "matchPerson" is the default mode that it tries to find faces /// of the same person as possible by using internal same-person thresholds. It /// is useful to find a known person's other photos. Note that an empty list @@ -45,7 +44,6 @@ public static partial class FaceOperationsExtensions /// ignores same-person thresholds and returns ranked similar faces anyway, /// even the similarity is low. It can be used in the cases like searching /// celebrity-looking faces. - /// <br/> /// <br/>The 'recognitionModel' associated with the query face's faceId /// should be the same as the 'recognitionModel' used by the target faceId /// array, face list or large face list. @@ -96,7 +94,7 @@ public static partial class FaceOperationsExtensions } /// - /// Divide candidate faces into groups based on face similarity. + /// Divide candidate faces into groups based on face similarity.<br /> /// * The output is one or more disjointed face groups and a messyGroup. A face /// group contains faces that have similar looking, often of the same person. /// Face groups are ranked by group size, i.e. number of faces. Notice that @@ -145,7 +143,7 @@ public static partial class FaceOperationsExtensions /// Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4). /// <br/> /// - /// Remarks: + /// Remarks:<br /> /// * The algorithm allows more than one face to be identified independently at /// the same request, but no more than 10 faces. /// * Each person in the person group/large person group could have more than @@ -206,7 +204,7 @@ public static partial class FaceOperationsExtensions /// Verify whether two faces belong to a same person or whether one face /// belongs to a person. /// <br/> - /// Remarks: + /// Remarks:<br /> /// * Higher face image quality means better identification precision. Please /// consider high-quality faces: frontal, clear, and face size is 200x200 /// pixels (100 pixels between eyes) or bigger. @@ -239,7 +237,7 @@ public static partial class FaceOperationsExtensions /// /// Detect human faces in an image, return face rectangles, and optionally with - /// faceIds, landmarks, and attributes. + /// faceIds, landmarks, and attributes.<br /> /// * Optional parameters including faceId, landmarks, and attributes. /// Attributes include age, gender, headPose, smile, facialHair, glasses, /// emotion, hair, makeup, occlusion, accessories, blur, exposure and noise. @@ -275,7 +273,8 @@ public static partial class FaceOperationsExtensions /// 'recognitionModel' is 'recognition_v01', if latest model needed, please /// explicitly specify the model you need in this parameter. Once specified, /// the detected faceIds will be associated with the specified recognition - /// model. More details, please refer to [How to specify a recognition model]() + /// model. More details, please refer to [How to specify a recognition + /// model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model) /// /// /// @@ -300,12 +299,13 @@ public static partial class FaceOperationsExtensions /// computational and time cost. /// /// - /// Recognition model name. Recognition model is used when the face features - /// are extracted and associated with (Large)FaceList or (Large)PersonGroup. So - /// a recognition model version could be provided when performing a Detection - /// and create (Large)FaceList or (Large)PersonGroup create. If the user does - /// not provide recognition model, default is 'recognition_v01'. Possible - /// values include: 'recognition_v01', 'recognition_v02' + /// Name of recognition model. Recognition model is used when the face features + /// are extracted and associated with detected faceIds, (Large)FaceList or + /// (Large)PersonGroup. A recognition model name can be provided when + /// performing Face - Detect or (Large)FaceList - Create or (Large)PersonGroup + /// - Create. The default value is 'recognition_v01', if latest model needed, + /// please explicitly specify the model you need. Possible values include: + /// 'recognition_v01', 'recognition_v02' /// /// /// The cancellation token. @@ -382,12 +382,13 @@ public static partial class FaceOperationsExtensions /// computational and time cost. /// /// - /// Recognition model name. Recognition model is used when the face features - /// are extracted and associated with (Large)FaceList or (Large)PersonGroup. So - /// a recognition model version could be provided when performing a Detection - /// and create (Large)FaceList or (Large)PersonGroup create. If the user does - /// not provide recognition model, default is 'recognition_v01'. Possible - /// values include: 'recognition_v01', 'recognition_v02' + /// Name of recognition model. Recognition model is used when the face features + /// are extracted and associated with detected faceIds, (Large)FaceList or + /// (Large)PersonGroup. A recognition model name can be provided when + /// performing Face - Detect or (Large)FaceList - Create or (Large)PersonGroup + /// - Create. The default value is 'recognition_v01', if latest model needed, + /// please explicitly specify the model you need. Possible values include: + /// 'recognition_v01', 'recognition_v02' /// /// /// The cancellation token. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs index 8d5c4bfd2445..4ac86facbca8 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs @@ -37,8 +37,7 @@ public partial interface IFaceOperations /// containing persistedFaceIds that will also not expire. Depending on /// the input the returned similar faces list contains faceIds or /// persistedFaceIds ranked by similarity. - /// <br/> - /// <br/> Find similar has two working modes, "matchPerson" and + /// <br/>Find similar has two working modes, "matchPerson" and /// "matchFace". "matchPerson" is the default mode that it tries to /// find faces of the same person as possible by using internal /// same-person thresholds. It is useful to find a known person's other @@ -47,7 +46,6 @@ public partial interface IFaceOperations /// thresholds and returns ranked similar faces anyway, even the /// similarity is low. It can be used in the cases like searching /// celebrity-looking faces. - /// <br/> /// <br/>The 'recognitionModel' associated with the query face's /// faceId should be the same as the 'recognitionModel' used by the /// target faceId array, face list or large face list. @@ -104,7 +102,8 @@ public partial interface IFaceOperations /// Task>> FindSimilarWithHttpMessagesAsync(System.Guid faceId, string faceListId = default(string), string largeFaceListId = default(string), IList faceIds = default(IList), int? maxNumOfCandidatesReturned = 20, FindSimilarMatchMode mode = default(FindSimilarMatchMode), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Divide candidate faces into groups based on face similarity. + /// Divide candidate faces into groups based on face similarity.<br + /// /> /// * The output is one or more disjointed face groups and a /// messyGroup. A face group contains faces that have similar looking, /// often of the same person. Face groups are ranked by group size, @@ -158,7 +157,7 @@ public partial interface IFaceOperations /// Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4). /// <br/> /// - /// Remarks: + /// Remarks:<br /> /// * The algorithm allows more than one face to be identified /// independently at the same request, but no more than 10 faces. /// * Each person in the person group/large person group could have @@ -222,7 +221,7 @@ public partial interface IFaceOperations /// Verify whether two faces belong to a same person or whether one /// face belongs to a person. /// <br/> - /// Remarks: + /// Remarks:<br /> /// * Higher face image quality means better identification precision. /// Please consider high-quality faces: frontal, clear, and face size /// is 200x200 pixels (100 pixels between eyes) or bigger. @@ -257,7 +256,7 @@ public partial interface IFaceOperations Task> VerifyFaceToFaceWithHttpMessagesAsync(System.Guid faceId1, System.Guid faceId2, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Detect human faces in an image, return face rectangles, and - /// optionally with faceIds, landmarks, and attributes. + /// optionally with faceIds, landmarks, and attributes.<br /> /// * Optional parameters including faceId, landmarks, and attributes. /// Attributes include age, gender, headPose, smile, facialHair, /// glasses, emotion, hair, makeup, occlusion, accessories, blur, @@ -295,7 +294,8 @@ public partial interface IFaceOperations /// latest model needed, please explicitly specify the model you need /// in this parameter. Once specified, the detected faceIds will be /// associated with the specified recognition model. More details, - /// please refer to [How to specify a recognition model]() + /// please refer to [How to specify a recognition + /// model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model) /// /// /// @@ -317,12 +317,13 @@ public partial interface IFaceOperations /// analysis has additional computational and time cost. /// /// - /// Recognition model name. Recognition model is used when the face - /// features are extracted and associated with (Large)FaceList or - /// (Large)PersonGroup. So a recognition model version could be - /// provided when performing a Detection and create (Large)FaceList or - /// (Large)PersonGroup create. If the user does not provide recognition - /// model, default is 'recognition_v01'. Possible values include: + /// Name of recognition model. Recognition model is used when the face + /// features are extracted and associated with detected faceIds, + /// (Large)FaceList or (Large)PersonGroup. A recognition model name can + /// be provided when performing Face - Detect or (Large)FaceList - + /// Create or (Large)PersonGroup - Create. The default value is + /// 'recognition_v01', if latest model needed, please explicitly + /// specify the model you need. Possible values include: /// 'recognition_v01', 'recognition_v02' /// /// @@ -404,12 +405,13 @@ public partial interface IFaceOperations /// analysis has additional computational and time cost. /// /// - /// Recognition model name. Recognition model is used when the face - /// features are extracted and associated with (Large)FaceList or - /// (Large)PersonGroup. So a recognition model version could be - /// provided when performing a Detection and create (Large)FaceList or - /// (Large)PersonGroup create. If the user does not provide recognition - /// model, default is 'recognition_v01'. Possible values include: + /// Name of recognition model. Recognition model is used when the face + /// features are extracted and associated with detected faceIds, + /// (Large)FaceList or (Large)PersonGroup. A recognition model name can + /// be provided when performing Face - Detect or (Large)FaceList - + /// Create or (Large)PersonGroup - Create. The default value is + /// 'recognition_v01', if latest model needed, please explicitly + /// specify the model you need. Possible values include: /// 'recognition_v01', 'recognition_v02' /// /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs index c4940d3617af..ced201d3d1b5 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs @@ -50,7 +50,7 @@ public partial interface ILargeFaceListOperations /// <br /> /// * Free-tier subscription quota: 64 large face lists. /// * S0-tier subscription quota: 1,000,000 large face lists. - /// + /// <br /> /// 'recognitionModel' should be specified to associate with this large /// face list. The default value for 'recognitionModel' is /// 'recognition_v01', if the latest model needed, please explicitly @@ -182,7 +182,8 @@ public partial interface ILargeFaceListOperations /// userData and recognitionModel. <br /> /// To get face information inside largeFaceList use [LargeFaceList /// Face - - /// Get](/docs/services/563879b61984550e40cbbe8d/operations/5a158cf2d2de3616c086f2d5) + /// Get](/docs/services/563879b61984550e40cbbe8d/operations/5a158cf2d2de3616c086f2d5)<br + /// /> /// * Large face lists are stored in alphabetical order of /// largeFaceListId. /// * "start" parameter (string, optional) is a user-provided @@ -193,7 +194,7 @@ public partial interface ILargeFaceListOperations /// to return. A maximal of 1000 entries can be returned in one call. /// To fetch more, you can specify "start" with the last retuned /// entry’s Id of the current call. - /// + /// <br /> /// For example, total 5 large person lists: "list1", ..., "list5". /// <br /> "start=&top=" will return all 5 lists. /// <br /> "start=&top=2" will return "list1", "list2". diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs index aab99f1c4c3a..0470a74bf260 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs @@ -44,7 +44,7 @@ public partial interface ILargePersonGroupOperations /// <br /> /// * Free-tier subscription quota: 1,000 large person groups. /// * S0-tier subscription quota: 1,000,000 large person groups. - /// + /// <br /> /// 'recognitionModel' should be specified to associate with this large /// person group. The default value for 'recognitionModel' is /// 'recognition_v01', if the latest model needed, please explicitly @@ -180,7 +180,7 @@ public partial interface ILargePersonGroupOperations Task> GetTrainingStatusWithHttpMessagesAsync(string largePersonGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// List all existing large person groups’s largePesonGroupId, name, - /// userData and recognitionModel. + /// userData and recognitionModel.<br /> /// * Large person groups are stored in alphabetical order of /// largePersonGroupId. /// * "start" parameter (string, optional) is a user-provided @@ -191,7 +191,7 @@ public partial interface ILargePersonGroupOperations /// to return. A maximal of 1000 entries can be returned in one call. /// To fetch more, you can specify "start" with the last retuned /// entry’s Id of the current call. - /// + /// <br /> /// For example, total 5 large person groups: "group1", ..., "group5". /// <br /> "start=&top=" will return all 5 groups. /// <br /> "start=&top=2" will return "group1", "group2". diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs index c0e4793fb249..a47eff43e1c6 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs @@ -47,7 +47,7 @@ public partial interface IPersonGroupOperations /// * to handle larger scale face identification problem, please /// consider using /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). - /// + /// <br /> /// 'recognitionModel' should be specified to associate with this /// person group. The default value for 'recognitionModel' is /// 'recognition_v01', if the latest model needed, please explicitly @@ -180,7 +180,7 @@ public partial interface IPersonGroupOperations Task> GetTrainingStatusWithHttpMessagesAsync(string personGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// List person groups’s pesonGroupId, name, userData and - /// recognitionModel. + /// recognitionModel.<br /> /// * Person groups are stored in alphabetical order of personGroupId. /// * "start" parameter (string, optional) is a user-provided /// personGroupId value that returned entries have larger ids by string @@ -190,7 +190,7 @@ public partial interface IPersonGroupOperations /// to return. A maximal of 1000 entries can be returned in one call. /// To fetch more, you can specify "start" with the last retuned /// entry’s Id of the current call. - /// + /// <br /> /// For example, total 5 person groups: "group1", ..., "group5". /// <br /> "start=&top=" will return all 5 groups. /// <br /> "start=&top=2" will return "group1", "group2". diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs index 28bccf86b4ad..d73551853fa0 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs @@ -76,7 +76,7 @@ public LargeFaceListOperations(FaceClient client) /// <br /> /// * Free-tier subscription quota: 64 large face lists. /// * S0-tier subscription quota: 1,000,000 large face lists. - /// + /// <br /> /// 'recognitionModel' should be specified to associate with this large face /// list. The default value for 'recognitionModel' is 'recognition_v01', if the /// latest model needed, please explicitly specify the model you need in this @@ -916,7 +916,8 @@ public LargeFaceListOperations(FaceClient client) /// List large face lists’ information of largeFaceListId, name, userData and /// recognitionModel. <br /> /// To get face information inside largeFaceList use [LargeFaceList Face - - /// Get](/docs/services/563879b61984550e40cbbe8d/operations/5a158cf2d2de3616c086f2d5) + /// Get](/docs/services/563879b61984550e40cbbe8d/operations/5a158cf2d2de3616c086f2d5)<br + /// /> /// * Large face lists are stored in alphabetical order of largeFaceListId. /// * "start" parameter (string, optional) is a user-provided largeFaceListId /// value that returned entries have larger ids by string comparison. "start" @@ -925,7 +926,7 @@ public LargeFaceListOperations(FaceClient client) /// return. A maximal of 1000 entries can be returned in one call. To fetch /// more, you can specify "start" with the last retuned entry’s Id of the /// current call. - /// + /// <br /> /// For example, total 5 large person lists: "list1", ..., "list5". /// <br /> "start=&top=" will return all 5 lists. /// <br /> "start=&top=2" will return "list1", "list2". diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs index 6f4251809351..5b626fe71235 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs @@ -48,7 +48,7 @@ public static partial class LargeFaceListOperationsExtensions /// <br /> /// * Free-tier subscription quota: 64 large face lists. /// * S0-tier subscription quota: 1,000,000 large face lists. - /// + /// <br /> /// 'recognitionModel' should be specified to associate with this large face /// list. The default value for 'recognitionModel' is 'recognition_v01', if the /// latest model needed, please explicitly specify the model you need in this @@ -167,7 +167,8 @@ public static partial class LargeFaceListOperationsExtensions /// List large face lists’ information of largeFaceListId, name, userData and /// recognitionModel. <br /> /// To get face information inside largeFaceList use [LargeFaceList Face - - /// Get](/docs/services/563879b61984550e40cbbe8d/operations/5a158cf2d2de3616c086f2d5) + /// Get](/docs/services/563879b61984550e40cbbe8d/operations/5a158cf2d2de3616c086f2d5)<br + /// /> /// * Large face lists are stored in alphabetical order of largeFaceListId. /// * "start" parameter (string, optional) is a user-provided largeFaceListId /// value that returned entries have larger ids by string comparison. "start" @@ -176,7 +177,7 @@ public static partial class LargeFaceListOperationsExtensions /// return. A maximal of 1000 entries can be returned in one call. To fetch /// more, you can specify "start" with the last retuned entry’s Id of the /// current call. - /// + /// <br /> /// For example, total 5 large person lists: "list1", ..., "list5". /// <br /> "start=&top=" will return all 5 lists. /// <br /> "start=&top=2" will return "list1", "list2". diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs index aff16ff25b19..199351753d8f 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs @@ -71,7 +71,7 @@ public LargePersonGroupOperations(FaceClient client) /// <br /> /// * Free-tier subscription quota: 1,000 large person groups. /// * S0-tier subscription quota: 1,000,000 large person groups. - /// + /// <br /> /// 'recognitionModel' should be specified to associate with this large person /// group. The default value for 'recognitionModel' is 'recognition_v01', if /// the latest model needed, please explicitly specify the model you need in @@ -915,7 +915,7 @@ public LargePersonGroupOperations(FaceClient client) /// /// List all existing large person groups’s largePesonGroupId, name, userData - /// and recognitionModel. + /// and recognitionModel.<br /> /// * Large person groups are stored in alphabetical order of /// largePersonGroupId. /// * "start" parameter (string, optional) is a user-provided @@ -925,7 +925,7 @@ public LargePersonGroupOperations(FaceClient client) /// return. A maximal of 1000 entries can be returned in one call. To fetch /// more, you can specify "start" with the last retuned entry’s Id of the /// current call. - /// + /// <br /> /// For example, total 5 large person groups: "group1", ..., "group5". /// <br /> "start=&top=" will return all 5 groups. /// <br /> "start=&top=2" will return "group1", "group2". diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs index ccc4dda956c6..f76c01c94263 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs @@ -42,7 +42,7 @@ public static partial class LargePersonGroupOperationsExtensions /// <br /> /// * Free-tier subscription quota: 1,000 large person groups. /// * S0-tier subscription quota: 1,000,000 large person groups. - /// + /// <br /> /// 'recognitionModel' should be specified to associate with this large person /// group. The default value for 'recognitionModel' is 'recognition_v01', if /// the latest model needed, please explicitly specify the model you need in @@ -165,7 +165,7 @@ public static partial class LargePersonGroupOperationsExtensions /// /// List all existing large person groups’s largePesonGroupId, name, userData - /// and recognitionModel. + /// and recognitionModel.<br /> /// * Large person groups are stored in alphabetical order of /// largePersonGroupId. /// * "start" parameter (string, optional) is a user-provided @@ -175,7 +175,7 @@ public static partial class LargePersonGroupOperationsExtensions /// return. A maximal of 1000 entries can be returned in one call. To fetch /// more, you can specify "start" with the last retuned entry’s Id of the /// current call. - /// + /// <br /> /// For example, total 5 large person groups: "group1", ..., "group5". /// <br /> "start=&top=" will return all 5 groups. /// <br /> "start=&top=2" will return "group1", "group2". diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs index 77b2caa3f320..ea2eeb4cea8a 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs @@ -74,7 +74,7 @@ public PersonGroupOperations(FaceClient client) /// 10,000 persons. /// * to handle larger scale face identification problem, please consider using /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). - /// + /// <br /> /// 'recognitionModel' should be specified to associate with this person group. /// The default value for 'recognitionModel' is 'recognition_v01', if the /// latest model needed, please explicitly specify the model you need in this @@ -913,7 +913,8 @@ public PersonGroupOperations(FaceClient client) } /// - /// List person groups’s pesonGroupId, name, userData and recognitionModel. + /// List person groups’s pesonGroupId, name, userData and + /// recognitionModel.<br /> /// * Person groups are stored in alphabetical order of personGroupId. /// * "start" parameter (string, optional) is a user-provided personGroupId /// value that returned entries have larger ids by string comparison. "start" @@ -922,7 +923,7 @@ public PersonGroupOperations(FaceClient client) /// return. A maximal of 1000 entries can be returned in one call. To fetch /// more, you can specify "start" with the last retuned entry’s Id of the /// current call. - /// + /// <br /> /// For example, total 5 person groups: "group1", ..., "group5". /// <br /> "start=&top=" will return all 5 groups. /// <br /> "start=&top=2" will return "group1", "group2". diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs index 6c3eb70feba9..9aedbd7d82fd 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs @@ -45,7 +45,7 @@ public static partial class PersonGroupOperationsExtensions /// 10,000 persons. /// * to handle larger scale face identification problem, please consider using /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). - /// + /// <br /> /// 'recognitionModel' should be specified to associate with this person group. /// The default value for 'recognitionModel' is 'recognition_v01', if the /// latest model needed, please explicitly specify the model you need in this @@ -163,7 +163,8 @@ public static partial class PersonGroupOperationsExtensions } /// - /// List person groups’s pesonGroupId, name, userData and recognitionModel. + /// List person groups’s pesonGroupId, name, userData and + /// recognitionModel.<br /> /// * Person groups are stored in alphabetical order of personGroupId. /// * "start" parameter (string, optional) is a user-provided personGroupId /// value that returned entries have larger ids by string comparison. "start" @@ -172,7 +173,7 @@ public static partial class PersonGroupOperationsExtensions /// return. A maximal of 1000 entries can be returned in one call. To fetch /// more, you can specify "start" with the last retuned entry’s Id of the /// current call. - /// + /// <br /> /// For example, total 5 person groups: "group1", ..., "group5". /// <br /> "start=&top=" will return all 5 groups. /// <br /> "start=&top=2" will return "group1", "group2". From e8ac2acadb0904f574af1c2b3e49683e9c101f3b Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 14 Mar 2019 16:24:25 +0800 Subject: [PATCH 6/9] rename "recognition_v01(2)" to "recognition_01(2)". --- .../Face/Face/Generated/FaceListOperations.cs | 6 +++--- .../Face/Generated/FaceListOperationsExtensions.cs | 6 +++--- .../Vision/Face/Face/Generated/FaceOperations.cs | 10 +++++----- .../Face/Generated/FaceOperationsExtensions.cs | 10 +++++----- .../Face/Face/Generated/IFaceListOperations.cs | 4 ++-- .../Vision/Face/Face/Generated/IFaceOperations.cs | 14 +++++++------- .../Face/Generated/ILargeFaceListOperations.cs | 4 ++-- .../Face/Generated/ILargePersonGroupOperations.cs | 4 ++-- .../Face/Face/Generated/IPersonGroupOperations.cs | 4 ++-- .../Face/Face/Generated/LargeFaceListOperations.cs | 4 ++-- .../Generated/LargeFaceListOperationsExtensions.cs | 4 ++-- .../Face/Generated/LargePersonGroupOperations.cs | 14 +++++++------- .../LargePersonGroupOperationsExtensions.cs | 14 +++++++------- .../Face/Face/Generated/Models/DetectedFace.cs | 6 +++--- .../Vision/Face/Face/Generated/Models/FaceList.cs | 2 +- .../Face/Face/Generated/Models/LargeFaceList.cs | 2 +- .../Face/Face/Generated/Models/LargePersonGroup.cs | 2 +- .../Face/Face/Generated/Models/MetaDataContract.cs | 6 +++--- .../Face/Face/Generated/Models/PersonGroup.cs | 2 +- .../Face/Face/Generated/Models/RecognitionModel.cs | 4 ++-- .../Face/Face/Generated/PersonGroupOperations.cs | 6 +++--- .../Generated/PersonGroupOperationsExtensions.cs | 6 +++--- 22 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs index 29881a023e0a..9b289fb8cf26 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs @@ -74,8 +74,8 @@ public FaceListOperations(FaceClient client) /// [LargeFaceList](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) /// when the face number is large. It can support up to 1,000,000 faces. /// 'recognitionModel' should be specified to associate with this face list. - /// The default value for 'recognitionModel' is 'recognition_v01', if the - /// latest model needed, please explicitly specify the model you need in this + /// The default value for 'recognitionModel' is 'recognition_01', if the latest + /// model needed, please explicitly specify the model you need in this /// parameter. New faces that are added to an existing face list will use the /// recognition model that's already associated with the collection. Existing /// face features in a face list can't be updated to features extracted by @@ -92,7 +92,7 @@ public FaceListOperations(FaceClient client) /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// Headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs index 9bf0fbfcdd4f..9a24ca784013 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs @@ -46,8 +46,8 @@ public static partial class FaceListOperationsExtensions /// [LargeFaceList](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) /// when the face number is large. It can support up to 1,000,000 faces. /// 'recognitionModel' should be specified to associate with this face list. - /// The default value for 'recognitionModel' is 'recognition_v01', if the - /// latest model needed, please explicitly specify the model you need in this + /// The default value for 'recognitionModel' is 'recognition_01', if the latest + /// model needed, please explicitly specify the model you need in this /// parameter. New faces that are added to an existing face list will use the /// recognition model that's already associated with the collection. Existing /// face features in a face list can't be updated to features extracted by @@ -67,7 +67,7 @@ public static partial class FaceListOperationsExtensions /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// The cancellation token. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs index 3d06b36aebb8..85cd53d404c3 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs @@ -950,7 +950,7 @@ public FaceOperations(FaceClient client) /// * Different 'recognitionModel' values are provided. If follow-up operations /// like Verify, Identify, Find Similar are needed, please specify the /// recognition model with 'recognitionModel' parameter. The default value for - /// 'recognitionModel' is 'recognition_v01', if latest model needed, please + /// 'recognitionModel' is 'recognition_01', if latest model needed, please /// explicitly specify the model you need in this parameter. Once specified, /// the detected faceIds will be associated with the specified recognition /// model. More details, please refer to [How to specify a recognition @@ -980,9 +980,9 @@ public FaceOperations(FaceClient client) /// are extracted and associated with detected faceIds, (Large)FaceList or /// (Large)PersonGroup. A recognition model name can be provided when /// performing Face - Detect or (Large)FaceList - Create or (Large)PersonGroup - /// - Create. The default value is 'recognition_v01', if latest model needed, + /// - Create. The default value is 'recognition_01', if latest model needed, /// please explicitly specify the model you need. Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', 'recognition_02' /// /// /// Headers that will be added to request. @@ -1395,9 +1395,9 @@ public FaceOperations(FaceClient client) /// are extracted and associated with detected faceIds, (Large)FaceList or /// (Large)PersonGroup. A recognition model name can be provided when /// performing Face - Detect or (Large)FaceList - Create or (Large)PersonGroup - /// - Create. The default value is 'recognition_v01', if latest model needed, + /// - Create. The default value is 'recognition_01', if latest model needed, /// please explicitly specify the model you need. Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', 'recognition_02' /// /// /// Headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs index 801074a4a9a4..6287ae99211b 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs @@ -270,7 +270,7 @@ public static partial class FaceOperationsExtensions /// * Different 'recognitionModel' values are provided. If follow-up operations /// like Verify, Identify, Find Similar are needed, please specify the /// recognition model with 'recognitionModel' parameter. The default value for - /// 'recognitionModel' is 'recognition_v01', if latest model needed, please + /// 'recognitionModel' is 'recognition_01', if latest model needed, please /// explicitly specify the model you need in this parameter. Once specified, /// the detected faceIds will be associated with the specified recognition /// model. More details, please refer to [How to specify a recognition @@ -303,9 +303,9 @@ public static partial class FaceOperationsExtensions /// are extracted and associated with detected faceIds, (Large)FaceList or /// (Large)PersonGroup. A recognition model name can be provided when /// performing Face - Detect or (Large)FaceList - Create or (Large)PersonGroup - /// - Create. The default value is 'recognition_v01', if latest model needed, + /// - Create. The default value is 'recognition_01', if latest model needed, /// please explicitly specify the model you need. Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', 'recognition_02' /// /// /// The cancellation token. @@ -386,9 +386,9 @@ public static partial class FaceOperationsExtensions /// are extracted and associated with detected faceIds, (Large)FaceList or /// (Large)PersonGroup. A recognition model name can be provided when /// performing Face - Detect or (Large)FaceList - Create or (Large)PersonGroup - /// - Create. The default value is 'recognition_v01', if latest model needed, + /// - Create. The default value is 'recognition_01', if latest model needed, /// please explicitly specify the model you need. Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', 'recognition_02' /// /// /// The cancellation token. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs index 00256812299c..d6f0eb584a2f 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs @@ -49,7 +49,7 @@ public partial interface IFaceListOperations /// when the face number is large. It can support up to 1,000,000 /// faces. 'recognitionModel' should be specified to associate with /// this face list. The default value for 'recognitionModel' is - /// 'recognition_v01', if the latest model needed, please explicitly + /// 'recognition_01', if the latest model needed, please explicitly /// specify the model you need in this parameter. New faces that are /// added to an existing face list will use the recognition model /// that's already associated with the collection. Existing face @@ -67,7 +67,7 @@ public partial interface IFaceListOperations /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// The headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs index 4ac86facbca8..5534ccf36a64 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs @@ -290,7 +290,7 @@ public partial interface IFaceOperations /// * Different 'recognitionModel' values are provided. If follow-up /// operations like Verify, Identify, Find Similar are needed, please /// specify the recognition model with 'recognitionModel' parameter. - /// The default value for 'recognitionModel' is 'recognition_v01', if + /// The default value for 'recognitionModel' is 'recognition_01', if /// latest model needed, please explicitly specify the model you need /// in this parameter. Once specified, the detected faceIds will be /// associated with the specified recognition model. More details, @@ -322,9 +322,9 @@ public partial interface IFaceOperations /// (Large)FaceList or (Large)PersonGroup. A recognition model name can /// be provided when performing Face - Detect or (Large)FaceList - /// Create or (Large)PersonGroup - Create. The default value is - /// 'recognition_v01', if latest model needed, please explicitly - /// specify the model you need. Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', if latest model needed, please explicitly specify + /// the model you need. Possible values include: 'recognition_01', + /// 'recognition_02' /// /// /// The headers that will be added to request. @@ -410,9 +410,9 @@ public partial interface IFaceOperations /// (Large)FaceList or (Large)PersonGroup. A recognition model name can /// be provided when performing Face - Detect or (Large)FaceList - /// Create or (Large)PersonGroup - Create. The default value is - /// 'recognition_v01', if latest model needed, please explicitly - /// specify the model you need. Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', if latest model needed, please explicitly specify + /// the model you need. Possible values include: 'recognition_01', + /// 'recognition_02' /// /// /// The headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs index ced201d3d1b5..10cdff88d10c 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs @@ -53,7 +53,7 @@ public partial interface ILargeFaceListOperations /// <br /> /// 'recognitionModel' should be specified to associate with this large /// face list. The default value for 'recognitionModel' is - /// 'recognition_v01', if the latest model needed, please explicitly + /// 'recognition_01', if the latest model needed, please explicitly /// specify the model you need in this parameter. New faces that are /// added to an existing large face list will use the recognition model /// that's already associated with the collection. Existing face @@ -71,7 +71,7 @@ public partial interface ILargeFaceListOperations /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// The headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs index 0470a74bf260..6517355daafe 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs @@ -47,7 +47,7 @@ public partial interface ILargePersonGroupOperations /// <br /> /// 'recognitionModel' should be specified to associate with this large /// person group. The default value for 'recognitionModel' is - /// 'recognition_v01', if the latest model needed, please explicitly + /// 'recognition_01', if the latest model needed, please explicitly /// specify the model you need in this parameter. New faces that are /// added to an existing large person group will use the recognition /// model that's already associated with the collection. Existing face @@ -65,7 +65,7 @@ public partial interface ILargePersonGroupOperations /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// The headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs index a47eff43e1c6..5d3b25211adb 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs @@ -50,7 +50,7 @@ public partial interface IPersonGroupOperations /// <br /> /// 'recognitionModel' should be specified to associate with this /// person group. The default value for 'recognitionModel' is - /// 'recognition_v01', if the latest model needed, please explicitly + /// 'recognition_01', if the latest model needed, please explicitly /// specify the model you need in this parameter. New faces that are /// added to an existing person group will use the recognition model /// that's already associated with the collection. Existing face @@ -68,7 +68,7 @@ public partial interface IPersonGroupOperations /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// The headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs index d73551853fa0..64a03c9e940d 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs @@ -78,7 +78,7 @@ public LargeFaceListOperations(FaceClient client) /// * S0-tier subscription quota: 1,000,000 large face lists. /// <br /> /// 'recognitionModel' should be specified to associate with this large face - /// list. The default value for 'recognitionModel' is 'recognition_v01', if the + /// list. The default value for 'recognitionModel' is 'recognition_01', if the /// latest model needed, please explicitly specify the model you need in this /// parameter. New faces that are added to an existing large face list will use /// the recognition model that's already associated with the collection. @@ -96,7 +96,7 @@ public LargeFaceListOperations(FaceClient client) /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// Headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs index 5b626fe71235..03ebb77b8af0 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs @@ -50,7 +50,7 @@ public static partial class LargeFaceListOperationsExtensions /// * S0-tier subscription quota: 1,000,000 large face lists. /// <br /> /// 'recognitionModel' should be specified to associate with this large face - /// list. The default value for 'recognitionModel' is 'recognition_v01', if the + /// list. The default value for 'recognitionModel' is 'recognition_01', if the /// latest model needed, please explicitly specify the model you need in this /// parameter. New faces that are added to an existing large face list will use /// the recognition model that's already associated with the collection. @@ -71,7 +71,7 @@ public static partial class LargeFaceListOperationsExtensions /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// The cancellation token. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs index 199351753d8f..4091695b61e1 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs @@ -73,12 +73,12 @@ public LargePersonGroupOperations(FaceClient client) /// * S0-tier subscription quota: 1,000,000 large person groups. /// <br /> /// 'recognitionModel' should be specified to associate with this large person - /// group. The default value for 'recognitionModel' is 'recognition_v01', if - /// the latest model needed, please explicitly specify the model you need in - /// this parameter. New faces that are added to an existing large person group - /// will use the recognition model that's already associated with the - /// collection. Existing face features in a large person group can't be updated - /// to features extracted by another version of recognition model. + /// group. The default value for 'recognitionModel' is 'recognition_01', if the + /// latest model needed, please explicitly specify the model you need in this + /// parameter. New faces that are added to an existing large person group will + /// use the recognition model that's already associated with the collection. + /// Existing face features in a large person group can't be updated to features + /// extracted by another version of recognition model. /// /// /// @@ -91,7 +91,7 @@ public LargePersonGroupOperations(FaceClient client) /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// Headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs index f76c01c94263..1ff4209c1168 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs @@ -44,12 +44,12 @@ public static partial class LargePersonGroupOperationsExtensions /// * S0-tier subscription quota: 1,000,000 large person groups. /// <br /> /// 'recognitionModel' should be specified to associate with this large person - /// group. The default value for 'recognitionModel' is 'recognition_v01', if - /// the latest model needed, please explicitly specify the model you need in - /// this parameter. New faces that are added to an existing large person group - /// will use the recognition model that's already associated with the - /// collection. Existing face features in a large person group can't be updated - /// to features extracted by another version of recognition model. + /// group. The default value for 'recognitionModel' is 'recognition_01', if the + /// latest model needed, please explicitly specify the model you need in this + /// parameter. New faces that are added to an existing large person group will + /// use the recognition model that's already associated with the collection. + /// Existing face features in a large person group can't be updated to features + /// extracted by another version of recognition model. /// /// /// @@ -65,7 +65,7 @@ public static partial class LargePersonGroupOperationsExtensions /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// The cancellation token. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs index aebc7aadb104..ae83034adda3 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs @@ -31,7 +31,7 @@ public DetectedFace() /// Initializes a new instance of the DetectedFace class. /// /// Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', 'recognition_02' public DetectedFace(string recognitionModel, FaceRectangle faceRectangle, System.Guid? faceId = default(System.Guid?), FaceLandmarks faceLandmarks = default(FaceLandmarks), FaceAttributes faceAttributes = default(FaceAttributes)) { FaceId = faceId; @@ -53,8 +53,8 @@ public DetectedFace() public System.Guid? FaceId { get; set; } /// - /// Gets or sets possible values include: 'recognition_v01', - /// 'recognition_v02' + /// Gets or sets possible values include: 'recognition_01', + /// 'recognition_02' /// [JsonProperty(PropertyName = "recognitionModel")] public string RecognitionModel { get; set; } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs index 8d1964f520ca..ab9d1d0b70b2 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/FaceList.cs @@ -39,7 +39,7 @@ public FaceList() /// User specified data. Length should not /// exceed 16KB. /// Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', 'recognition_02' /// Persisted faces within the face /// list. public FaceList(string faceListId, string name = default(string), string userData = default(string), string recognitionModel = default(string), IList persistedFaces = default(IList)) diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs index 15f80796ada5..eea07aa64a1e 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargeFaceList.cs @@ -37,7 +37,7 @@ public LargeFaceList() /// User specified data. Length should not /// exceed 16KB. /// Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', 'recognition_02' public LargeFaceList(string largeFaceListId, string name = default(string), string userData = default(string), string recognitionModel = default(string)) : base(name, userData, recognitionModel) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs index d067973fb4a7..53d3d553dd3a 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/LargePersonGroup.cs @@ -37,7 +37,7 @@ public LargePersonGroup() /// User specified data. Length should not /// exceed 16KB. /// Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', 'recognition_02' public LargePersonGroup(string largePersonGroupId, string name = default(string), string userData = default(string), string recognitionModel = default(string)) : base(name, userData, recognitionModel) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs index 1691b146a1e5..6a49e1329b73 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/MetaDataContract.cs @@ -36,7 +36,7 @@ public MetaDataContract() /// User specified data. Length should not /// exceed 16KB. /// Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', 'recognition_02' public MetaDataContract(string name = default(string), string userData = default(string), string recognitionModel = default(string)) : base(name, userData) { @@ -50,8 +50,8 @@ public MetaDataContract() partial void CustomInit(); /// - /// Gets or sets possible values include: 'recognition_v01', - /// 'recognition_v02' + /// Gets or sets possible values include: 'recognition_01', + /// 'recognition_02' /// [JsonProperty(PropertyName = "recognitionModel")] public string RecognitionModel { get; set; } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs index 932e07d2c8bc..15302ae44023 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/PersonGroup.cs @@ -37,7 +37,7 @@ public PersonGroup() /// User specified data. Length should not /// exceed 16KB. /// Possible values include: - /// 'recognition_v01', 'recognition_v02' + /// 'recognition_01', 'recognition_02' public PersonGroup(string personGroupId, string name = default(string), string userData = default(string), string recognitionModel = default(string)) : base(name, userData, recognitionModel) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs index 3a33d3125b0d..e4c82d54fb3b 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/RecognitionModel.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.CognitiveServices.Vision.Face.Models /// public static class RecognitionModel { - public const string RecognitionV01 = "recognition_v01"; - public const string RecognitionV02 = "recognition_v02"; + public const string Recognition01 = "recognition_01"; + public const string Recognition02 = "recognition_02"; } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs index ea2eeb4cea8a..04861bf6cfc4 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs @@ -76,8 +76,8 @@ public PersonGroupOperations(FaceClient client) /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). /// <br /> /// 'recognitionModel' should be specified to associate with this person group. - /// The default value for 'recognitionModel' is 'recognition_v01', if the - /// latest model needed, please explicitly specify the model you need in this + /// The default value for 'recognitionModel' is 'recognition_01', if the latest + /// model needed, please explicitly specify the model you need in this /// parameter. New faces that are added to an existing person group will use /// the recognition model that's already associated with the collection. /// Existing face features in a person group can't be updated to features @@ -94,7 +94,7 @@ public PersonGroupOperations(FaceClient client) /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// Headers that will be added to request. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs index 9aedbd7d82fd..ba60eb3396dc 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs @@ -47,8 +47,8 @@ public static partial class PersonGroupOperationsExtensions /// [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). /// <br /> /// 'recognitionModel' should be specified to associate with this person group. - /// The default value for 'recognitionModel' is 'recognition_v01', if the - /// latest model needed, please explicitly specify the model you need in this + /// The default value for 'recognitionModel' is 'recognition_01', if the latest + /// model needed, please explicitly specify the model you need in this /// parameter. New faces that are added to an existing person group will use /// the recognition model that's already associated with the collection. /// Existing face features in a person group can't be updated to features @@ -68,7 +68,7 @@ public static partial class PersonGroupOperationsExtensions /// User specified data. Length should not exceed 16KB. /// /// - /// Possible values include: 'recognition_v01', 'recognition_v02' + /// Possible values include: 'recognition_01', 'recognition_02' /// /// /// The cancellation token. From 64358a501bcc738d10d6cfff042a544585133feb Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 14 Mar 2019 16:38:40 +0800 Subject: [PATCH 7/9] update test. --- .../dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs | 2 +- .../dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs | 2 +- .../dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs | 2 +- .../dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs | 2 +- .../dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs index cd098bb61da8..d3b0b8361739 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs @@ -10,7 +10,7 @@ namespace FaceSDK.Tests { public class FaceDetectionTests : BaseTests { - private static readonly string recognitionModel = RecognitionModel.RecognitionV02; + private static readonly string recognitionModel = RecognitionModel.Recognition02; [Fact] public void FaceDetectionWithAttributes() diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs index 78ee6fe93f23..19e8e05cc5bb 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceFindSimilarTests.cs @@ -12,7 +12,7 @@ namespace FaceSDK.Tests { public class FaceFindSimilarTests : BaseTests { - private static readonly string recognitionModel = RecognitionModel.RecognitionV02; + private static readonly string recognitionModel = RecognitionModel.Recognition02; [Fact] public void FaceFindSimilarFacePositive() diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs index 83db5ef37f50..890f1829c583 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceIdentifyTests.cs @@ -12,7 +12,7 @@ namespace FaceSDK.Tests { public class FaceIdentifyTests : BaseTests { - private static readonly string recognitionModel = RecognitionModel.RecognitionV02; + private static readonly string recognitionModel = RecognitionModel.Recognition02; [Fact] public void FaceIdentificationPersonGroupPositive() diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs index 89fe81733e89..5b647350c611 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceVerificationTests.cs @@ -10,7 +10,7 @@ namespace FaceSDK.Tests { public class FaceVerificationTests : BaseTests { - private static readonly string recognitionModel = RecognitionModel.RecognitionV02; + private static readonly string recognitionModel = RecognitionModel.Recognition02; [Fact] public void FaceVerificationFacePositive() diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs index 98da24166ca0..6b8d72a72add 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/SnapshotTests.cs @@ -17,7 +17,7 @@ public class SnapshotTests : BaseTests // of Cognitive Service Face. We can leave it as `Guid.Empty` in the `playback` test mode. private static readonly List ApplyScope = new List { Guid.Empty }; - private static readonly string recognitionModel = RecognitionModel.RecognitionV02; + private static readonly string recognitionModel = RecognitionModel.Recognition02; [Fact] public void FaceSnapshotTestFaceList() From 0cc4de59d367709d5f317fc2885814ee6fc4e014 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 20 Mar 2019 15:18:46 +0800 Subject: [PATCH 8/9] Add returnRecognitionModel parameter. --- .../Face/Face.Tests/FaceDetectionTests.cs | 6 ++++- .../Face/Face/Generated/FaceListOperations.cs | 26 +++++++++++++++++-- .../Generated/FaceListOperationsExtensions.cs | 16 +++++++++--- .../Face/Face/Generated/FaceOperations.cs | 16 ++++++++++-- .../Generated/FaceOperationsExtensions.cs | 16 +++++++++--- .../Face/Generated/IFaceListOperations.cs | 12 +++++++-- .../Face/Face/Generated/IFaceOperations.cs | 12 +++++++-- .../Generated/ILargeFaceListOperations.cs | 12 +++++++-- .../Generated/ILargePersonGroupOperations.cs | 14 +++++++--- .../Face/Generated/IPersonGroupOperations.cs | 14 +++++++--- .../Face/Generated/LargeFaceListOperations.cs | 26 +++++++++++++++++-- .../LargeFaceListOperationsExtensions.cs | 16 +++++++++--- .../Generated/LargePersonGroupOperations.cs | 23 +++++++++++++--- .../LargePersonGroupOperationsExtensions.cs | 18 +++++++++---- .../Face/Generated/Models/DetectedFace.cs | 6 +---- .../Face/Generated/PersonGroupOperations.cs | 23 +++++++++++++--- .../PersonGroupOperationsExtensions.cs | 18 +++++++++---- 17 files changed, 222 insertions(+), 52 deletions(-) diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs index d3b0b8361739..bb72fabe12fe 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face.Tests/FaceDetectionTests.cs @@ -43,7 +43,8 @@ public void FaceDetectionWithAttributes() FaceAttributeType.Occlusion, FaceAttributeType.Smile }, - recognitionModel: recognitionModel + recognitionModel: recognitionModel, + returnRecognitionModel: true ).Result; Assert.Equal(1, faceList.Count); @@ -138,6 +139,9 @@ public void FaceDetectionWithAttributes() Assert.True(landMarks.UnderLipTop.Y > 0); Assert.True(landMarks.UnderLipBottom.X > 0); Assert.True(landMarks.UnderLipBottom.Y > 0); + + // Ensure recognitionModel return correctly. + Assert.Equal(face.RecognitionModel, recognitionModel); } } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs index 9b289fb8cf26..f782752aac8d 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs @@ -267,6 +267,10 @@ public FaceListOperations(FaceClient client) /// /// Id referencing a particular face list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// Headers that will be added to request. /// @@ -288,7 +292,7 @@ public FaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string faceListId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string faceListId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -317,6 +321,7 @@ public FaceListOperations(FaceClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("faceListId", faceListId); + tracingParameters.Add("returnRecognitionModel", returnRecognitionModel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -325,6 +330,12 @@ public FaceListOperations(FaceClient client) var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "facelists/{faceListId}"; _url = _url.Replace("{Endpoint}", Client.Endpoint); _url = _url.Replace("{faceListId}", System.Uri.EscapeDataString(faceListId)); + List _queryParameters = new List(); + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; @@ -752,6 +763,10 @@ public FaceListOperations(FaceClient client) /// Get](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524c) /// /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// Headers that will be added to request. /// @@ -773,7 +788,7 @@ public FaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -786,6 +801,7 @@ public FaceListOperations(FaceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("returnRecognitionModel", returnRecognitionModel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -793,6 +809,12 @@ public FaceListOperations(FaceClient client) var _baseUrl = Client.BaseUri; var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "facelists"; _url = _url.Replace("{Endpoint}", Client.Endpoint); + List _queryParameters = new List(); + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs index 9a24ca784013..94a4305b95d5 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs @@ -88,12 +88,16 @@ public static partial class FaceListOperationsExtensions /// /// Id referencing a particular face list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The cancellation token. /// - public static async Task GetAsync(this IFaceListOperations operations, string faceListId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IFaceListOperations operations, string faceListId, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(faceListId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(faceListId, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -150,12 +154,16 @@ public static partial class FaceListOperationsExtensions /// /// The operations group for this extension method. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The cancellation token. /// - public static async Task> ListAsync(this IFaceListOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this IFaceListOperations operations, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListWithHttpMessagesAsync(returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs index 85cd53d404c3..7c7f2b72c6e0 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs @@ -984,6 +984,10 @@ public FaceOperations(FaceClient client) /// please explicitly specify the model you need. Possible values include: /// 'recognition_01', 'recognition_02' /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// Headers that will be added to request. /// @@ -1005,7 +1009,7 @@ public FaceOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -1031,6 +1035,7 @@ public FaceOperations(FaceClient client) tracingParameters.Add("returnFaceLandmarks", returnFaceLandmarks); tracingParameters.Add("returnFaceAttributes", returnFaceAttributes); tracingParameters.Add("recognitionModel", recognitionModel); + tracingParameters.Add("returnRecognitionModel", returnRecognitionModel); tracingParameters.Add("imageUrl", imageUrl); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "DetectWithUrl", tracingParameters); @@ -1056,6 +1061,7 @@ public FaceOperations(FaceClient client) { _queryParameters.Add(string.Format("recognitionModel={0}", System.Uri.EscapeDataString(recognitionModel))); } + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -1399,6 +1405,10 @@ public FaceOperations(FaceClient client) /// please explicitly specify the model you need. Possible values include: /// 'recognition_01', 'recognition_02' /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// Headers that will be added to request. /// @@ -1420,7 +1430,7 @@ public FaceOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -1442,6 +1452,7 @@ public FaceOperations(FaceClient client) tracingParameters.Add("returnFaceAttributes", returnFaceAttributes); tracingParameters.Add("image", image); tracingParameters.Add("recognitionModel", recognitionModel); + tracingParameters.Add("returnRecognitionModel", returnRecognitionModel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "DetectWithStream", tracingParameters); } @@ -1466,6 +1477,7 @@ public FaceOperations(FaceClient client) { _queryParameters.Add(string.Format("recognitionModel={0}", System.Uri.EscapeDataString(recognitionModel))); } + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs index 6287ae99211b..298da18bc8ab 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs @@ -307,12 +307,16 @@ public static partial class FaceOperationsExtensions /// please explicitly specify the model you need. Possible values include: /// 'recognition_01', 'recognition_02' /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The cancellation token. /// - public static async Task> DetectWithUrlAsync(this IFaceOperations operations, string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> DetectWithUrlAsync(this IFaceOperations operations, string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DetectWithUrlWithHttpMessagesAsync(url, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DetectWithUrlWithHttpMessagesAsync(url, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -390,12 +394,16 @@ public static partial class FaceOperationsExtensions /// please explicitly specify the model you need. Possible values include: /// 'recognition_01', 'recognition_02' /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The cancellation token. /// - public static async Task> DetectWithStreamAsync(this IFaceOperations operations, Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> DetectWithStreamAsync(this IFaceOperations operations, Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DetectWithStreamWithHttpMessagesAsync(image, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DetectWithStreamWithHttpMessagesAsync(image, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs index d6f0eb584a2f..fc1f9d8a8dd4 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs @@ -90,6 +90,10 @@ public partial interface IFaceListOperations /// /// Id referencing a particular face list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The headers that will be added to request. /// @@ -105,7 +109,7 @@ public partial interface IFaceListOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string faceListId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string faceListId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Update information of a face list. /// @@ -158,6 +162,10 @@ public partial interface IFaceListOperations /// Get](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524c) /// /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The headers that will be added to request. /// @@ -173,7 +181,7 @@ public partial interface IFaceListOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete an existing face from a face list (given by a /// persistedFaceId and a faceListId). Persisted image related to the diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs index 5534ccf36a64..55c4ab189d81 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs @@ -326,6 +326,10 @@ public partial interface IFaceOperations /// the model you need. Possible values include: 'recognition_01', /// 'recognition_02' /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The headers that will be added to request. /// @@ -341,7 +345,7 @@ public partial interface IFaceOperations /// /// Thrown when a required parameter is null /// - Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Verify whether two faces belong to a same person. Compares a face /// Id with a Person Id @@ -414,6 +418,10 @@ public partial interface IFaceOperations /// the model you need. Possible values include: 'recognition_01', /// 'recognition_02' /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The headers that will be added to request. /// @@ -429,6 +437,6 @@ public partial interface IFaceOperations /// /// Thrown when a required parameter is null /// - Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs index 10cdff88d10c..3df25690f783 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs @@ -93,6 +93,10 @@ public partial interface ILargeFaceListOperations /// /// Id referencing a particular large face list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The headers that will be added to request. /// @@ -108,7 +112,7 @@ public partial interface ILargeFaceListOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string largeFaceListId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string largeFaceListId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Update information of a large face list. /// @@ -202,6 +206,10 @@ public partial interface ILargeFaceListOperations /// "list5". /// /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The headers that will be added to request. /// @@ -217,7 +225,7 @@ public partial interface ILargeFaceListOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Queue a large face list training task, the training task may not be /// started immediately. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs index 6517355daafe..d61127b0663a 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs @@ -112,6 +112,10 @@ public partial interface ILargePersonGroupOperations /// /// Id referencing a particular large person group. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The headers that will be added to request. /// @@ -127,7 +131,7 @@ public partial interface ILargePersonGroupOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string largePersonGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string largePersonGroupId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Update an existing large person group's display name and userData. /// The properties which does not appear in request body will not be @@ -179,7 +183,7 @@ public partial interface ILargePersonGroupOperations /// Task> GetTrainingStatusWithHttpMessagesAsync(string largePersonGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List all existing large person groups’s largePesonGroupId, name, + /// List all existing large person groups’s largePersonGroupId, name, /// userData and recognitionModel.<br /> /// * Large person groups are stored in alphabetical order of /// largePersonGroupId. @@ -206,6 +210,10 @@ public partial interface ILargePersonGroupOperations /// /// The number of large person groups to list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The headers that will be added to request. /// @@ -221,7 +229,7 @@ public partial interface ILargePersonGroupOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Queue a large person group training task, the training task may not /// be started immediately. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs index 5d3b25211adb..451ce7e8b29d 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs @@ -112,6 +112,10 @@ public partial interface IPersonGroupOperations /// /// Id referencing a particular person group. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The headers that will be added to request. /// @@ -127,7 +131,7 @@ public partial interface IPersonGroupOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string personGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string personGroupId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Update an existing person group's display name and userData. The /// properties which does not appear in request body will not be @@ -179,7 +183,7 @@ public partial interface IPersonGroupOperations /// Task> GetTrainingStatusWithHttpMessagesAsync(string personGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List person groups’s pesonGroupId, name, userData and + /// List person groups’s personGroupId, name, userData and /// recognitionModel.<br /> /// * Person groups are stored in alphabetical order of personGroupId. /// * "start" parameter (string, optional) is a user-provided @@ -205,6 +209,10 @@ public partial interface IPersonGroupOperations /// /// The number of person groups to list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The headers that will be added to request. /// @@ -220,7 +228,7 @@ public partial interface IPersonGroupOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Queue a person group training task, the training task may not be /// started immediately. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs index 64a03c9e940d..052000d50976 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs @@ -270,6 +270,10 @@ public LargeFaceListOperations(FaceClient client) /// /// Id referencing a particular large face list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// Headers that will be added to request. /// @@ -291,7 +295,7 @@ public LargeFaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string largeFaceListId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string largeFaceListId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -320,6 +324,7 @@ public LargeFaceListOperations(FaceClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("largeFaceListId", largeFaceListId); + tracingParameters.Add("returnRecognitionModel", returnRecognitionModel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -328,6 +333,12 @@ public LargeFaceListOperations(FaceClient client) var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "largefacelists/{largeFaceListId}"; _url = _url.Replace("{Endpoint}", Client.Endpoint); _url = _url.Replace("{largeFaceListId}", System.Uri.EscapeDataString(largeFaceListId)); + List _queryParameters = new List(); + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; @@ -933,6 +944,10 @@ public LargeFaceListOperations(FaceClient client) /// <br /> "start=list2&top=3" will return "list3", "list4", "list5". /// /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// Headers that will be added to request. /// @@ -954,7 +969,7 @@ public LargeFaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -967,6 +982,7 @@ public LargeFaceListOperations(FaceClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("returnRecognitionModel", returnRecognitionModel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -974,6 +990,12 @@ public LargeFaceListOperations(FaceClient client) var _baseUrl = Client.BaseUri; var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "largefacelists"; _url = _url.Replace("{Endpoint}", Client.Endpoint); + List _queryParameters = new List(); + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs index 03ebb77b8af0..567224f1a70e 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs @@ -91,12 +91,16 @@ public static partial class LargeFaceListOperationsExtensions /// /// Id referencing a particular large face list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The cancellation token. /// - public static async Task GetAsync(this ILargeFaceListOperations operations, string largeFaceListId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this ILargeFaceListOperations operations, string largeFaceListId, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(largeFaceListId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(largeFaceListId, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -187,12 +191,16 @@ public static partial class LargeFaceListOperationsExtensions /// /// The operations group for this extension method. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The cancellation token. /// - public static async Task> ListAsync(this ILargeFaceListOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this ILargeFaceListOperations operations, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListWithHttpMessagesAsync(returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs index 4091695b61e1..70e07c702e6d 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs @@ -413,6 +413,10 @@ public LargePersonGroupOperations(FaceClient client) /// /// Id referencing a particular large person group. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// Headers that will be added to request. /// @@ -434,7 +438,7 @@ public LargePersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string largePersonGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string largePersonGroupId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -463,6 +467,7 @@ public LargePersonGroupOperations(FaceClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("largePersonGroupId", largePersonGroupId); + tracingParameters.Add("returnRecognitionModel", returnRecognitionModel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -471,6 +476,12 @@ public LargePersonGroupOperations(FaceClient client) var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "largepersongroups/{largePersonGroupId}"; _url = _url.Replace("{Endpoint}", Client.Endpoint); _url = _url.Replace("{largePersonGroupId}", System.Uri.EscapeDataString(largePersonGroupId)); + List _queryParameters = new List(); + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; @@ -914,7 +925,7 @@ public LargePersonGroupOperations(FaceClient client) } /// - /// List all existing large person groups’s largePesonGroupId, name, userData + /// List all existing large person groups’s largePersonGroupId, name, userData /// and recognitionModel.<br /> /// * Large person groups are stored in alphabetical order of /// largePersonGroupId. @@ -940,6 +951,10 @@ public LargePersonGroupOperations(FaceClient client) /// /// The number of large person groups to list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// Headers that will be added to request. /// @@ -961,7 +976,7 @@ public LargePersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -991,6 +1006,7 @@ public LargePersonGroupOperations(FaceClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("start", start); tracingParameters.Add("top", top); + tracingParameters.Add("returnRecognitionModel", returnRecognitionModel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -1007,6 +1023,7 @@ public LargePersonGroupOperations(FaceClient client) { _queryParameters.Add(string.Format("top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); } + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs index 1ff4209c1168..8eb3d51ce679 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs @@ -107,12 +107,16 @@ public static partial class LargePersonGroupOperationsExtensions /// /// Id referencing a particular large person group. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The cancellation token. /// - public static async Task GetAsync(this ILargePersonGroupOperations operations, string largePersonGroupId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this ILargePersonGroupOperations operations, string largePersonGroupId, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(largePersonGroupId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(largePersonGroupId, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -164,7 +168,7 @@ public static partial class LargePersonGroupOperationsExtensions } /// - /// List all existing large person groups’s largePesonGroupId, name, userData + /// List all existing large person groups’s largePersonGroupId, name, userData /// and recognitionModel.<br /> /// * Large person groups are stored in alphabetical order of /// largePersonGroupId. @@ -193,12 +197,16 @@ public static partial class LargePersonGroupOperationsExtensions /// /// The number of large person groups to list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The cancellation token. /// - public static async Task> ListAsync(this ILargePersonGroupOperations operations, string start = default(string), int? top = 1000, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this ILargePersonGroupOperations operations, string start = default(string), int? top = 1000, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(start, top, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListWithHttpMessagesAsync(start, top, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs index ae83034adda3..a6095814bb31 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/Models/DetectedFace.cs @@ -32,7 +32,7 @@ public DetectedFace() /// /// Possible values include: /// 'recognition_01', 'recognition_02' - public DetectedFace(string recognitionModel, FaceRectangle faceRectangle, System.Guid? faceId = default(System.Guid?), FaceLandmarks faceLandmarks = default(FaceLandmarks), FaceAttributes faceAttributes = default(FaceAttributes)) + public DetectedFace(FaceRectangle faceRectangle, System.Guid? faceId = default(System.Guid?), string recognitionModel = default(string), FaceLandmarks faceLandmarks = default(FaceLandmarks), FaceAttributes faceAttributes = default(FaceAttributes)) { FaceId = faceId; RecognitionModel = recognitionModel; @@ -82,10 +82,6 @@ public DetectedFace() /// public virtual void Validate() { - if (RecognitionModel == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "RecognitionModel"); - } if (FaceRectangle == null) { throw new ValidationException(ValidationRules.CannotBeNull, "FaceRectangle"); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs index 04861bf6cfc4..02caaaae0ec4 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs @@ -413,6 +413,10 @@ public PersonGroupOperations(FaceClient client) /// /// Id referencing a particular person group. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// Headers that will be added to request. /// @@ -434,7 +438,7 @@ public PersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string personGroupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string personGroupId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -463,6 +467,7 @@ public PersonGroupOperations(FaceClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("personGroupId", personGroupId); + tracingParameters.Add("returnRecognitionModel", returnRecognitionModel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -471,6 +476,12 @@ public PersonGroupOperations(FaceClient client) var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "persongroups/{personGroupId}"; _url = _url.Replace("{Endpoint}", Client.Endpoint); _url = _url.Replace("{personGroupId}", System.Uri.EscapeDataString(personGroupId)); + List _queryParameters = new List(); + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; @@ -913,7 +924,7 @@ public PersonGroupOperations(FaceClient client) } /// - /// List person groups’s pesonGroupId, name, userData and + /// List person groups’s personGroupId, name, userData and /// recognitionModel.<br /> /// * Person groups are stored in alphabetical order of personGroupId. /// * "start" parameter (string, optional) is a user-provided personGroupId @@ -937,6 +948,10 @@ public PersonGroupOperations(FaceClient client) /// /// The number of person groups to list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// Headers that will be added to request. /// @@ -958,7 +973,7 @@ public PersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -988,6 +1003,7 @@ public PersonGroupOperations(FaceClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("start", start); tracingParameters.Add("top", top); + tracingParameters.Add("returnRecognitionModel", returnRecognitionModel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -1004,6 +1020,7 @@ public PersonGroupOperations(FaceClient client) { _queryParameters.Add(string.Format("top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); } + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs index ba60eb3396dc..c0a4f0f9cc07 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs @@ -107,12 +107,16 @@ public static partial class PersonGroupOperationsExtensions /// /// Id referencing a particular person group. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The cancellation token. /// - public static async Task GetAsync(this IPersonGroupOperations operations, string personGroupId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IPersonGroupOperations operations, string personGroupId, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(personGroupId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(personGroupId, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -163,7 +167,7 @@ public static partial class PersonGroupOperationsExtensions } /// - /// List person groups’s pesonGroupId, name, userData and + /// List person groups’s personGroupId, name, userData and /// recognitionModel.<br /> /// * Person groups are stored in alphabetical order of personGroupId. /// * "start" parameter (string, optional) is a user-provided personGroupId @@ -190,12 +194,16 @@ public static partial class PersonGroupOperationsExtensions /// /// The number of person groups to list. /// + /// + /// Whether to return the 'RecognitionModel' required for the current + /// operation. + /// /// /// The cancellation token. /// - public static async Task> ListAsync(this IPersonGroupOperations operations, string start = default(string), int? top = 1000, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this IPersonGroupOperations operations, string start = default(string), int? top = 1000, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(start, top, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListWithHttpMessagesAsync(start, top, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } From ec7e8e2bed4a0808bd96153b7989a7cb560460c0 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 21 Mar 2019 11:33:02 +0800 Subject: [PATCH 9/9] Update returnRecognitionModel description. --- .../Face/Face/Generated/FaceListOperations.cs | 22 ++++++++++++------- .../Generated/FaceListOperationsExtensions.cs | 12 +++++----- .../Face/Face/Generated/FaceOperations.cs | 22 ++++++++++++------- .../Generated/FaceOperationsExtensions.cs | 12 +++++----- .../Face/Generated/IFaceListOperations.cs | 12 +++++----- .../Face/Face/Generated/IFaceOperations.cs | 12 +++++----- .../Generated/ILargeFaceListOperations.cs | 12 +++++----- .../Generated/ILargePersonGroupOperations.cs | 12 +++++----- .../Face/Generated/IPersonGroupOperations.cs | 12 +++++----- .../Face/Generated/LargeFaceListOperations.cs | 22 ++++++++++++------- .../LargeFaceListOperationsExtensions.cs | 12 +++++----- .../Generated/LargePersonGroupOperations.cs | 22 ++++++++++++------- .../LargePersonGroupOperationsExtensions.cs | 12 +++++----- .../Face/Generated/PersonGroupOperations.cs | 22 ++++++++++++------- .../PersonGroupOperationsExtensions.cs | 12 +++++----- 15 files changed, 130 insertions(+), 100 deletions(-) diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs index f782752aac8d..72b4248b8f88 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperations.cs @@ -268,8 +268,8 @@ public FaceListOperations(FaceClient client) /// Id referencing a particular face list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// Headers that will be added to request. @@ -292,7 +292,7 @@ public FaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string faceListId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string faceListId, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -331,7 +331,10 @@ public FaceListOperations(FaceClient client) _url = _url.Replace("{Endpoint}", Client.Endpoint); _url = _url.Replace("{faceListId}", System.Uri.EscapeDataString(faceListId)); List _queryParameters = new List(); - _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (returnRecognitionModel != null) + { + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -764,8 +767,8 @@ public FaceListOperations(FaceClient client) /// /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// Headers that will be added to request. @@ -788,7 +791,7 @@ public FaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -810,7 +813,10 @@ public FaceListOperations(FaceClient client) var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "facelists"; _url = _url.Replace("{Endpoint}", Client.Endpoint); List _queryParameters = new List(); - _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (returnRecognitionModel != null) + { + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs index 94a4305b95d5..5ad6adcdd472 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceListOperationsExtensions.cs @@ -89,13 +89,13 @@ public static partial class FaceListOperationsExtensions /// Id referencing a particular face list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// The cancellation token. /// - public static async Task GetAsync(this IFaceListOperations operations, string faceListId, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IFaceListOperations operations, string faceListId, bool? returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(faceListId, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { @@ -155,13 +155,13 @@ public static partial class FaceListOperationsExtensions /// The operations group for this extension method. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// The cancellation token. /// - public static async Task> ListAsync(this IFaceListOperations operations, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this IFaceListOperations operations, bool? returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs index 7c7f2b72c6e0..259a3a56ee99 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperations.cs @@ -985,8 +985,8 @@ public FaceOperations(FaceClient client) /// 'recognition_01', 'recognition_02' /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// Headers that will be added to request. @@ -1009,7 +1009,7 @@ public FaceOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -1061,7 +1061,10 @@ public FaceOperations(FaceClient client) { _queryParameters.Add(string.Format("recognitionModel={0}", System.Uri.EscapeDataString(recognitionModel))); } - _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (returnRecognitionModel != null) + { + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -1406,8 +1409,8 @@ public FaceOperations(FaceClient client) /// 'recognition_01', 'recognition_02' /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// Headers that will be added to request. @@ -1430,7 +1433,7 @@ public FaceOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -1477,7 +1480,10 @@ public FaceOperations(FaceClient client) { _queryParameters.Add(string.Format("recognitionModel={0}", System.Uri.EscapeDataString(recognitionModel))); } - _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (returnRecognitionModel != null) + { + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs index 298da18bc8ab..fc7d8ecaebfe 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/FaceOperationsExtensions.cs @@ -308,13 +308,13 @@ public static partial class FaceOperationsExtensions /// 'recognition_01', 'recognition_02' /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// The cancellation token. /// - public static async Task> DetectWithUrlAsync(this IFaceOperations operations, string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> DetectWithUrlAsync(this IFaceOperations operations, string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool? returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DetectWithUrlWithHttpMessagesAsync(url, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { @@ -395,13 +395,13 @@ public static partial class FaceOperationsExtensions /// 'recognition_01', 'recognition_02' /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// The cancellation token. /// - public static async Task> DetectWithStreamAsync(this IFaceOperations operations, Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> DetectWithStreamAsync(this IFaceOperations operations, Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool? returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DetectWithStreamWithHttpMessagesAsync(image, returnFaceId, returnFaceLandmarks, returnFaceAttributes, recognitionModel, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs index fc1f9d8a8dd4..4f29ac4284e3 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceListOperations.cs @@ -91,8 +91,8 @@ public partial interface IFaceListOperations /// Id referencing a particular face list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return + /// 'recognitionModel' in response. /// /// /// The headers that will be added to request. @@ -109,7 +109,7 @@ public partial interface IFaceListOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string faceListId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string faceListId, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Update information of a face list. /// @@ -163,8 +163,8 @@ public partial interface IFaceListOperations /// /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return + /// 'recognitionModel' in response. /// /// /// The headers that will be added to request. @@ -181,7 +181,7 @@ public partial interface IFaceListOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete an existing face from a face list (given by a /// persistedFaceId and a faceListId). Persisted image related to the diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs index 55c4ab189d81..42e9c9986f2c 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IFaceOperations.cs @@ -327,8 +327,8 @@ public partial interface IFaceOperations /// 'recognition_02' /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return + /// 'recognitionModel' in response. /// /// /// The headers that will be added to request. @@ -345,7 +345,7 @@ public partial interface IFaceOperations /// /// Thrown when a required parameter is null /// - Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> DetectWithUrlWithHttpMessagesAsync(string url, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Verify whether two faces belong to a same person. Compares a face /// Id with a Person Id @@ -419,8 +419,8 @@ public partial interface IFaceOperations /// 'recognition_02' /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return + /// 'recognitionModel' in response. /// /// /// The headers that will be added to request. @@ -437,6 +437,6 @@ public partial interface IFaceOperations /// /// Thrown when a required parameter is null /// - Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> DetectWithStreamWithHttpMessagesAsync(Stream image, bool? returnFaceId = true, bool? returnFaceLandmarks = false, IList returnFaceAttributes = default(IList), string recognitionModel = default(string), bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs index 3df25690f783..5da7e7de1c8b 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargeFaceListOperations.cs @@ -94,8 +94,8 @@ public partial interface ILargeFaceListOperations /// Id referencing a particular large face list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return + /// 'recognitionModel' in response. /// /// /// The headers that will be added to request. @@ -112,7 +112,7 @@ public partial interface ILargeFaceListOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string largeFaceListId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string largeFaceListId, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Update information of a large face list. /// @@ -207,8 +207,8 @@ public partial interface ILargeFaceListOperations /// /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return + /// 'recognitionModel' in response. /// /// /// The headers that will be added to request. @@ -225,7 +225,7 @@ public partial interface ILargeFaceListOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Queue a large face list training task, the training task may not be /// started immediately. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs index d61127b0663a..22dcf157ebd5 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/ILargePersonGroupOperations.cs @@ -113,8 +113,8 @@ public partial interface ILargePersonGroupOperations /// Id referencing a particular large person group. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return + /// 'recognitionModel' in response. /// /// /// The headers that will be added to request. @@ -131,7 +131,7 @@ public partial interface ILargePersonGroupOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string largePersonGroupId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string largePersonGroupId, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Update an existing large person group's display name and userData. /// The properties which does not appear in request body will not be @@ -211,8 +211,8 @@ public partial interface ILargePersonGroupOperations /// The number of large person groups to list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return + /// 'recognitionModel' in response. /// /// /// The headers that will be added to request. @@ -229,7 +229,7 @@ public partial interface ILargePersonGroupOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Queue a large person group training task, the training task may not /// be started immediately. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs index 451ce7e8b29d..521baf7cec68 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/IPersonGroupOperations.cs @@ -113,8 +113,8 @@ public partial interface IPersonGroupOperations /// Id referencing a particular person group. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return + /// 'recognitionModel' in response. /// /// /// The headers that will be added to request. @@ -131,7 +131,7 @@ public partial interface IPersonGroupOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string personGroupId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string personGroupId, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Update an existing person group's display name and userData. The /// properties which does not appear in request body will not be @@ -210,8 +210,8 @@ public partial interface IPersonGroupOperations /// The number of person groups to list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return + /// 'recognitionModel' in response. /// /// /// The headers that will be added to request. @@ -228,7 +228,7 @@ public partial interface IPersonGroupOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Queue a person group training task, the training task may not be /// started immediately. diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs index 052000d50976..ba5b545deb62 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperations.cs @@ -271,8 +271,8 @@ public LargeFaceListOperations(FaceClient client) /// Id referencing a particular large face list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// Headers that will be added to request. @@ -295,7 +295,7 @@ public LargeFaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string largeFaceListId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string largeFaceListId, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -334,7 +334,10 @@ public LargeFaceListOperations(FaceClient client) _url = _url.Replace("{Endpoint}", Client.Endpoint); _url = _url.Replace("{largeFaceListId}", System.Uri.EscapeDataString(largeFaceListId)); List _queryParameters = new List(); - _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (returnRecognitionModel != null) + { + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -945,8 +948,8 @@ public LargeFaceListOperations(FaceClient client) /// /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// Headers that will be added to request. @@ -969,7 +972,7 @@ public LargeFaceListOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -991,7 +994,10 @@ public LargeFaceListOperations(FaceClient client) var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "largefacelists"; _url = _url.Replace("{Endpoint}", Client.Endpoint); List _queryParameters = new List(); - _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (returnRecognitionModel != null) + { + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs index 567224f1a70e..a4cb0c8aeaa6 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargeFaceListOperationsExtensions.cs @@ -92,13 +92,13 @@ public static partial class LargeFaceListOperationsExtensions /// Id referencing a particular large face list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// The cancellation token. /// - public static async Task GetAsync(this ILargeFaceListOperations operations, string largeFaceListId, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this ILargeFaceListOperations operations, string largeFaceListId, bool? returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(largeFaceListId, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { @@ -192,13 +192,13 @@ public static partial class LargeFaceListOperationsExtensions /// The operations group for this extension method. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// The cancellation token. /// - public static async Task> ListAsync(this ILargeFaceListOperations operations, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this ILargeFaceListOperations operations, bool? returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs index 70e07c702e6d..e35178be5cf6 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperations.cs @@ -414,8 +414,8 @@ public LargePersonGroupOperations(FaceClient client) /// Id referencing a particular large person group. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// Headers that will be added to request. @@ -438,7 +438,7 @@ public LargePersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string largePersonGroupId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string largePersonGroupId, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -477,7 +477,10 @@ public LargePersonGroupOperations(FaceClient client) _url = _url.Replace("{Endpoint}", Client.Endpoint); _url = _url.Replace("{largePersonGroupId}", System.Uri.EscapeDataString(largePersonGroupId)); List _queryParameters = new List(); - _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (returnRecognitionModel != null) + { + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -952,8 +955,8 @@ public LargePersonGroupOperations(FaceClient client) /// The number of large person groups to list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// Headers that will be added to request. @@ -976,7 +979,7 @@ public LargePersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -1023,7 +1026,10 @@ public LargePersonGroupOperations(FaceClient client) { _queryParameters.Add(string.Format("top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); } - _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (returnRecognitionModel != null) + { + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs index 8eb3d51ce679..b776942e57e5 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/LargePersonGroupOperationsExtensions.cs @@ -108,13 +108,13 @@ public static partial class LargePersonGroupOperationsExtensions /// Id referencing a particular large person group. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// The cancellation token. /// - public static async Task GetAsync(this ILargePersonGroupOperations operations, string largePersonGroupId, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this ILargePersonGroupOperations operations, string largePersonGroupId, bool? returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(largePersonGroupId, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { @@ -198,13 +198,13 @@ public static partial class LargePersonGroupOperationsExtensions /// The number of large person groups to list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// The cancellation token. /// - public static async Task> ListAsync(this ILargePersonGroupOperations operations, string start = default(string), int? top = 1000, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this ILargePersonGroupOperations operations, string start = default(string), int? top = 1000, bool? returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(start, top, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs index 02caaaae0ec4..f20f085adc39 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperations.cs @@ -414,8 +414,8 @@ public PersonGroupOperations(FaceClient client) /// Id referencing a particular person group. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// Headers that will be added to request. @@ -438,7 +438,7 @@ public PersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string personGroupId, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string personGroupId, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -477,7 +477,10 @@ public PersonGroupOperations(FaceClient client) _url = _url.Replace("{Endpoint}", Client.Endpoint); _url = _url.Replace("{personGroupId}", System.Uri.EscapeDataString(personGroupId)); List _queryParameters = new List(); - _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (returnRecognitionModel != null) + { + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -949,8 +952,8 @@ public PersonGroupOperations(FaceClient client) /// The number of person groups to list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// Headers that will be added to request. @@ -973,7 +976,7 @@ public PersonGroupOperations(FaceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string start = default(string), int? top = 1000, bool? returnRecognitionModel = false, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.Endpoint == null) { @@ -1020,7 +1023,10 @@ public PersonGroupOperations(FaceClient client) { _queryParameters.Add(string.Format("top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); } - _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + if (returnRecognitionModel != null) + { + _queryParameters.Add(string.Format("returnRecognitionModel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(returnRecognitionModel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs index c0a4f0f9cc07..67dbeab38e13 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Vision/Face/Face/Generated/PersonGroupOperationsExtensions.cs @@ -108,13 +108,13 @@ public static partial class PersonGroupOperationsExtensions /// Id referencing a particular person group. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// The cancellation token. /// - public static async Task GetAsync(this IPersonGroupOperations operations, string personGroupId, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IPersonGroupOperations operations, string personGroupId, bool? returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(personGroupId, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) { @@ -195,13 +195,13 @@ public static partial class PersonGroupOperationsExtensions /// The number of person groups to list. /// /// - /// Whether to return the 'RecognitionModel' required for the current - /// operation. + /// A value indicating whether the operation should return 'recognitionModel' + /// in response. /// /// /// The cancellation token. /// - public static async Task> ListAsync(this IPersonGroupOperations operations, string start = default(string), int? top = 1000, bool returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this IPersonGroupOperations operations, string start = default(string), int? top = 1000, bool? returnRecognitionModel = false, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(start, top, returnRecognitionModel, null, cancellationToken).ConfigureAwait(false)) {