
com.amazonaws.services.kafka.model.BatchAssociateScramSecretRequest Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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.kafka.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Associates sasl scram secrets to cluster.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class BatchAssociateScramSecretRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the cluster to be updated.
*
*/
private String clusterArn;
/**
*
* List of AWS Secrets Manager secret ARNs.
*
*/
private java.util.List secretArnList;
/**
*
* The Amazon Resource Name (ARN) of the cluster to be updated.
*
*
* @param clusterArn
*
* The Amazon Resource Name (ARN) of the cluster to be updated.
*
*/
public void setClusterArn(String clusterArn) {
this.clusterArn = clusterArn;
}
/**
*
* The Amazon Resource Name (ARN) of the cluster to be updated.
*
*
* @return
* The Amazon Resource Name (ARN) of the cluster to be updated.
*
*/
public String getClusterArn() {
return this.clusterArn;
}
/**
*
* The Amazon Resource Name (ARN) of the cluster to be updated.
*
*
* @param clusterArn
*
* The Amazon Resource Name (ARN) of the cluster to be updated.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchAssociateScramSecretRequest withClusterArn(String clusterArn) {
setClusterArn(clusterArn);
return this;
}
/**
*
* List of AWS Secrets Manager secret ARNs.
*
*
* @return
* List of AWS Secrets Manager secret ARNs.
*
*/
public java.util.List getSecretArnList() {
return secretArnList;
}
/**
*
* List of AWS Secrets Manager secret ARNs.
*
*
* @param secretArnList
*
* List of AWS Secrets Manager secret ARNs.
*
*/
public void setSecretArnList(java.util.Collection secretArnList) {
if (secretArnList == null) {
this.secretArnList = null;
return;
}
this.secretArnList = new java.util.ArrayList(secretArnList);
}
/**
*
* List of AWS Secrets Manager secret ARNs.
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSecretArnList(java.util.Collection)} or {@link #withSecretArnList(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param secretArnList
*
* List of AWS Secrets Manager secret ARNs.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchAssociateScramSecretRequest withSecretArnList(String... secretArnList) {
if (this.secretArnList == null) {
setSecretArnList(new java.util.ArrayList(secretArnList.length));
}
for (String ele : secretArnList) {
this.secretArnList.add(ele);
}
return this;
}
/**
*
* List of AWS Secrets Manager secret ARNs.
*
*
* @param secretArnList
*
* List of AWS Secrets Manager secret ARNs.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchAssociateScramSecretRequest withSecretArnList(java.util.Collection secretArnList) {
setSecretArnList(secretArnList);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getClusterArn() != null)
sb.append("ClusterArn: ").append(getClusterArn()).append(",");
if (getSecretArnList() != null)
sb.append("SecretArnList: ").append(getSecretArnList());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof BatchAssociateScramSecretRequest == false)
return false;
BatchAssociateScramSecretRequest other = (BatchAssociateScramSecretRequest) obj;
if (other.getClusterArn() == null ^ this.getClusterArn() == null)
return false;
if (other.getClusterArn() != null && other.getClusterArn().equals(this.getClusterArn()) == false)
return false;
if (other.getSecretArnList() == null ^ this.getSecretArnList() == null)
return false;
if (other.getSecretArnList() != null && other.getSecretArnList().equals(this.getSecretArnList()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getClusterArn() == null) ? 0 : getClusterArn().hashCode());
hashCode = prime * hashCode + ((getSecretArnList() == null) ? 0 : getSecretArnList().hashCode());
return hashCode;
}
@Override
public BatchAssociateScramSecretRequest clone() {
return (BatchAssociateScramSecretRequest) super.clone();
}
}