
shiver.me.timbers.aws.codebuild.SourceCredential Maven / Gradle / Ivy
package shiver.me.timbers.aws.codebuild;
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;
/**
* SourceCredential
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"ServerType",
"Username",
"Token",
"AuthType"
})
public class SourceCredential {
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-servertype
*
*/
@JsonProperty("ServerType")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-servertype")
private CharSequence serverType;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-username
*
*/
@JsonProperty("Username")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-username")
private CharSequence username;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-token
*
*/
@JsonProperty("Token")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-token")
private CharSequence token;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-authtype
*
*/
@JsonProperty("AuthType")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-authtype")
private CharSequence authType;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-servertype
*
*/
@JsonIgnore
public CharSequence getServerType() {
return serverType;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-servertype
*
*/
@JsonIgnore
public void setServerType(CharSequence serverType) {
this.serverType = serverType;
}
public SourceCredential withServerType(CharSequence serverType) {
this.serverType = serverType;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-username
*
*/
@JsonIgnore
public CharSequence getUsername() {
return username;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-username
*
*/
@JsonIgnore
public void setUsername(CharSequence username) {
this.username = username;
}
public SourceCredential withUsername(CharSequence username) {
this.username = username;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-token
*
*/
@JsonIgnore
public CharSequence getToken() {
return token;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-token
*
*/
@JsonIgnore
public void setToken(CharSequence token) {
this.token = token;
}
public SourceCredential withToken(CharSequence token) {
this.token = token;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-authtype
*
*/
@JsonIgnore
public CharSequence getAuthType() {
return authType;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-authtype
*
*/
@JsonIgnore
public void setAuthType(CharSequence authType) {
this.authType = authType;
}
public SourceCredential withAuthType(CharSequence authType) {
this.authType = authType;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("serverType", serverType).append("username", username).append("token", token).append("authType", authType).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(authType).append(serverType).append(username).append(token).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof SourceCredential) == false) {
return false;
}
SourceCredential rhs = ((SourceCredential) other);
return new EqualsBuilder().append(authType, rhs.authType).append(serverType, rhs.serverType).append(username, rhs.username).append(token, rhs.token).isEquals();
}
}