-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(abtesting): consistent naming (generated)
Co-authored-by: Fernando Beck <fe.beck25@gmail.com>
- Loading branch information
1 parent
8afcc23
commit 67383d0
Showing
54 changed files
with
3,746 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/ScheduleABTestResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
// | ||
using System; | ||
using System.Text; | ||
using System.Linq; | ||
using System.Text.Json.Serialization; | ||
using System.Collections.Generic; | ||
using Algolia.Search.Serializer; | ||
using System.Text.Json; | ||
|
||
namespace Algolia.Search.Models.Abtesting; | ||
|
||
/// <summary> | ||
/// ScheduleABTestResponse | ||
/// </summary> | ||
public partial class ScheduleABTestResponse | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the ScheduleABTestResponse class. | ||
/// </summary> | ||
[JsonConstructor] | ||
public ScheduleABTestResponse() { } | ||
/// <summary> | ||
/// Initializes a new instance of the ScheduleABTestResponse class. | ||
/// </summary> | ||
/// <param name="abTestScheduleID">Unique scheduled A/B test identifier. (required).</param> | ||
public ScheduleABTestResponse(int abTestScheduleID) | ||
{ | ||
AbTestScheduleID = abTestScheduleID; | ||
} | ||
|
||
/// <summary> | ||
/// Unique scheduled A/B test identifier. | ||
/// </summary> | ||
/// <value>Unique scheduled A/B test identifier.</value> | ||
[JsonPropertyName("abTestScheduleID")] | ||
public int AbTestScheduleID { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
StringBuilder sb = new StringBuilder(); | ||
sb.Append("class ScheduleABTestResponse {\n"); | ||
sb.Append(" AbTestScheduleID: ").Append(AbTestScheduleID).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 JsonSerializer.Serialize(this, JsonConfig.Options); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
if (obj is not ScheduleABTestResponse input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(AbTestScheduleID == input.AbTestScheduleID || AbTestScheduleID.Equals(input.AbTestScheduleID)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
hashCode = (hashCode * 59) + AbTestScheduleID.GetHashCode(); | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
141 changes: 141 additions & 0 deletions
141
clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/ScheduleABTestsRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
// | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
// | ||
using System; | ||
using System.Text; | ||
using System.Linq; | ||
using System.Text.Json.Serialization; | ||
using System.Collections.Generic; | ||
using Algolia.Search.Serializer; | ||
using System.Text.Json; | ||
|
||
namespace Algolia.Search.Models.Abtesting; | ||
|
||
/// <summary> | ||
/// ScheduleABTestsRequest | ||
/// </summary> | ||
public partial class ScheduleABTestsRequest | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the ScheduleABTestsRequest class. | ||
/// </summary> | ||
[JsonConstructor] | ||
public ScheduleABTestsRequest() { } | ||
/// <summary> | ||
/// Initializes a new instance of the ScheduleABTestsRequest class. | ||
/// </summary> | ||
/// <param name="name">A/B test name. (required).</param> | ||
/// <param name="variants">A/B test variants. (required).</param> | ||
/// <param name="scheduledAt">Date and time when the A/B test is scheduled to start, in RFC 3339 format. (required).</param> | ||
/// <param name="endAt">End date and time of the A/B test, in RFC 3339 format. (required).</param> | ||
public ScheduleABTestsRequest(string name, List<AddABTestsVariant> variants, string scheduledAt, string endAt) | ||
{ | ||
Name = name ?? throw new ArgumentNullException(nameof(name)); | ||
Variants = variants ?? throw new ArgumentNullException(nameof(variants)); | ||
ScheduledAt = scheduledAt ?? throw new ArgumentNullException(nameof(scheduledAt)); | ||
EndAt = endAt ?? throw new ArgumentNullException(nameof(endAt)); | ||
} | ||
|
||
/// <summary> | ||
/// A/B test name. | ||
/// </summary> | ||
/// <value>A/B test name.</value> | ||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// A/B test variants. | ||
/// </summary> | ||
/// <value>A/B test variants.</value> | ||
[JsonPropertyName("variants")] | ||
public List<AddABTestsVariant> Variants { get; set; } | ||
|
||
/// <summary> | ||
/// Date and time when the A/B test is scheduled to start, in RFC 3339 format. | ||
/// </summary> | ||
/// <value>Date and time when the A/B test is scheduled to start, in RFC 3339 format.</value> | ||
[JsonPropertyName("scheduledAt")] | ||
public string ScheduledAt { get; set; } | ||
|
||
/// <summary> | ||
/// End date and time of the A/B test, in RFC 3339 format. | ||
/// </summary> | ||
/// <value>End date and time of the A/B test, in RFC 3339 format.</value> | ||
[JsonPropertyName("endAt")] | ||
public string EndAt { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
StringBuilder sb = new StringBuilder(); | ||
sb.Append("class ScheduleABTestsRequest {\n"); | ||
sb.Append(" Name: ").Append(Name).Append("\n"); | ||
sb.Append(" Variants: ").Append(Variants).Append("\n"); | ||
sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); | ||
sb.Append(" EndAt: ").Append(EndAt).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 JsonSerializer.Serialize(this, JsonConfig.Options); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
if (obj is not ScheduleABTestsRequest input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(Name == input.Name || (Name != null && Name.Equals(input.Name))) && | ||
(Variants == input.Variants || Variants != null && input.Variants != null && Variants.SequenceEqual(input.Variants)) && | ||
(ScheduledAt == input.ScheduledAt || (ScheduledAt != null && ScheduledAt.Equals(input.ScheduledAt))) && | ||
(EndAt == input.EndAt || (EndAt != null && EndAt.Equals(input.EndAt))); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (Name != null) | ||
{ | ||
hashCode = (hashCode * 59) + Name.GetHashCode(); | ||
} | ||
if (Variants != null) | ||
{ | ||
hashCode = (hashCode * 59) + Variants.GetHashCode(); | ||
} | ||
if (ScheduledAt != null) | ||
{ | ||
hashCode = (hashCode * 59) + ScheduledAt.GetHashCode(); | ||
} | ||
if (EndAt != null) | ||
{ | ||
hashCode = (hashCode * 59) + EndAt.GetHashCode(); | ||
} | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
Oops, something went wrong.