org.openapitools.client.model.WorkflowRun Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zuora-sdk-java Show documentation
Show all versions of zuora-sdk-java Show documentation
The SDK of JAVA language for Zuora pricing system
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* WorkflowRun
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkflowRun {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Integer id;
/**
* The type of the active version. Currently the only valid value is `Workflow::Setup`.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
SETUP("setup"),
INSTANCE("instance"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
TypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private TypeEnum type;
/**
* The status of an active version.
*/
@JsonAdapter(StateEnum.Adapter.class)
public enum StateEnum {
QUEUED("queued"),
PROCESSING("processing"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
StateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StateEnum fromValue(String value) {
for (StateEnum b : StateEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StateEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StateEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_STATE = "state";
@SerializedName(SERIALIZED_NAME_STATE)
private StateEnum state;
public static final String SERIALIZED_NAME_ORIGINAL_WORKFLOW_ID = "original_workflow_id";
@SerializedName(SERIALIZED_NAME_ORIGINAL_WORKFLOW_ID)
private Integer originalWorkflowId;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public static final String SERIALIZED_NAME_CREATED_TIME = "created_time";
@SerializedName(SERIALIZED_NAME_CREATED_TIME)
private OffsetDateTime createdTime;
public static final String SERIALIZED_NAME_UPDATED_TIME = "updated_time";
@SerializedName(SERIALIZED_NAME_UPDATED_TIME)
private OffsetDateTime updatedTime;
public WorkflowRun() {
}
public WorkflowRun id(Integer id) {
this.id = id;
return this;
}
/**
* The unique ID of an active version.
* @return id
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The unique ID of an active version.")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public WorkflowRun type(TypeEnum type) {
this.type = type;
return this;
}
/**
* The type of the active version. Currently the only valid value is `Workflow::Setup`.
* @return type
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The type of the active version. Currently the only valid value is `Workflow::Setup`.")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public WorkflowRun state(StateEnum state) {
this.state = state;
return this;
}
/**
* The status of an active version.
* @return state
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The status of an active version.")
public StateEnum getState() {
return state;
}
public void setState(StateEnum state) {
this.state = state;
}
public WorkflowRun originalWorkflowId(Integer originalWorkflowId) {
this.originalWorkflowId = originalWorkflowId;
return this;
}
/**
* Identifier of the original Workflow version.
* @return originalWorkflowId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Identifier of the original Workflow version.")
public Integer getOriginalWorkflowId() {
return originalWorkflowId;
}
public void setOriginalWorkflowId(Integer originalWorkflowId) {
this.originalWorkflowId = originalWorkflowId;
}
public WorkflowRun name(String name) {
this.name = name;
return this;
}
/**
* The name of the workflow definition.
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The name of the workflow definition.")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public WorkflowRun createdTime(OffsetDateTime createdTime) {
this.createdTime = createdTime;
return this;
}
/**
* Get createdTime
* @return createdTime
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getCreatedTime() {
return createdTime;
}
public void setCreatedTime(OffsetDateTime createdTime) {
this.createdTime = createdTime;
}
public WorkflowRun updatedTime(OffsetDateTime updatedTime) {
this.updatedTime = updatedTime;
return this;
}
/**
* Get updatedTime
* @return updatedTime
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getUpdatedTime() {
return updatedTime;
}
public void setUpdatedTime(OffsetDateTime updatedTime) {
this.updatedTime = updatedTime;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WorkflowRun workflowRun = (WorkflowRun) o;
return Objects.equals(this.id, workflowRun.id) &&
Objects.equals(this.type, workflowRun.type) &&
Objects.equals(this.state, workflowRun.state) &&
Objects.equals(this.originalWorkflowId, workflowRun.originalWorkflowId) &&
Objects.equals(this.name, workflowRun.name) &&
Objects.equals(this.createdTime, workflowRun.createdTime) &&
Objects.equals(this.updatedTime, workflowRun.updatedTime);
}
@Override
public int hashCode() {
return Objects.hash(id, type, state, originalWorkflowId, name, createdTime, updatedTime);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class WorkflowRun {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" originalWorkflowId: ").append(toIndentedString(originalWorkflowId)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n");
sb.append(" updatedTime: ").append(toIndentedString(updatedTime)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy