com.vertexvis.model.BatchOperation Maven / Gradle / Ivy
/*
* Vertex Platform API
* The Vertex distributed cloud rendering platform includes a set of APIs and SDKs, which together allow easily integrating 3D product data into your business application. See our [Developer Guides](https://developer.vertexvis.com/docs/guides/render-your-first-scene) to get started. Notes about the Postman collection and API Reference code samples, - They include all required and optional body parameters for completeness. Remove any optional parameters as desired. - They use auto-generated IDs and other values that may share the same value for ease of documentation only. In actual requests and responses, the IDs should uniquely identify their corresponding resource.
*
* The version of the OpenAPI document: 1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.vertexvis.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 com.vertexvis.model.AnyOfCreateSceneItemRequestData;
import com.vertexvis.model.BatchOperationRef;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* BatchOperation
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class BatchOperation {
public static final String SERIALIZED_NAME_DATA = "data";
@SerializedName(SERIALIZED_NAME_DATA)
private AnyOfCreateSceneItemRequestData data;
/**
* Batch operation type type.
*/
@JsonAdapter(OpEnum.Adapter.class)
public enum OpEnum {
ADD("add");
private String value;
OpEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static OpEnum fromValue(String value) {
for (OpEnum b : OpEnum.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 OpEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public OpEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return OpEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_OP = "op";
@SerializedName(SERIALIZED_NAME_OP)
private OpEnum op;
public static final String SERIALIZED_NAME_REF = "ref";
@SerializedName(SERIALIZED_NAME_REF)
private BatchOperationRef ref;
public BatchOperation data(AnyOfCreateSceneItemRequestData data) {
this.data = data;
return this;
}
/**
* Operation's primary data.
* @return data
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Operation's primary data.")
public AnyOfCreateSceneItemRequestData getData() {
return data;
}
public void setData(AnyOfCreateSceneItemRequestData data) {
this.data = data;
}
public BatchOperation op(OpEnum op) {
this.op = op;
return this;
}
/**
* Batch operation type type.
* @return op
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "add", required = true, value = "Batch operation type type.")
public OpEnum getOp() {
return op;
}
public void setOp(OpEnum op) {
this.op = op;
}
public BatchOperation ref(BatchOperationRef ref) {
this.ref = ref;
return this;
}
/**
* Get ref
* @return ref
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
public BatchOperationRef getRef() {
return ref;
}
public void setRef(BatchOperationRef ref) {
this.ref = ref;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BatchOperation batchOperation = (BatchOperation) o;
return Objects.equals(this.data, batchOperation.data) &&
Objects.equals(this.op, batchOperation.op) &&
Objects.equals(this.ref, batchOperation.ref);
}
@Override
public int hashCode() {
return Objects.hash(data, op, ref);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BatchOperation {\n");
sb.append(" data: ").append(toIndentedString(data)).append("\n");
sb.append(" op: ").append(toIndentedString(op)).append("\n");
sb.append(" ref: ").append(toIndentedString(ref)).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 ");
}
}