-
Notifications
You must be signed in to change notification settings - Fork 33
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 /schedule endpoint (generated)
algolia/api-clients-automation#3350 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Fernando Beck <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
- Loading branch information
1 parent
50c69c1
commit b3cf1a0
Showing
3 changed files
with
233 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
62 changes: 62 additions & 0 deletions
62
algoliasearch/src/main/java/com/algolia/model/abtesting/ScheduleABTestResponse.java
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,62 @@ | ||
// 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. | ||
|
||
package com.algolia.model.abtesting; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import com.fasterxml.jackson.databind.annotation.*; | ||
import java.util.Objects; | ||
|
||
/** ScheduleABTestResponse */ | ||
public class ScheduleABTestResponse { | ||
|
||
@JsonProperty("abTestScheduleID") | ||
private Integer abTestScheduleID; | ||
|
||
public ScheduleABTestResponse setAbTestScheduleID(Integer abTestScheduleID) { | ||
this.abTestScheduleID = abTestScheduleID; | ||
return this; | ||
} | ||
|
||
/** Unique scheduled A/B test identifier. */ | ||
@javax.annotation.Nonnull | ||
public Integer getAbTestScheduleID() { | ||
return abTestScheduleID; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
ScheduleABTestResponse scheduleABTestResponse = (ScheduleABTestResponse) o; | ||
return Objects.equals(this.abTestScheduleID, scheduleABTestResponse.abTestScheduleID); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(abTestScheduleID); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class ScheduleABTestResponse {\n"); | ||
sb.append(" abTestScheduleID: ").append(toIndentedString(abTestScheduleID)).append("\n"); | ||
sb.append("}"); | ||
return sb.toString(); | ||
} | ||
|
||
/** | ||
* Convert the given object to string with each line indented by 4 spaces (except the first line). | ||
*/ | ||
private String toIndentedString(Object o) { | ||
if (o == null) { | ||
return "null"; | ||
} | ||
return o.toString().replace("\n", "\n "); | ||
} | ||
} |
119 changes: 119 additions & 0 deletions
119
algoliasearch/src/main/java/com/algolia/model/abtesting/ScheduleABTestsRequest.java
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,119 @@ | ||
// 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. | ||
|
||
package com.algolia.model.abtesting; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import com.fasterxml.jackson.databind.annotation.*; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
/** ScheduleABTestsRequest */ | ||
public class ScheduleABTestsRequest { | ||
|
||
@JsonProperty("name") | ||
private String name; | ||
|
||
@JsonProperty("variants") | ||
private List<AddABTestsVariant> variants = new ArrayList<>(); | ||
|
||
@JsonProperty("scheduledAt") | ||
private String scheduledAt; | ||
|
||
@JsonProperty("endAt") | ||
private String endAt; | ||
|
||
public ScheduleABTestsRequest setName(String name) { | ||
this.name = name; | ||
return this; | ||
} | ||
|
||
/** A/B test name. */ | ||
@javax.annotation.Nonnull | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
public ScheduleABTestsRequest setVariants(List<AddABTestsVariant> variants) { | ||
this.variants = variants; | ||
return this; | ||
} | ||
|
||
public ScheduleABTestsRequest addVariants(AddABTestsVariant variantsItem) { | ||
this.variants.add(variantsItem); | ||
return this; | ||
} | ||
|
||
/** A/B test variants. */ | ||
@javax.annotation.Nonnull | ||
public List<AddABTestsVariant> getVariants() { | ||
return variants; | ||
} | ||
|
||
public ScheduleABTestsRequest setScheduledAt(String scheduledAt) { | ||
this.scheduledAt = scheduledAt; | ||
return this; | ||
} | ||
|
||
/** Date and time when the A/B test is scheduled to start, in RFC 3339 format. */ | ||
@javax.annotation.Nonnull | ||
public String getScheduledAt() { | ||
return scheduledAt; | ||
} | ||
|
||
public ScheduleABTestsRequest setEndAt(String endAt) { | ||
this.endAt = endAt; | ||
return this; | ||
} | ||
|
||
/** End date and time of the A/B test, in RFC 3339 format. */ | ||
@javax.annotation.Nonnull | ||
public String getEndAt() { | ||
return endAt; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
ScheduleABTestsRequest scheduleABTestsRequest = (ScheduleABTestsRequest) o; | ||
return ( | ||
Objects.equals(this.name, scheduleABTestsRequest.name) && | ||
Objects.equals(this.variants, scheduleABTestsRequest.variants) && | ||
Objects.equals(this.scheduledAt, scheduleABTestsRequest.scheduledAt) && | ||
Objects.equals(this.endAt, scheduleABTestsRequest.endAt) | ||
); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(name, variants, scheduledAt, endAt); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class ScheduleABTestsRequest {\n"); | ||
sb.append(" name: ").append(toIndentedString(name)).append("\n"); | ||
sb.append(" variants: ").append(toIndentedString(variants)).append("\n"); | ||
sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n"); | ||
sb.append(" endAt: ").append(toIndentedString(endAt)).append("\n"); | ||
sb.append("}"); | ||
return sb.toString(); | ||
} | ||
|
||
/** | ||
* Convert the given object to string with each line indented by 4 spaces (except the first line). | ||
*/ | ||
private String toIndentedString(Object o) { | ||
if (o == null) { | ||
return "null"; | ||
} | ||
return o.toString().replace("\n", "\n "); | ||
} | ||
} |