-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(specs): add estimate path and responses [skip-bc] (generated)
algolia/api-clients-automation#4057 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Christopher Hawke <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
- Loading branch information
1 parent
0738753
commit b61b3d3
Showing
6 changed files
with
404 additions
and
10 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
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
110 changes: 110 additions & 0 deletions
110
algoliasearch/Models/Abtesting/EstimateABTestRequest.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,110 @@ | ||
// | ||
// 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> | ||
/// EstimateABTestRequest | ||
/// </summary> | ||
public partial class EstimateABTestRequest | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the EstimateABTestRequest class. | ||
/// </summary> | ||
[JsonConstructor] | ||
public EstimateABTestRequest() { } | ||
/// <summary> | ||
/// Initializes a new instance of the EstimateABTestRequest class. | ||
/// </summary> | ||
/// <param name="configuration">configuration (required).</param> | ||
/// <param name="variants">A/B test variants. (required).</param> | ||
public EstimateABTestRequest(EstimateConfiguration configuration, List<AddABTestsVariant> variants) | ||
{ | ||
Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); | ||
Variants = variants ?? throw new ArgumentNullException(nameof(variants)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or Sets Configuration | ||
/// </summary> | ||
[JsonPropertyName("configuration")] | ||
public EstimateConfiguration Configuration { get; set; } | ||
|
||
/// <summary> | ||
/// A/B test variants. | ||
/// </summary> | ||
/// <value>A/B test variants.</value> | ||
[JsonPropertyName("variants")] | ||
public List<AddABTestsVariant> Variants { 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 EstimateABTestRequest {\n"); | ||
sb.Append(" Configuration: ").Append(Configuration).Append("\n"); | ||
sb.Append(" Variants: ").Append(Variants).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 EstimateABTestRequest input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(Configuration == input.Configuration || (Configuration != null && Configuration.Equals(input.Configuration))) && | ||
(Variants == input.Variants || Variants != null && input.Variants != null && Variants.SequenceEqual(input.Variants)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (Configuration != null) | ||
{ | ||
hashCode = (hashCode * 59) + Configuration.GetHashCode(); | ||
} | ||
if (Variants != null) | ||
{ | ||
hashCode = (hashCode * 59) + Variants.GetHashCode(); | ||
} | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
106 changes: 106 additions & 0 deletions
106
algoliasearch/Models/Abtesting/EstimateABTestResponse.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,106 @@ | ||
// | ||
// 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> | ||
/// EstimateABTestResponse | ||
/// </summary> | ||
public partial class EstimateABTestResponse | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the EstimateABTestResponse class. | ||
/// </summary> | ||
public EstimateABTestResponse() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Estimated number of days needed to reach the sample sizes required for detecting the configured effect. This value is based on historical traffic. | ||
/// </summary> | ||
/// <value>Estimated number of days needed to reach the sample sizes required for detecting the configured effect. This value is based on historical traffic.</value> | ||
[JsonPropertyName("durationDays")] | ||
public long? DurationDays { get; set; } | ||
|
||
/// <summary> | ||
/// Number of tracked searches needed to be able to detect the configured effect for the control variant. | ||
/// </summary> | ||
/// <value>Number of tracked searches needed to be able to detect the configured effect for the control variant.</value> | ||
[JsonPropertyName("controlSampleSize")] | ||
public long? ControlSampleSize { get; set; } | ||
|
||
/// <summary> | ||
/// Number of tracked searches needed to be able to detect the configured effect for the experiment variant. | ||
/// </summary> | ||
/// <value>Number of tracked searches needed to be able to detect the configured effect for the experiment variant.</value> | ||
[JsonPropertyName("experimentSampleSize")] | ||
public long? ExperimentSampleSize { 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 EstimateABTestResponse {\n"); | ||
sb.Append(" DurationDays: ").Append(DurationDays).Append("\n"); | ||
sb.Append(" ControlSampleSize: ").Append(ControlSampleSize).Append("\n"); | ||
sb.Append(" ExperimentSampleSize: ").Append(ExperimentSampleSize).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 EstimateABTestResponse input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(DurationDays == input.DurationDays || DurationDays.Equals(input.DurationDays)) && | ||
(ControlSampleSize == input.ControlSampleSize || ControlSampleSize.Equals(input.ControlSampleSize)) && | ||
(ExperimentSampleSize == input.ExperimentSampleSize || ExperimentSampleSize.Equals(input.ExperimentSampleSize)); | ||
} | ||
|
||
/// <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) + DurationDays.GetHashCode(); | ||
hashCode = (hashCode * 59) + ControlSampleSize.GetHashCode(); | ||
hashCode = (hashCode * 59) + ExperimentSampleSize.GetHashCode(); | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
Oops, something went wrong.