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-12266 - update detection types #44

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ src/Regula.FaceSDK.WebClient/Model/DetectRequestAttributes.cs
src/Regula.FaceSDK.WebClient/Model/DetectResponse.cs
src/Regula.FaceSDK.WebClient/Model/DetectResult.cs
src/Regula.FaceSDK.WebClient/Model/Detection.cs
src/Regula.FaceSDK.WebClient/Model/DetectionAttributes.cs
src/Regula.FaceSDK.WebClient/Model/DetectionAttributesDetails.cs
src/Regula.FaceSDK.WebClient/Model/DetectionFace.cs
src/Regula.FaceSDK.WebClient/Model/DetectionQuality.cs
src/Regula.FaceSDK.WebClient/Model/FaceAttribute.cs
Expand Down
9 changes: 4 additions & 5 deletions src/Regula.FaceSDK.WebClient/Model/Detection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected Detection() { }
/// <param name="quality">quality.</param>
/// <param name="roi">The rectangular area of a detected face that is represented by a set of four elements: the X and Y coordinates of the top-left point, and the width and height dimensions of the rectangle. (required).</param>
/// <param name="thumbnail">Base64 of the cropped portrait..</param>
public Detection(byte[] crop = default(byte[]), Dictionary<string, Object> attributes = default(Dictionary<string, Object>), List<List<int>> landmarks = default(List<List<int>>), DetectionQuality quality = default(DetectionQuality), List<decimal> roi = default(List<decimal>), byte[] thumbnail = default(byte[]))
public Detection(byte[] crop = default(byte[]), DetectionAttributes attributes = default(DetectionAttributes), List<List<int>> landmarks = default(List<List<int>>), DetectionQuality quality = default(DetectionQuality), List<decimal> roi = default(List<decimal>), byte[] thumbnail = default(byte[]))
{
// to ensure "landmarks" is required (not null)
if (landmarks == null)
Expand Down Expand Up @@ -83,7 +83,7 @@ protected Detection() { }
/// Gets or Sets Attributes
/// </summary>
[DataMember(Name="attributes", EmitDefaultValue=false)]
public Dictionary<string, Object> Attributes { get; set; }
public DetectionAttributes Attributes { get; set; }

/// <summary>
/// Absolute coordinates (x,y) of five points of each detected face: left eye, right eye, nose, left point of lips, right point of lips.
Expand Down Expand Up @@ -167,9 +167,8 @@ public bool Equals(Detection input)
) &&
(
this.Attributes == input.Attributes ||
this.Attributes != null &&
input.Attributes != null &&
this.Attributes.SequenceEqual(input.Attributes)
(this.Attributes != null &&
this.Attributes.Equals(input.Attributes))
) &&
(
this.Landmarks == input.Landmarks ||
Expand Down
142 changes: 142 additions & 0 deletions src/Regula.FaceSDK.WebClient/Model/DetectionAttributes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/*
* 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>
/// DetectionAttributes
/// </summary>
[DataContract]
public partial class DetectionAttributes : IEquatable<DetectionAttributes>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="DetectionAttributes" /> class.
/// </summary>
/// <param name="details">details.</param>
/// <param name="elapsedTime">The elapsed time for attribute detection..</param>
public DetectionAttributes(List<DetectionAttributesDetails> details = default(List<DetectionAttributesDetails>), decimal elapsedTime = default(decimal))
{
this.Details = details;
this.ElapsedTime = elapsedTime;
}

/// <summary>
/// Gets or Sets Details
/// </summary>
[DataMember(Name="details", EmitDefaultValue=false)]
public List<DetectionAttributesDetails> Details { get; set; }

/// <summary>
/// The elapsed time for attribute detection.
/// </summary>
/// <value>The elapsed time for attribute detection.</value>
[DataMember(Name="elapsedTime", EmitDefaultValue=false)]
public decimal ElapsedTime { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class DetectionAttributes {\n");
sb.Append(" Details: ").Append(Details).Append("\n");
sb.Append(" ElapsedTime: ").Append(ElapsedTime).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as DetectionAttributes);
}

/// <summary>
/// Returns true if DetectionAttributes instances are equal
/// </summary>
/// <param name="input">Instance of DetectionAttributes to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(DetectionAttributes input)
{
if (input == null)
return false;

return
(
this.Details == input.Details ||
this.Details != null &&
input.Details != null &&
this.Details.SequenceEqual(input.Details)
) &&
(
this.ElapsedTime == input.ElapsedTime ||
(this.ElapsedTime != null &&
this.ElapsedTime.Equals(input.ElapsedTime))
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Details != null)
hashCode = hashCode * 59 + this.Details.GetHashCode();
if (this.ElapsedTime != null)
hashCode = hashCode * 59 + this.ElapsedTime.GetHashCode();
return hashCode;
}
}

/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}

}
159 changes: 159 additions & 0 deletions src/Regula.FaceSDK.WebClient/Model/DetectionAttributesDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
/*
* 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>
/// DetectionAttributesDetails
/// </summary>
[DataContract]
public partial class DetectionAttributesDetails : IEquatable<DetectionAttributesDetails>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="DetectionAttributesDetails" /> class.
/// </summary>
/// <param name="name">The name of the attribute..</param>
/// <param name="confidence">The confidence score for the attribute..</param>
/// <param name="value">Value..</param>
public DetectionAttributesDetails(string name = default(string), decimal confidence = default(decimal), Any value = default(Any))

Check failure on line 39 in src/Regula.FaceSDK.WebClient/Model/DetectionAttributesDetails.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The type or namespace name 'Any' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 39 in src/Regula.FaceSDK.WebClient/Model/DetectionAttributesDetails.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The type or namespace name 'Any' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 39 in src/Regula.FaceSDK.WebClient/Model/DetectionAttributesDetails.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The type or namespace name 'Any' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 39 in src/Regula.FaceSDK.WebClient/Model/DetectionAttributesDetails.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The type or namespace name 'Any' could not be found (are you missing a using directive or an assembly reference?)
{
this.Name = name;
this.Confidence = confidence;
this.Value = value;
}

/// <summary>
/// The name of the attribute.
/// </summary>
/// <value>The name of the attribute.</value>
[DataMember(Name="name", EmitDefaultValue=false)]
public string Name { get; set; }

/// <summary>
/// The confidence score for the attribute.
/// </summary>
/// <value>The confidence score for the attribute.</value>
[DataMember(Name="confidence", EmitDefaultValue=false)]
public decimal Confidence { get; set; }

/// <summary>
/// Value.
/// </summary>
/// <value>Value.</value>
[DataMember(Name="value", EmitDefaultValue=false)]
public Any Value { get; set; }

Check failure on line 65 in src/Regula.FaceSDK.WebClient/Model/DetectionAttributesDetails.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The type or namespace name 'Any' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 65 in src/Regula.FaceSDK.WebClient/Model/DetectionAttributesDetails.cs

View workflow job for this annotation

GitHub Actions / run_smoke_test

The type or namespace name 'Any' could not be found (are you missing a using directive or an assembly reference?)

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class DetectionAttributesDetails {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" Confidence: ").Append(Confidence).Append("\n");
sb.Append(" Value: ").Append(Value).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as DetectionAttributesDetails);
}

/// <summary>
/// Returns true if DetectionAttributesDetails instances are equal
/// </summary>
/// <param name="input">Instance of DetectionAttributesDetails to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(DetectionAttributesDetails input)
{
if (input == null)
return false;

return
(
this.Name == input.Name ||
(this.Name != null &&
this.Name.Equals(input.Name))
) &&
(
this.Confidence == input.Confidence ||
(this.Confidence != null &&
this.Confidence.Equals(input.Confidence))
) &&
(
this.Value == input.Value ||
(this.Value != null &&
this.Value.Equals(input.Value))
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
if (this.Confidence != null)
hashCode = hashCode * 59 + this.Confidence.GetHashCode();
if (this.Value != null)
hashCode = hashCode * 59 + this.Value.GetHashCode();
return hashCode;
}
}

/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}

}
Loading