com.amazonaws.services.redshift.model.ClusterIamRole Maven / Gradle / Ivy
Show all versions of aws-java-sdk-redshift Show documentation
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights
* Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.redshift.model;
import java.io.Serializable;
/**
*
* An AWS Identity and Access Management (IAM) role that can be used by the
* associated Amazon Redshift cluster to access other AWS services.
*
*/
public class ClusterIamRole implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the IAM role. For example,
* arn:aws:iam::123456789012:role/RedshiftCopyUnload
.
*
*/
private String iamRoleArn;
/**
*
* Describes the status of the IAM role's association with an Amazon
* Redshift cluster.
*
*
* The following are possible statuses and descriptions.
*
* in-sync
: The role is available for use by the cluster.
* adding
: The role is in the process of being associated
* with the cluster.
* removing
: The role is in the process of being
* disassociated with the cluster.
*
*
*/
private String applyStatus;
/**
*
* The Amazon Resource Name (ARN) of the IAM role. For example,
* arn:aws:iam::123456789012:role/RedshiftCopyUnload
.
*
*
* @param iamRoleArn
* The Amazon Resource Name (ARN) of the IAM role. For example,
* arn:aws:iam::123456789012:role/RedshiftCopyUnload
.
*/
public void setIamRoleArn(String iamRoleArn) {
this.iamRoleArn = iamRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role. For example,
* arn:aws:iam::123456789012:role/RedshiftCopyUnload
.
*
*
* @return The Amazon Resource Name (ARN) of the IAM role. For example,
* arn:aws:iam::123456789012:role/RedshiftCopyUnload
.
*/
public String getIamRoleArn() {
return this.iamRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role. For example,
* arn:aws:iam::123456789012:role/RedshiftCopyUnload
.
*
*
* @param iamRoleArn
* The Amazon Resource Name (ARN) of the IAM role. For example,
* arn:aws:iam::123456789012:role/RedshiftCopyUnload
.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ClusterIamRole withIamRoleArn(String iamRoleArn) {
setIamRoleArn(iamRoleArn);
return this;
}
/**
*
* Describes the status of the IAM role's association with an Amazon
* Redshift cluster.
*
*
* The following are possible statuses and descriptions.
*
* in-sync
: The role is available for use by the cluster.
* adding
: The role is in the process of being associated
* with the cluster.
* removing
: The role is in the process of being
* disassociated with the cluster.
*
*
*
* @param applyStatus
* Describes the status of the IAM role's association with an Amazon
* Redshift cluster.
*
* The following are possible statuses and descriptions.
*
* in-sync
: The role is available for use by the
* cluster.
* adding
: The role is in the process of being
* associated with the cluster.
* removing
: The role is in the process of being
* disassociated with the cluster.
*
*/
public void setApplyStatus(String applyStatus) {
this.applyStatus = applyStatus;
}
/**
*
* Describes the status of the IAM role's association with an Amazon
* Redshift cluster.
*
*
* The following are possible statuses and descriptions.
*
* in-sync
: The role is available for use by the cluster.
* adding
: The role is in the process of being associated
* with the cluster.
* removing
: The role is in the process of being
* disassociated with the cluster.
*
*
*
* @return Describes the status of the IAM role's association with an Amazon
* Redshift cluster.
*
* The following are possible statuses and descriptions.
*
* in-sync
: The role is available for use by the
* cluster.
* adding
: The role is in the process of being
* associated with the cluster.
* removing
: The role is in the process of being
* disassociated with the cluster.
*
*/
public String getApplyStatus() {
return this.applyStatus;
}
/**
*
* Describes the status of the IAM role's association with an Amazon
* Redshift cluster.
*
*
* The following are possible statuses and descriptions.
*
* in-sync
: The role is available for use by the cluster.
* adding
: The role is in the process of being associated
* with the cluster.
* removing
: The role is in the process of being
* disassociated with the cluster.
*
*
*
* @param applyStatus
* Describes the status of the IAM role's association with an Amazon
* Redshift cluster.
*
* The following are possible statuses and descriptions.
*
* in-sync
: The role is available for use by the
* cluster.
* adding
: The role is in the process of being
* associated with the cluster.
* removing
: The role is in the process of being
* disassociated with the cluster.
*
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ClusterIamRole withApplyStatus(String applyStatus) {
setApplyStatus(applyStatus);
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getIamRoleArn() != null)
sb.append("IamRoleArn: " + getIamRoleArn() + ",");
if (getApplyStatus() != null)
sb.append("ApplyStatus: " + getApplyStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ClusterIamRole == false)
return false;
ClusterIamRole other = (ClusterIamRole) obj;
if (other.getIamRoleArn() == null ^ this.getIamRoleArn() == null)
return false;
if (other.getIamRoleArn() != null
&& other.getIamRoleArn().equals(this.getIamRoleArn()) == false)
return false;
if (other.getApplyStatus() == null ^ this.getApplyStatus() == null)
return false;
if (other.getApplyStatus() != null
&& other.getApplyStatus().equals(this.getApplyStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getIamRoleArn() == null) ? 0 : getIamRoleArn().hashCode());
hashCode = prime
* hashCode
+ ((getApplyStatus() == null) ? 0 : getApplyStatus().hashCode());
return hashCode;
}
@Override
public ClusterIamRole clone() {
try {
return (ClusterIamRole) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(
"Got a CloneNotSupportedException from Object.clone() "
+ "even though we're Cloneable!", e);
}
}
}