All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.redshift.model.ModifyClusterIamRolesRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Redshift module holds the client classes that are used for communicating with Amazon Redshift Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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;
import com.amazonaws.AmazonWebServiceRequest;

/**
 * 

*/ public class ModifyClusterIamRolesRequest extends AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The unique identifier of the cluster for which you want to associate or * disassociate IAM roles. *

*/ private String clusterIdentifier; /** *

* Zero or more IAM roles (in their ARN format) to associate with the * cluster. You can associate up to 10 IAM roles with a single cluster in a * single request. *

*/ private com.amazonaws.internal.SdkInternalList addIamRoles; /** *

* Zero or more IAM roles (in their ARN format) to disassociate from the * cluster. You can disassociate up to 10 IAM roles from a single cluster in * a single request. *

*/ private com.amazonaws.internal.SdkInternalList removeIamRoles; /** *

* The unique identifier of the cluster for which you want to associate or * disassociate IAM roles. *

* * @param clusterIdentifier * The unique identifier of the cluster for which you want to * associate or disassociate IAM roles. */ public void setClusterIdentifier(String clusterIdentifier) { this.clusterIdentifier = clusterIdentifier; } /** *

* The unique identifier of the cluster for which you want to associate or * disassociate IAM roles. *

* * @return The unique identifier of the cluster for which you want to * associate or disassociate IAM roles. */ public String getClusterIdentifier() { return this.clusterIdentifier; } /** *

* The unique identifier of the cluster for which you want to associate or * disassociate IAM roles. *

* * @param clusterIdentifier * The unique identifier of the cluster for which you want to * associate or disassociate IAM roles. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyClusterIamRolesRequest withClusterIdentifier( String clusterIdentifier) { setClusterIdentifier(clusterIdentifier); return this; } /** *

* Zero or more IAM roles (in their ARN format) to associate with the * cluster. You can associate up to 10 IAM roles with a single cluster in a * single request. *

* * @return Zero or more IAM roles (in their ARN format) to associate with * the cluster. You can associate up to 10 IAM roles with a single * cluster in a single request. */ public java.util.List getAddIamRoles() { if (addIamRoles == null) { addIamRoles = new com.amazonaws.internal.SdkInternalList(); } return addIamRoles; } /** *

* Zero or more IAM roles (in their ARN format) to associate with the * cluster. You can associate up to 10 IAM roles with a single cluster in a * single request. *

* * @param addIamRoles * Zero or more IAM roles (in their ARN format) to associate with the * cluster. You can associate up to 10 IAM roles with a single * cluster in a single request. */ public void setAddIamRoles(java.util.Collection addIamRoles) { if (addIamRoles == null) { this.addIamRoles = null; return; } this.addIamRoles = new com.amazonaws.internal.SdkInternalList( addIamRoles); } /** *

* Zero or more IAM roles (in their ARN format) to associate with the * cluster. You can associate up to 10 IAM roles with a single cluster in a * single request. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setAddIamRoles(java.util.Collection)} or * {@link #withAddIamRoles(java.util.Collection)} if you want to override * the existing values. *

* * @param addIamRoles * Zero or more IAM roles (in their ARN format) to associate with the * cluster. You can associate up to 10 IAM roles with a single * cluster in a single request. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyClusterIamRolesRequest withAddIamRoles(String... addIamRoles) { if (this.addIamRoles == null) { setAddIamRoles(new com.amazonaws.internal.SdkInternalList( addIamRoles.length)); } for (String ele : addIamRoles) { this.addIamRoles.add(ele); } return this; } /** *

* Zero or more IAM roles (in their ARN format) to associate with the * cluster. You can associate up to 10 IAM roles with a single cluster in a * single request. *

* * @param addIamRoles * Zero or more IAM roles (in their ARN format) to associate with the * cluster. You can associate up to 10 IAM roles with a single * cluster in a single request. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyClusterIamRolesRequest withAddIamRoles( java.util.Collection addIamRoles) { setAddIamRoles(addIamRoles); return this; } /** *

* Zero or more IAM roles (in their ARN format) to disassociate from the * cluster. You can disassociate up to 10 IAM roles from a single cluster in * a single request. *

* * @return Zero or more IAM roles (in their ARN format) to disassociate from * the cluster. You can disassociate up to 10 IAM roles from a * single cluster in a single request. */ public java.util.List getRemoveIamRoles() { if (removeIamRoles == null) { removeIamRoles = new com.amazonaws.internal.SdkInternalList(); } return removeIamRoles; } /** *

* Zero or more IAM roles (in their ARN format) to disassociate from the * cluster. You can disassociate up to 10 IAM roles from a single cluster in * a single request. *

* * @param removeIamRoles * Zero or more IAM roles (in their ARN format) to disassociate from * the cluster. You can disassociate up to 10 IAM roles from a single * cluster in a single request. */ public void setRemoveIamRoles(java.util.Collection removeIamRoles) { if (removeIamRoles == null) { this.removeIamRoles = null; return; } this.removeIamRoles = new com.amazonaws.internal.SdkInternalList( removeIamRoles); } /** *

* Zero or more IAM roles (in their ARN format) to disassociate from the * cluster. You can disassociate up to 10 IAM roles from a single cluster in * a single request. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setRemoveIamRoles(java.util.Collection)} or * {@link #withRemoveIamRoles(java.util.Collection)} if you want to override * the existing values. *

* * @param removeIamRoles * Zero or more IAM roles (in their ARN format) to disassociate from * the cluster. You can disassociate up to 10 IAM roles from a single * cluster in a single request. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyClusterIamRolesRequest withRemoveIamRoles( String... removeIamRoles) { if (this.removeIamRoles == null) { setRemoveIamRoles(new com.amazonaws.internal.SdkInternalList( removeIamRoles.length)); } for (String ele : removeIamRoles) { this.removeIamRoles.add(ele); } return this; } /** *

* Zero or more IAM roles (in their ARN format) to disassociate from the * cluster. You can disassociate up to 10 IAM roles from a single cluster in * a single request. *

* * @param removeIamRoles * Zero or more IAM roles (in their ARN format) to disassociate from * the cluster. You can disassociate up to 10 IAM roles from a single * cluster in a single request. * @return Returns a reference to this object so that method calls can be * chained together. */ public ModifyClusterIamRolesRequest withRemoveIamRoles( java.util.Collection removeIamRoles) { setRemoveIamRoles(removeIamRoles); 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 (getClusterIdentifier() != null) sb.append("ClusterIdentifier: " + getClusterIdentifier() + ","); if (getAddIamRoles() != null) sb.append("AddIamRoles: " + getAddIamRoles() + ","); if (getRemoveIamRoles() != null) sb.append("RemoveIamRoles: " + getRemoveIamRoles()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ModifyClusterIamRolesRequest == false) return false; ModifyClusterIamRolesRequest other = (ModifyClusterIamRolesRequest) obj; if (other.getClusterIdentifier() == null ^ this.getClusterIdentifier() == null) return false; if (other.getClusterIdentifier() != null && other.getClusterIdentifier().equals( this.getClusterIdentifier()) == false) return false; if (other.getAddIamRoles() == null ^ this.getAddIamRoles() == null) return false; if (other.getAddIamRoles() != null && other.getAddIamRoles().equals(this.getAddIamRoles()) == false) return false; if (other.getRemoveIamRoles() == null ^ this.getRemoveIamRoles() == null) return false; if (other.getRemoveIamRoles() != null && other.getRemoveIamRoles().equals(this.getRemoveIamRoles()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterIdentifier() == null) ? 0 : getClusterIdentifier().hashCode()); hashCode = prime * hashCode + ((getAddIamRoles() == null) ? 0 : getAddIamRoles().hashCode()); hashCode = prime * hashCode + ((getRemoveIamRoles() == null) ? 0 : getRemoveIamRoles() .hashCode()); return hashCode; } @Override public ModifyClusterIamRolesRequest clone() { return (ModifyClusterIamRolesRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy