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

update #64

Merged
merged 1 commit into from
Feb 19, 2024
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
18 changes: 1 addition & 17 deletions src/Regula.FaceSDK.WebClient/Model/MatchAndSearchRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ public partial class MatchAndSearchRequest : IEquatable<MatchAndSearchRequest>,
/// </summary>
/// <param name="tag">Session identificator..</param>
/// <param name="images">Array of Person images..</param>
/// <param name="createPerson">createPerson.</param>
/// <param name="groupIds">IDs of the groups in which the search is performed..</param>
public MatchAndSearchRequest(string tag = default(string), List<MatchAndSearchRequestAllOfImages> images = default(List<MatchAndSearchRequestAllOfImages>), SearchParametersCreatePerson createPerson = default(SearchParametersCreatePerson), List<Guid> groupIds = default(List<Guid>))
public MatchAndSearchRequest(string tag = default(string), List<MatchAndSearchRequestAllOfImages> images = default(List<MatchAndSearchRequestAllOfImages>), List<Guid> groupIds = default(List<Guid>))
{
this.Tag = tag;
this.Images = images;
this.CreatePerson = createPerson;
this.GroupIds = groupIds;
}

Expand All @@ -59,12 +57,6 @@ public partial class MatchAndSearchRequest : IEquatable<MatchAndSearchRequest>,
[DataMember(Name="images", EmitDefaultValue=false)]
public List<MatchAndSearchRequestAllOfImages> Images { get; set; }

/// <summary>
/// Gets or Sets CreatePerson
/// </summary>
[DataMember(Name="createPerson", EmitDefaultValue=false)]
public SearchParametersCreatePerson CreatePerson { get; set; }

/// <summary>
/// IDs of the groups in which the search is performed.
/// </summary>
Expand All @@ -82,7 +74,6 @@ public override string ToString()
sb.Append("class MatchAndSearchRequest {\n");
sb.Append(" Tag: ").Append(Tag).Append("\n");
sb.Append(" Images: ").Append(Images).Append("\n");
sb.Append(" CreatePerson: ").Append(CreatePerson).Append("\n");
sb.Append(" GroupIds: ").Append(GroupIds).Append("\n");
sb.Append("}\n");
return sb.ToString();
Expand Down Expand Up @@ -129,11 +120,6 @@ public bool Equals(MatchAndSearchRequest input)
input.Images != null &&
this.Images.SequenceEqual(input.Images)
) &&
(
this.CreatePerson == input.CreatePerson ||
(this.CreatePerson != null &&
this.CreatePerson.Equals(input.CreatePerson))
) &&
(
this.GroupIds == input.GroupIds ||
this.GroupIds != null &&
Expand All @@ -155,8 +141,6 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Tag.GetHashCode();
if (this.Images != null)
hashCode = hashCode * 59 + this.Images.GetHashCode();
if (this.CreatePerson != null)
hashCode = hashCode * 59 + this.CreatePerson.GetHashCode();
if (this.GroupIds != null)
hashCode = hashCode * 59 + this.GroupIds.GetHashCode();
return hashCode;
Expand Down
124 changes: 117 additions & 7 deletions src/Regula.FaceSDK.WebClient/Model/SearchResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,88 @@ public partial class SearchResult : IEquatable<SearchResult>, IValidatableObjec
/// <summary>
/// Initializes a new instance of the <see cref="SearchResult" /> class.
/// </summary>
/// <param name="code">Search result code..</param>
/// <param name="persons">Person data..</param>
public SearchResult(int code = default(int), List<SearchPerson> persons = default(List<SearchPerson>))
/// <param name="code">Result code. It is returned only with response 200..</param>
/// <param name="persons">Array of Person images. It is returned only with response 200..</param>
/// <param name="id">Person ID. The list of persons is sorted by decreasing ID value..</param>
/// <param name="createdAt">Person creation date..</param>
/// <param name="updatedAt">Person update date..</param>
/// <param name="groups">List of groups this person belongs to..</param>
/// <param name="name">Person name..</param>
/// <param name="metadata">A free-form object containing person&#39;s extended attributes. Available when a person is being created.</param>
public SearchResult(int code = default(int), List<SearchPerson> persons = default(List<SearchPerson>), Guid? id = default(Guid?), string createdAt = default(string), string updatedAt = default(string), List<Guid> groups = default(List<Guid>), string name = default(string), Dictionary<string, Object> metadata = default(Dictionary<string, Object>))
{
this.Id = id;
this.CreatedAt = createdAt;
this.UpdatedAt = updatedAt;
this.Groups = groups;
this.Name = name;
this.Metadata = metadata;
this.Code = code;
this.Persons = persons;
this.Id = id;
this.CreatedAt = createdAt;
this.UpdatedAt = updatedAt;
this.Groups = groups;
this.Name = name;
this.Metadata = metadata;
}

/// <summary>
/// Search result code.
/// Result code. It is returned only with response 200.
/// </summary>
/// <value>Search result code.</value>
/// <value>Result code. It is returned only with response 200.</value>
[DataMember(Name="code", EmitDefaultValue=false)]
public int Code { get; set; }

/// <summary>
/// Person data.
/// Array of Person images. It is returned only with response 200.
/// </summary>
/// <value>Person data.</value>
/// <value>Array of Person images. It is returned only with response 200.</value>
[DataMember(Name="persons", EmitDefaultValue=false)]
public List<SearchPerson> Persons { get; set; }

/// <summary>
/// Person ID. The list of persons is sorted by decreasing ID value.
/// </summary>
/// <value>Person ID. The list of persons is sorted by decreasing ID value.</value>
[DataMember(Name="id", EmitDefaultValue=true)]
public Guid? Id { get; set; }

/// <summary>
/// Person creation date.
/// </summary>
/// <value>Person creation date.</value>
[DataMember(Name="createdAt", EmitDefaultValue=true)]
public string CreatedAt { get; set; }

/// <summary>
/// Person update date.
/// </summary>
/// <value>Person update date.</value>
[DataMember(Name="updatedAt", EmitDefaultValue=true)]
public string UpdatedAt { get; set; }

/// <summary>
/// List of groups this person belongs to.
/// </summary>
/// <value>List of groups this person belongs to.</value>
[DataMember(Name="groups", EmitDefaultValue=true)]
public List<Guid> Groups { get; set; }

/// <summary>
/// Person name.
/// </summary>
/// <value>Person name.</value>
[DataMember(Name="name", EmitDefaultValue=true)]
public string Name { get; set; }

/// <summary>
/// A free-form object containing person&#39;s extended attributes. Available when a person is being created
/// </summary>
/// <value>A free-form object containing person&#39;s extended attributes. Available when a person is being created</value>
[DataMember(Name="metadata", EmitDefaultValue=true)]
public Dictionary<string, Object> Metadata { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -65,6 +125,12 @@ public override string ToString()
sb.Append("class SearchResult {\n");
sb.Append(" Code: ").Append(Code).Append("\n");
sb.Append(" Persons: ").Append(Persons).Append("\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n");
sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n");
sb.Append(" Groups: ").Append(Groups).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" Metadata: ").Append(Metadata).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down Expand Up @@ -109,6 +175,38 @@ public bool Equals(SearchResult input)
this.Persons != null &&
input.Persons != null &&
this.Persons.SequenceEqual(input.Persons)
) &&
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.CreatedAt == input.CreatedAt ||
(this.CreatedAt != null &&
this.CreatedAt.Equals(input.CreatedAt))
) &&
(
this.UpdatedAt == input.UpdatedAt ||
(this.UpdatedAt != null &&
this.UpdatedAt.Equals(input.UpdatedAt))
) &&
(
this.Groups == input.Groups ||
this.Groups != null &&
input.Groups != null &&
this.Groups.SequenceEqual(input.Groups)
) &&
(
this.Name == input.Name ||
(this.Name != null &&
this.Name.Equals(input.Name))
) &&
(
this.Metadata == input.Metadata ||
this.Metadata != null &&
input.Metadata != null &&
this.Metadata.SequenceEqual(input.Metadata)
);
}

