Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[SP-11082] fix quality enum #36

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ src/Regula.FaceSDK.WebClient/Model/DetectionQuality.cs
src/Regula.FaceSDK.WebClient/Model/FaceAttribute.cs
src/Regula.FaceSDK.WebClient/Model/FaceImageQualityAlignType.cs
src/Regula.FaceSDK.WebClient/Model/FaceImageQualityGroups.cs
src/Regula.FaceSDK.WebClient/Model/FaceImageQualityGroupsStrings.cs
src/Regula.FaceSDK.WebClient/Model/FaceImageQualityStatus.cs
src/Regula.FaceSDK.WebClient/Model/FaceQualityConfigName.cs
src/Regula.FaceSDK.WebClient/Model/FaceQualityScenarios.cs
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* Regula FaceSDK Web API
*
* Regula FaceSDK Web API # Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core
*
* The version of the OpenAPI document: 5.2.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Regula.FaceSDK.WebClient.Client.OpenAPIDateConverter;

namespace Regula.FaceSDK.WebClient.Model
{
/// <summary>
/// Face image quality group types for face image quality assessment.
/// </summary>
/// <value>Face image quality group types for face image quality assessment.</value>

[JsonConverter(typeof(StringEnumConverter))]

public enum FaceImageQualityGroupsStrings
{
/// <summary>
/// Enum IMAGE_CHARACTERISTICS for value: ImageCharacteristics
/// </summary>
[EnumMember(Value = "ImageCharacteristics")]
IMAGE_CHARACTERISTICS = 1,

/// <summary>
/// Enum HEAD_SIZE_AND_POSITIONS for value: HeadSizeAndPosition
/// </summary>
[EnumMember(Value = "HeadSizeAndPosition")]
HEAD_SIZE_AND_POSITIONS = 2,

/// <summary>
/// Enum FACE_QUALITY for value: FaceQuality
/// </summary>
[EnumMember(Value = "FaceQuality")]
FACE_QUALITY = 3,

/// <summary>
/// Enum EYES_CHARACTERISTICS for value: EyesCharacteristics
/// </summary>
[EnumMember(Value = "EyesCharacteristics")]
EYES_CHARACTERISTICS = 4,

/// <summary>
/// Enum SHADOWS_AND_LIGHTNING for value: ShadowsAndLightning
/// </summary>
[EnumMember(Value = "ShadowsAndLightning")]
SHADOWS_AND_LIGHTNING = 5,

/// <summary>
/// Enum POSE_AND_EXPRESSION for value: PoseAndExpression
/// </summary>
[EnumMember(Value = "PoseAndExpression")]
POSE_AND_EXPRESSION = 6,

/// <summary>
/// Enum HEAD_OCCLUSION for value: HeadOcclusion
/// </summary>
[EnumMember(Value = "HeadOcclusion")]
HEAD_OCCLUSION = 7,

/// <summary>
/// Enum BACKGROUND for value: Background
/// </summary>
[EnumMember(Value = "Background")]
BACKGROUND = 8

}

}
35 changes: 35 additions & 0 deletions src/Regula.FaceSDK.WebClient/Model/FaceSDKResultCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,41 @@ public enum FaceSDKResultCode
/// </summary>
FACER_OK = 0,

/// <summary>
/// Enum FR_IMAGE_EMPTY for value: 1
/// </summary>
FR_IMAGE_EMPTY = 1,

/// <summary>
/// Enum FR_FACE_NOT_DETECTED for value: 2
/// </summary>
FR_FACE_NOT_DETECTED = 2,

/// <summary>
/// Enum FR_LANDMARKS_NOT_DETECTED for value: 3
/// </summary>
FR_LANDMARKS_NOT_DETECTED = 3,

/// <summary>
/// Enum FR_FACE_ALIGHNER_FAILED for value: 4
/// </summary>
FR_FACE_ALIGHNER_FAILED = 4,

/// <summary>
/// Enum FR_DESCRIPTOR_EXTRACTOR_ERROR for value: 5
/// </summary>
FR_DESCRIPTOR_EXTRACTOR_ERROR = 5,

/// <summary>
/// Enum FR_IMAGE_DECODE_ERROR for value: 6
/// </summary>
FR_IMAGE_DECODE_ERROR = 6,

/// <summary>
/// Enum FR_INTERNAL_ERROR for value: 7
/// </summary>
FR_INTERNAL_ERROR = 7,

