shiver.me.timbers.aws.ecs.TaskDefinitionVolumeFrom Maven / Gradle / Ivy
package shiver.me.timbers.aws.ecs;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import shiver.me.timbers.aws.Property;
/**
* TaskDefinitionVolumeFrom
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions-volumesfrom.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"ReadOnly",
"SourceContainer"
})
public class TaskDefinitionVolumeFrom implements Property
{
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions-volumesfrom.html#cfn-ecs-taskdefinition-containerdefinition-volumesfrom-readonly
*
*/
@JsonProperty("ReadOnly")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions-volumesfrom.html#cfn-ecs-taskdefinition-containerdefinition-volumesfrom-readonly")
private CharSequence readOnly;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions-volumesfrom.html#cfn-ecs-taskdefinition-containerdefinition-volumesfrom-sourcecontainer
*
*/
@JsonProperty("SourceContainer")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions-volumesfrom.html#cfn-ecs-taskdefinition-containerdefinition-volumesfrom-sourcecontainer")
private CharSequence sourceContainer;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions-volumesfrom.html#cfn-ecs-taskdefinition-containerdefinition-volumesfrom-readonly
*
*/
@JsonIgnore
public CharSequence getReadOnly() {
return readOnly;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions-volumesfrom.html#cfn-ecs-taskdefinition-containerdefinition-volumesfrom-readonly
*
*/
@JsonIgnore
public void setReadOnly(CharSequence readOnly) {
this.readOnly = readOnly;
}
public TaskDefinitionVolumeFrom withReadOnly(CharSequence readOnly) {
this.readOnly = readOnly;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions-volumesfrom.html#cfn-ecs-taskdefinition-containerdefinition-volumesfrom-sourcecontainer
*
*/
@JsonIgnore
public CharSequence getSourceContainer() {
return sourceContainer;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinitions-volumesfrom.html#cfn-ecs-taskdefinition-containerdefinition-volumesfrom-sourcecontainer
*
*/
@JsonIgnore
public void setSourceContainer(CharSequence sourceContainer) {
this.sourceContainer = sourceContainer;
}
public TaskDefinitionVolumeFrom withSourceContainer(CharSequence sourceContainer) {
this.sourceContainer = sourceContainer;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("readOnly", readOnly).append("sourceContainer", sourceContainer).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(sourceContainer).append(readOnly).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof TaskDefinitionVolumeFrom) == false) {
return false;
}
TaskDefinitionVolumeFrom rhs = ((TaskDefinitionVolumeFrom) other);
return new EqualsBuilder().append(sourceContainer, rhs.sourceContainer).append(readOnly, rhs.readOnly).isEquals();
}
}