com.amazonaws.services.workspacesweb.model.UpdateTrustStoreRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-workspacesweb Show documentation
/*
* Copyright 2017-2022 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 UpdateTrustStoreRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A list of CA certificates to add to the trust store.
*
*/
private java.util.List certificatesToAdd;
/**
*
* A list of CA certificates to delete from a trust store.
*
*/
private java.util.List certificatesToDelete;
/**
*
* 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 return 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 ARN of the trust store.
*
*/
private String trustStoreArn;
/**
*
* A list of CA certificates to add to the trust store.
*
*
* @return A list of CA certificates to add to the trust store.
*/
public java.util.List getCertificatesToAdd() {
return certificatesToAdd;
}
/**
*
* A list of CA certificates to add to the trust store.
*
*
* @param certificatesToAdd
* A list of CA certificates to add to the trust store.
*/
public void setCertificatesToAdd(java.util.Collection certificatesToAdd) {
if (certificatesToAdd == null) {
this.certificatesToAdd = null;
return;
}
this.certificatesToAdd = new java.util.ArrayList(certificatesToAdd);
}
/**
*
* A list of CA certificates to add to the trust store.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCertificatesToAdd(java.util.Collection)} or {@link #withCertificatesToAdd(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param certificatesToAdd
* A list of CA certificates to add to the trust store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrustStoreRequest withCertificatesToAdd(java.nio.ByteBuffer... certificatesToAdd) {
if (this.certificatesToAdd == null) {
setCertificatesToAdd(new java.util.ArrayList(certificatesToAdd.length));
}
for (java.nio.ByteBuffer ele : certificatesToAdd) {
this.certificatesToAdd.add(ele);
}
return this;
}
/**
*
* A list of CA certificates to add to the trust store.
*
*
* @param certificatesToAdd
* A list of CA certificates to add to the trust store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrustStoreRequest withCertificatesToAdd(java.util.Collection certificatesToAdd) {
setCertificatesToAdd(certificatesToAdd);
return this;
}
/**
*
* A list of CA certificates to delete from a trust store.
*
*
* @return A list of CA certificates to delete from a trust store.
*/
public java.util.List getCertificatesToDelete() {
return certificatesToDelete;
}
/**
*
* A list of CA certificates to delete from a trust store.
*
*
* @param certificatesToDelete
* A list of CA certificates to delete from a trust store.
*/
public void setCertificatesToDelete(java.util.Collection certificatesToDelete) {
if (certificatesToDelete == null) {
this.certificatesToDelete = null;
return;
}
this.certificatesToDelete = new java.util.ArrayList(certificatesToDelete);
}
/**
*
* A list of CA certificates to delete from a trust store.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCertificatesToDelete(java.util.Collection)} or {@link #withCertificatesToDelete(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param certificatesToDelete
* A list of CA certificates to delete from a trust store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrustStoreRequest withCertificatesToDelete(String... certificatesToDelete) {
if (this.certificatesToDelete == null) {
setCertificatesToDelete(new java.util.ArrayList(certificatesToDelete.length));
}
for (String ele : certificatesToDelete) {
this.certificatesToDelete.add(ele);
}
return this;
}
/**
*
* A list of CA certificates to delete from a trust store.
*
*
* @param certificatesToDelete
* A list of CA certificates to delete from a trust store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrustStoreRequest withCertificatesToDelete(java.util.Collection certificatesToDelete) {
setCertificatesToDelete(certificatesToDelete);
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 return 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 return 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 return 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 return 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 return 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 return 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 UpdateTrustStoreRequest withClientToken(String clientToken) {
setClientToken(clientToken);
return this;
}
/**
*
* The ARN of the trust store.
*
*
* @param trustStoreArn
* The ARN of the trust store.
*/
public void setTrustStoreArn(String trustStoreArn) {
this.trustStoreArn = trustStoreArn;
}
/**
*
* The ARN of the trust store.
*
*
* @return The ARN of the trust store.
*/
public String getTrustStoreArn() {
return this.trustStoreArn;
}
/**
*
* The ARN of the trust store.
*
*
* @param trustStoreArn
* The ARN of the trust store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrustStoreRequest withTrustStoreArn(String trustStoreArn) {
setTrustStoreArn(trustStoreArn);
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 (getCertificatesToAdd() != null)
sb.append("CertificatesToAdd: ").append(getCertificatesToAdd()).append(",");
if (getCertificatesToDelete() != null)
sb.append("CertificatesToDelete: ").append(getCertificatesToDelete()).append(",");
if (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken()).append(",");
if (getTrustStoreArn() != null)
sb.append("TrustStoreArn: ").append(getTrustStoreArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateTrustStoreRequest == false)
return false;
UpdateTrustStoreRequest other = (UpdateTrustStoreRequest) obj;
if (other.getCertificatesToAdd() == null ^ this.getCertificatesToAdd() == null)
return false;
if (other.getCertificatesToAdd() != null && other.getCertificatesToAdd().equals(this.getCertificatesToAdd()) == false)
return false;
if (other.getCertificatesToDelete() == null ^ this.getCertificatesToDelete() == null)
return false;
if (other.getCertificatesToDelete() != null && other.getCertificatesToDelete().equals(this.getCertificatesToDelete()) == 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.getTrustStoreArn() == null ^ this.getTrustStoreArn() == null)
return false;
if (other.getTrustStoreArn() != null && other.getTrustStoreArn().equals(this.getTrustStoreArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCertificatesToAdd() == null) ? 0 : getCertificatesToAdd().hashCode());
hashCode = prime * hashCode + ((getCertificatesToDelete() == null) ? 0 : getCertificatesToDelete().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getTrustStoreArn() == null) ? 0 : getTrustStoreArn().hashCode());
return hashCode;
}
@Override
public UpdateTrustStoreRequest clone() {
return (UpdateTrustStoreRequest) super.clone();
}
}