/// <summary>
/// Enum FACER_CONFIG_ERROR for value: 199
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions src/Regula.FaceSDK.WebClient/Model/Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public partial class Image : IEquatable<Image>, IValidatableObject
/// <param name="contentType">Original media type of the returned image..</param>
/// <param name="createdAt">Returned image creation date..</param>
/// <param name="updatedAt">Returned image update date..</param>
/// <param name="path">Returned image S3 path..</param>
/// <param name="path">Returned image path..</param>
/// <param name="url">Returned image URL..</param>
/// <param name="metadata">A free-form object containing person&#39;s extended attributes..</param>
public Image(int id = default(int), string contentType = default(string), string createdAt = default(string), string updatedAt = default(string), string path = default(string), string url = default(string), Dictionary<string, Object> metadata = default(Dictionary<string, Object>))
Expand Down Expand Up @@ -80,9 +80,9 @@ public partial class Image : IEquatable<Image>, IValidatableObject
public string UpdatedAt { get; set; }

/// <summary>
/// Returned image S3 path.
/// Returned image path.
/// </summary>
/// <value>Returned image S3 path.</value>
/// <value>Returned image path.</value>
[DataMember(Name="path", EmitDefaultValue=false)]
public string Path { get; set; }

Expand Down
6 changes: 3 additions & 3 deletions src/Regula.FaceSDK.WebClient/Model/ImageFieldsImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public partial class ImageFieldsImage : IEquatable<ImageFieldsImage>, IValidata
/// </summary>
/// <param name="contentType">Original media type of the uploaded image..</param>
/// <param name="content">Base64 encoded image..</param>
/// <param name="imageUrl">Image URL, can be a link to Amazon S3, Google Storage, File System, or HTTP(S)..</param>
/// <param name="imageUrl">Image URL..</param>
/// <param name="resizeOptions">resizeOptions.</param>
public ImageFieldsImage(string contentType = default(string), byte[] content = default(byte[]), string imageUrl = default(string), ResizeOptions resizeOptions = default(ResizeOptions))
{
Expand All @@ -60,9 +60,9 @@ public partial class ImageFieldsImage : IEquatable<ImageFieldsImage>, IValidata
public byte[] Content { get; set; }

/// <summary>
/// Image URL, can be a link to Amazon S3, Google Storage, File System, or HTTP(S).
/// Image URL.
/// </summary>
/// <value>Image URL, can be a link to Amazon S3, Google Storage, File System, or HTTP(S).</value>
/// <value>Image URL.</value>
[DataMember(Name="imageUrl", EmitDefaultValue=false)]
public string ImageUrl { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions src/Regula.FaceSDK.WebClient/Model/QualityDetailsGroups.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ public partial class QualityDetailsGroups : IEquatable<QualityDetailsGroups>, I
/// Gets or Sets Name
/// </summary>
[DataMember(Name="name", EmitDefaultValue=false)]
public FaceImageQualityGroups? Name { get; set; }
public FaceImageQualityGroupsStrings? Name { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="QualityDetailsGroups" /> class.
/// </summary>
/// <param name="groupId">groupId.</param>
/// <param name="name">name.</param>
/// <param name="totalCount">The total number of characteristics in the group..</param>
/// <param name="compliantCount">The number of compliant characteristics in the group..</param>
public QualityDetailsGroups(FaceImageQualityGroups? groupId = default(FaceImageQualityGroups?), FaceImageQualityGroups? name = default(FaceImageQualityGroups?), int totalCount = default(int), int compliantCount = default(int))
public QualityDetailsGroups(FaceImageQualityGroups? groupId = default(FaceImageQualityGroups?), FaceImageQualityGroupsStrings? name = default(FaceImageQualityGroupsStrings?), int totalCount = default(int), int compliantCount = default(int))
{
this.GroupId = groupId;
this.Name = name;
Expand Down
6 changes: 3 additions & 3 deletions src/Regula.FaceSDK.WebClient/Model/RecognizeImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public partial class RecognizeImage : IEquatable<RecognizeImage>, IValidatableO
/// <param name="contentType">Original media type of the returned image..</param>
/// <param name="createdAt">Returned image creation date..</param>
/// <param name="updatedAt">Returned image update date..</param>
/// <param name="path">Returned image S3 path..</param>
/// <param name="path">Returned image path..</param>
/// <param name="url">Returned image URL..</param>
/// <param name="metadata">A free-form object containing person&#39;s extended attributes..</param>
/// <param name="similarity">Similarity score..</param>
Expand Down Expand Up @@ -84,9 +84,9 @@ public partial class RecognizeImage : IEquatable<RecognizeImage>, IValidatableO
public string UpdatedAt { get; set; }

/// <summary>
/// Returned image S3 path.
/// Returned image path.
/// </summary>
/// <value>Returned image S3 path.</value>
/// <value>Returned image path.</value>
[DataMember(Name="path", EmitDefaultValue=false)]
public string Path { get; set; }

Expand Down
12 changes: 6 additions & 6 deletions src/Regula.FaceSDK.WebClient/Model/TransactionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
/// <param name="status">Whether the liveness detection is confirmed (0) or not (1)..</param>
/// <param name="tag">Session identificator..</param>
/// <param name="transactionId">Transaction ID, there can be several transactions within one session..</param>
/// <param name="video">An S3 link to the session video..</param>
/// <param name="video">Link to the session video..</param>
/// <param name="images">List of base64 images.</param>
/// <param name="estimatedAge">Approximate age with an accuracy of +/-3 years..</param>
/// <param name="portrait">S3 link to the portrait..</param>
/// <param name="portrait">Link to the portrait..</param>
/// <param name="metadata">A free-form object containing person&#39;s extended attributes..</param>
public TransactionInfo(int code = default(int), int status = default(int), string tag = default(string), string transactionId = default(string), string video = default(string), List<string> images = default(List<string>), int estimatedAge = default(int), string portrait = default(string), Dictionary<string, Object> metadata = default(Dictionary<string, Object>))
{
Expand Down Expand Up @@ -84,9 +84,9 @@
public string TransactionId { get; set; }

/// <summary>
/// An S3 link to the session video.
/// Link to the session video.
/// </summary>
/// <value>An S3 link to the session video.</value>
/// <value>Link to the session video.</value>
[DataMember(Name="video", EmitDefaultValue=false)]
public string Video { get; set; }

Expand All @@ -105,9 +105,9 @@
public int EstimatedAge { get; set; }

/// <summary>
/// S3 link to the portrait.
/// Link to the portrait.
/// </summary>
/// <value>S3 link to the portrait.</value>
/// <value>Link to the portrait.</value>
[DataMember(Name="portrait", EmitDefaultValue=false)]
public string Portrait { get; set; }

Expand Down Expand Up @@ -171,12 +171,12 @@
return
(
this.Code == input.Code ||
(this.Code != null &&

Check warning on line 174 in src/Regula.FaceSDK.WebClient/Model/TransactionInfo.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The result of the expression is always 'true' since a value of type 'int' is never equal to 'null' of type 'int?'
this.Code.Equals(input.Code))
) &&
(
this.Status == input.Status ||
(this.Status != null &&

Check warning on line 179 in src/Regula.FaceSDK.WebClient/Model/TransactionInfo.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The result of the expression is always 'true' since a value of type 'int' is never equal to 'null' of type 'int?'
this.Status.Equals(input.Status))
) &&
(
Expand All @@ -202,7 +202,7 @@
) &&
(
this.EstimatedAge == input.EstimatedAge ||
(this.EstimatedAge != null &&

Check warning on line 205 in src/Regula.FaceSDK.WebClient/Model/TransactionInfo.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The result of the expression is always 'true' since a value of type 'int' is never equal to 'null' of type 'int?'
this.EstimatedAge.Equals(input.EstimatedAge))
) &&
(
Expand All @@ -227,9 +227,9 @@
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Code != null)

Check warning on line 230 in src/Regula.FaceSDK.WebClient/Model/TransactionInfo.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The result of the expression is always 'true' since a value of type 'int' is never equal to 'null' of type 'int?'
hashCode = hashCode * 59 + this.Code.GetHashCode();
if (this.Status != null)

Check warning on line 232 in src/Regula.FaceSDK.WebClient/Model/TransactionInfo.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The result of the expression is always 'true' since a value of type 'int' is never equal to 'null' of type 'int?'
hashCode = hashCode * 59 + this.Status.GetHashCode();
if (this.Tag != null)
hashCode = hashCode * 59 + this.Tag.GetHashCode();
Expand All @@ -239,7 +239,7 @@
hashCode = hashCode * 59 + this.Video.GetHashCode();
if (this.Images != null)
hashCode = hashCode * 59 + this.Images.GetHashCode();
if (this.EstimatedAge != null)

Check warning on line 242 in src/Regula.FaceSDK.WebClient/Model/TransactionInfo.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The result of the expression is always 'true' since a value of type 'int' is never equal to 'null' of type 'int?'
hashCode = hashCode * 59 + this.EstimatedAge.GetHashCode();
if (this.Portrait != null)
hashCode = hashCode * 59 + this.Portrait.GetHashCode();
Expand Down
Loading