shiver.me.timbers.aws.ram.ResourceShare Maven / Gradle / Ivy
Show all versions of smt-cloudformation-objects Show documentation
package shiver.me.timbers.aws.ram;
import java.util.ArrayList;
import java.util.List;
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;
import shiver.me.timbers.aws.Tag;
/**
* ResourceShare
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Principals",
"AllowExternalPrincipals",
"ResourceArns",
"Tags",
"Name"
})
public class ResourceShare {
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-principals
*
*/
@JsonProperty("Principals")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-principals")
private List principals = new ArrayList();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-allowexternalprincipals
*
*/
@JsonProperty("AllowExternalPrincipals")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-allowexternalprincipals")
private CharSequence allowExternalPrincipals;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-resourcearns
*
*/
@JsonProperty("ResourceArns")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-resourcearns")
private List resourceArns = new ArrayList();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-tags
*
*/
@JsonProperty("Tags")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-tags")
private List> tags = new ArrayList>();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-name
*
*/
@JsonProperty("Name")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-name")
private CharSequence name;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-principals
*
*/
@JsonIgnore
public List getPrincipals() {
return principals;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-principals
*
*/
@JsonIgnore
public void setPrincipals(List principals) {
this.principals = principals;
}
public ResourceShare withPrincipals(List principals) {
this.principals = principals;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-allowexternalprincipals
*
*/
@JsonIgnore
public CharSequence getAllowExternalPrincipals() {
return allowExternalPrincipals;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-allowexternalprincipals
*
*/
@JsonIgnore
public void setAllowExternalPrincipals(CharSequence allowExternalPrincipals) {
this.allowExternalPrincipals = allowExternalPrincipals;
}
public ResourceShare withAllowExternalPrincipals(CharSequence allowExternalPrincipals) {
this.allowExternalPrincipals = allowExternalPrincipals;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-resourcearns
*
*/
@JsonIgnore
public List getResourceArns() {
return resourceArns;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-resourcearns
*
*/
@JsonIgnore
public void setResourceArns(List resourceArns) {
this.resourceArns = resourceArns;
}
public ResourceShare withResourceArns(List resourceArns) {
this.resourceArns = resourceArns;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-tags
*
*/
@JsonIgnore
public List> getTags() {
return tags;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-tags
*
*/
@JsonIgnore
public void setTags(List> tags) {
this.tags = tags;
}
public ResourceShare withTags(List> tags) {
this.tags = tags;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-name
*
*/
@JsonIgnore
public CharSequence getName() {
return name;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ram-resourceshare.html#cfn-ram-resourceshare-name
*
*/
@JsonIgnore
public void setName(CharSequence name) {
this.name = name;
}
public ResourceShare withName(CharSequence name) {
this.name = name;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("principals", principals).append("allowExternalPrincipals", allowExternalPrincipals).append("resourceArns", resourceArns).append("tags", tags).append("name", name).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(name).append(principals).append(resourceArns).append(allowExternalPrincipals).append(tags).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ResourceShare) == false) {
return false;
}
ResourceShare rhs = ((ResourceShare) other);
return new EqualsBuilder().append(name, rhs.name).append(principals, rhs.principals).append(resourceArns, rhs.resourceArns).append(allowExternalPrincipals, rhs.allowExternalPrincipals).append(tags, rhs.tags).isEquals();
}
}