Expand All @@ -125,6 +223,18 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Code.GetHashCode();
if (this.Persons != null)
hashCode = hashCode * 59 + this.Persons.GetHashCode();
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.CreatedAt != null)
hashCode = hashCode * 59 + this.CreatedAt.GetHashCode();
if (this.UpdatedAt != null)
hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode();
if (this.Groups != null)
hashCode = hashCode * 59 + this.Groups.GetHashCode();
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
if (this.Metadata != null)
hashCode = hashCode * 59 + this.Metadata.GetHashCode();
return hashCode;
}
}
Expand Down
9 changes: 5 additions & 4 deletions src/Regula.FaceSDK.WebClient/Model/TransactionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/// <param name="age">Approximate age with an accuracy of +/-3 years..</param>
/// <param name="portrait">Link to the portrait, depends on the selected storage type. [Learn more](https://docs.regulaforensics.com/develop/face-sdk/web-service/administration/storage/).</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), int age = default(int), string portrait = default(string), Dictionary<string, Object> metadata = default(Dictionary<string, Object>))
public TransactionInfo(int code = default(int), int status = default(int), string tag = default(string), string transactionId = default(string), string video = default(string), List<Dictionary<string, Object>> age = default(List<Dictionary<string, Object>>), string portrait = default(string), Dictionary<string, Object> metadata = default(Dictionary<string, Object>))
{
this.Code = code;
this.Status = status;
Expand Down Expand Up @@ -93,7 +93,7 @@
/// </summary>
/// <value>Approximate age with an accuracy of +/-3 years.</value>
[DataMember(Name="age", EmitDefaultValue=false)]
public int Age { get; set; }
public List<Dictionary<string, Object>> Age { get; set; }

/// <summary>
/// Link to the portrait, depends on the selected storage type. [Learn more](https://docs.regulaforensics.com/develop/face-sdk/web-service/administration/storage/)
Expand Down Expand Up @@ -161,12 +161,12 @@
return
(
this.Code == input.Code ||
(this.Code != null &&

Check warning on line 164 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 169 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 @@ -186,8 +186,9 @@
) &&
(
this.Age == input.Age ||
(this.Age != null &&
this.Age.Equals(input.Age))
this.Age != null &&
input.Age != null &&
this.Age.SequenceEqual(input.Age)
) &&
(
this.Portrait == input.Portrait ||
Expand All @@ -211,9 +212,9 @@
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Code != null)

Check warning on line 215 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 217 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 Down
Loading