package com.gilt.svc.sundial.v0.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.lang.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.Arrays; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.2.7 * User agent: apibuilder app.apibuilder.io/gilt/svc-sundial/0.2.7/android_client * * WARNING: not all features (notably unions) and data types work with android generator yet. * Android generator is designed to be used in an android application, but should work in any java codebase as long as you import jackson and retrofit2 libraries. * If you are considering using this library, would like to request/discuss features, or would like to share how you're using it, please contact android-feedback@gilt.com * */ @JsonIgnoreProperties( ignoreUnknown = true ) @JsonTypeInfo( use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE ) public class BatchImageCommand implements TaskExecutable { private final String image; private final String tag; private final String[] command; private final Integer memory; private final Integer vCpus; private final String jobRoleArn; private final EnvironmentVariable[] environmentVariables; private final String jobQueue; @JsonCreator public BatchImageCommand(@JsonProperty("image") String image, @JsonProperty("tag") String tag, @JsonProperty("command") String[] command, @JsonProperty("memory") Integer memory, @JsonProperty("vCpus") Integer vCpus, @JsonProperty("job_role_arn") String jobRoleArn, @JsonProperty("environment_variables") EnvironmentVariable[] environmentVariables, @JsonProperty("job_queue") String jobQueue) { this.image = image; this.tag = tag; this.command = command; this.memory = memory; this.vCpus = vCpus; this.jobRoleArn = jobRoleArn; this.environmentVariables = environmentVariables; this.jobQueue = jobQueue; } /** * Name of docker image including registry URL if needed */ public String getImage() { return image; } /** * Tag on docker image */ public String getTag() { return tag; } /** * Command to pass to Docker container */ public String[] getCommand() { return command; } public Integer getMemory() { return memory; } public Integer getVCpus() { return vCpus; } /** * ARN of an IAM role, see http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html */ public String getJobRoleArn() { return jobRoleArn; } /** * environment variables to be passed to container */ public EnvironmentVariable[] getEnvironmentVariables() { return environmentVariables; } /** * Override default job queue, eg: for priority queue or GPU instances queue */ public String getJobQueue() { return jobQueue; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; BatchImageCommand that = (BatchImageCommand) o; if (image != null ? !image.equals(that.image) : that.image != null) return false; if (tag != null ? !tag.equals(that.tag) : that.tag != null) return false; if (!Arrays.equals(command, that.command)) return false; if (memory != null ? !memory.equals(that.memory) : that.memory != null) return false; if (vCpus != null ? !vCpus.equals(that.vCpus) : that.vCpus != null) return false; if (jobRoleArn != null ? !jobRoleArn.equals(that.jobRoleArn) : that.jobRoleArn != null) return false; if (!Arrays.equals(environmentVariables, that.environmentVariables)) return false; if (jobQueue != null ? !jobQueue.equals(that.jobQueue) : that.jobQueue != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (image != null ? image.hashCode() : 0); result = 31 * result + (tag != null ? tag.hashCode() : 0); result = 31 * result + (command != null ? command.hashCode() : 0); result = 31 * result + (memory != null ? memory.hashCode() : 0); result = 31 * result + (vCpus != null ? vCpus.hashCode() : 0); result = 31 * result + (jobRoleArn != null ? jobRoleArn.hashCode() : 0); result = 31 * result + (environmentVariables != null ? environmentVariables.hashCode() : 0); result = 31 * result + (jobQueue != null ? jobQueue.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return com.gilt.svc.sundial.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static BatchImageCommand parseJson(String json) throws IOException { return com.gilt.svc.sundial.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, BatchImageCommand.class); } }