-
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 runSource endpoint (generated)
algolia/api-clients-automation#3453 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
- Loading branch information
1 parent
162b4d5
commit dc9e681
Showing
4 changed files
with
378 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
40 changes: 40 additions & 0 deletions
40
algoliasearch/src/main/java/com/algolia/model/ingestion/EntityType.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,40 @@ | ||
// 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.ingestion; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import com.fasterxml.jackson.databind.annotation.*; | ||
|
||
/** Type of entity to update. */ | ||
public enum EntityType { | ||
PRODUCT("product"), | ||
|
||
COLLECTION("collection"); | ||
|
||
private final String value; | ||
|
||
EntityType(String value) { | ||
this.value = value; | ||
} | ||
|
||
@JsonValue | ||
public String getValue() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return String.valueOf(value); | ||
} | ||
|
||
@JsonCreator | ||
public static EntityType fromValue(String value) { | ||
for (EntityType b : EntityType.values()) { | ||
if (b.value.equals(value)) { | ||
return b; | ||
} | ||
} | ||
throw new IllegalArgumentException("Unexpected value '" + value + "'"); | ||
} | ||
} |
138 changes: 138 additions & 0 deletions
138
algoliasearch/src/main/java/com/algolia/model/ingestion/RunSourcePayload.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,138 @@ | ||
// 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.ingestion; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import com.fasterxml.jackson.databind.annotation.*; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
/** RunSourcePayload */ | ||
public class RunSourcePayload { | ||
|
||
@JsonProperty("indexToInclude") | ||
private List<String> indexToInclude; | ||
|
||
@JsonProperty("indexToExclude") | ||
private List<String> indexToExclude; | ||
|
||
@JsonProperty("entityIDs") | ||
private List<String> entityIDs; | ||
|
||
@JsonProperty("entityType") | ||
private EntityType entityType; | ||
|
||
public RunSourcePayload setIndexToInclude(List<String> indexToInclude) { | ||
this.indexToInclude = indexToInclude; | ||
return this; | ||
} | ||
|
||
public RunSourcePayload addIndexToInclude(String indexToIncludeItem) { | ||
if (this.indexToInclude == null) { | ||
this.indexToInclude = new ArrayList<>(); | ||
} | ||
this.indexToInclude.add(indexToIncludeItem); | ||
return this; | ||
} | ||
|
||
/** List of index names to include in reidexing/update. */ | ||
@javax.annotation.Nullable | ||
public List<String> getIndexToInclude() { | ||
return indexToInclude; | ||
} | ||
|
||
public RunSourcePayload setIndexToExclude(List<String> indexToExclude) { | ||
this.indexToExclude = indexToExclude; | ||
return this; | ||
} | ||
|
||
public RunSourcePayload addIndexToExclude(String indexToExcludeItem) { | ||
if (this.indexToExclude == null) { | ||
this.indexToExclude = new ArrayList<>(); | ||
} | ||
this.indexToExclude.add(indexToExcludeItem); | ||
return this; | ||
} | ||
|
||
/** List of index names to exclude in reidexing/update. */ | ||
@javax.annotation.Nullable | ||
public List<String> getIndexToExclude() { | ||
return indexToExclude; | ||
} | ||
|
||
public RunSourcePayload setEntityIDs(List<String> entityIDs) { | ||
this.entityIDs = entityIDs; | ||
return this; | ||
} | ||
|
||
public RunSourcePayload addEntityIDs(String entityIDsItem) { | ||
if (this.entityIDs == null) { | ||
this.entityIDs = new ArrayList<>(); | ||
} | ||
this.entityIDs.add(entityIDsItem); | ||
return this; | ||
} | ||
|
||
/** List of entityID to update. */ | ||
@javax.annotation.Nullable | ||
public List<String> getEntityIDs() { | ||
return entityIDs; | ||
} | ||
|
||
public RunSourcePayload setEntityType(EntityType entityType) { | ||
this.entityType = entityType; | ||
return this; | ||
} | ||
|
||
/** Get entityType */ | ||
@javax.annotation.Nullable | ||
public EntityType getEntityType() { | ||
return entityType; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
RunSourcePayload runSourcePayload = (RunSourcePayload) o; | ||
return ( | ||
Objects.equals(this.indexToInclude, runSourcePayload.indexToInclude) && | ||
Objects.equals(this.indexToExclude, runSourcePayload.indexToExclude) && | ||
Objects.equals(this.entityIDs, runSourcePayload.entityIDs) && | ||
Objects.equals(this.entityType, runSourcePayload.entityType) | ||
); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(indexToInclude, indexToExclude, entityIDs, entityType); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class RunSourcePayload {\n"); | ||
sb.append(" indexToInclude: ").append(toIndentedString(indexToInclude)).append("\n"); | ||
sb.append(" indexToExclude: ").append(toIndentedString(indexToExclude)).append("\n"); | ||
sb.append(" entityIDs: ").append(toIndentedString(entityIDs)).append("\n"); | ||
sb.append(" entityType: ").append(toIndentedString(entityType)).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 "); | ||
} | ||
} |
86 changes: 86 additions & 0 deletions
86
algoliasearch/src/main/java/com/algolia/model/ingestion/RunSourceResponse.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,86 @@ | ||
// 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.ingestion; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import com.fasterxml.jackson.databind.annotation.*; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.Objects; | ||
|
||
/** RunSourceResponse */ | ||
public class RunSourceResponse { | ||
|
||
@JsonProperty("taskWithRunID") | ||
private Map<String, String> taskWithRunID = new HashMap<>(); | ||
|
||
@JsonProperty("createdAt") | ||
private String createdAt; | ||
|
||
public RunSourceResponse setTaskWithRunID(Map<String, String> taskWithRunID) { | ||
this.taskWithRunID = taskWithRunID; | ||
return this; | ||
} | ||
|
||
public RunSourceResponse putTaskWithRunID(String key, String taskWithRunIDItem) { | ||
this.taskWithRunID.put(key, taskWithRunIDItem); | ||
return this; | ||
} | ||
|
||
/** Map of taskID sent for reindex with the corresponding runID. */ | ||
@javax.annotation.Nonnull | ||
public Map<String, String> getTaskWithRunID() { | ||
return taskWithRunID; | ||
} | ||
|
||
public RunSourceResponse setCreatedAt(String createdAt) { | ||
this.createdAt = createdAt; | ||
return this; | ||
} | ||
|
||
/** Date of creation in RFC 3339 format. */ | ||
@javax.annotation.Nonnull | ||
public String getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
RunSourceResponse runSourceResponse = (RunSourceResponse) o; | ||
return ( | ||
Objects.equals(this.taskWithRunID, runSourceResponse.taskWithRunID) && Objects.equals(this.createdAt, runSourceResponse.createdAt) | ||
); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(taskWithRunID, createdAt); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class RunSourceResponse {\n"); | ||
sb.append(" taskWithRunID: ").append(toIndentedString(taskWithRunID)).append("\n"); | ||
sb.append(" createdAt: ").append(toIndentedString(createdAt)).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 "); | ||
} | ||
} |