com.amazonaws.services.workspacesweb.model.CreateTrustStoreRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-workspacesweb Show documentation
/*
* 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.workspacesweb.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateTrustStoreRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A list of CA certificates to be added to the trust store.
*
*/
private java.util.List certificateList;
/**
*
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency
* ensures that an API request completes only once. With an idempotent request, if the original request completes
* successfully, subsequent retries with the same client token returns the result from the original successful
* request.
*
*
* If you do not specify a client token, one is automatically generated by the AWS SDK.
*
*/
private String clientToken;
/**
*
* The tags to add to the trust store. A tag is a key-value pair.
*
*/
private java.util.List tags;
/**
*
* A list of CA certificates to be added to the trust store.
*
*
* @return A list of CA certificates to be added to the trust store.
*/
public java.util.List getCertificateList() {
return certificateList;
}
/**
*
* A list of CA certificates to be added to the trust store.
*
*
* @param certificateList
* A list of CA certificates to be added to the trust store.
*/
public void setCertificateList(java.util.Collection certificateList) {
if (certificateList == null) {
this.certificateList = null;
return;
}
this.certificateList = new java.util.ArrayList(certificateList);
}
/**
*
* A list of CA certificates to be added to the trust store.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCertificateList(java.util.Collection)} or {@link #withCertificateList(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param certificateList
* A list of CA certificates to be added to the trust store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTrustStoreRequest withCertificateList(java.nio.ByteBuffer... certificateList) {
if (this.certificateList == null) {
setCertificateList(new java.util.ArrayList(certificateList.length));
}
for (java.nio.ByteBuffer ele : certificateList) {
this.certificateList.add(ele);
}
return this;
}
/**
*
* A list of CA certificates to be added to the trust store.
*
*
* @param certificateList
* A list of CA certificates to be added to the trust store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTrustStoreRequest withCertificateList(java.util.Collection certificateList) {
setCertificateList(certificateList);
return this;
}
/**
*
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency
* ensures that an API request completes only once. With an idempotent request, if the original request completes
* successfully, subsequent retries with the same client token returns the result from the original successful
* request.
*
*
* If you do not specify a client token, one is automatically generated by the AWS SDK.
*
*
* @param clientToken
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency
* ensures that an API request completes only once. With an idempotent request, if the original request
* completes successfully, subsequent retries with the same client token returns the result from the original
* successful request.
*
* If you do not specify a client token, one is automatically generated by the AWS SDK.
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
*
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency
* ensures that an API request completes only once. With an idempotent request, if the original request completes
* successfully, subsequent retries with the same client token returns the result from the original successful
* request.
*
*
* If you do not specify a client token, one is automatically generated by the AWS SDK.
*
*
* @return A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
* Idempotency ensures that an API request completes only once. With an idempotent request, if the original
* request completes successfully, subsequent retries with the same client token returns the result from the
* original successful request.
*
* If you do not specify a client token, one is automatically generated by the AWS SDK.
*/
public String getClientToken() {
return this.clientToken;
}
/**
*
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency
* ensures that an API request completes only once. With an idempotent request, if the original request completes
* successfully, subsequent retries with the same client token returns the result from the original successful
* request.
*
*
* If you do not specify a client token, one is automatically generated by the AWS SDK.
*
*
* @param clientToken
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency
* ensures that an API request completes only once. With an idempotent request, if the original request
* completes successfully, subsequent retries with the same client token returns the result from the original
* successful request.
*
* If you do not specify a client token, one is automatically generated by the AWS SDK.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTrustStoreRequest withClientToken(String clientToken) {
setClientToken(clientToken);
return this;
}
/**
*
* The tags to add to the trust store. A tag is a key-value pair.
*
*
* @return The tags to add to the trust store. A tag is a key-value pair.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* The tags to add to the trust store. A tag is a key-value pair.
*
*
* @param tags
* The tags to add to the trust store. A tag is a key-value pair.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* The tags to add to the trust store. A tag is a key-value pair.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* The tags to add to the trust store. A tag is a key-value pair.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTrustStoreRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* The tags to add to the trust store. A tag is a key-value pair.
*
*
* @param tags
* The tags to add to the trust store. A tag is a key-value pair.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTrustStoreRequest withTags(java.util.Collection tags) {
setTags(tags);
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 (getCertificateList() != null)
sb.append("CertificateList: ").append(getCertificateList()).append(",");
if (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken()).append(",");
if (getTags() != null)
sb.append("Tags: ").append("***Sensitive Data Redacted***");
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateTrustStoreRequest == false)
return false;
CreateTrustStoreRequest other = (CreateTrustStoreRequest) obj;
if (other.getCertificateList() == null ^ this.getCertificateList() == null)
return false;
if (other.getCertificateList() != null && other.getCertificateList().equals(this.getCertificateList()) == false)
return false;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCertificateList() == null) ? 0 : getCertificateList().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateTrustStoreRequest clone() {
return (CreateTrustStoreRequest) super.clone();
}
}