/* * Copyright 2018-2023 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.certificatemanager.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 ImportCertificateRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The Amazon Resource Name * (ARN) of an imported certificate to replace. To import a new certificate, omit this field. *
*/ private String certificateArn; /** ** The certificate to import. *
*/ private java.nio.ByteBuffer certificate; /** ** The private key that matches the public key in the certificate. *
*/ private java.nio.ByteBuffer privateKey; /** ** The PEM encoded certificate chain. *
*/ private java.nio.ByteBuffer certificateChain; /** ** One or more resource tags to associate with the imported certificate. *
** Note: You cannot apply tags when reimporting a certificate. *
*/ private java.util.List* The Amazon Resource Name * (ARN) of an imported certificate to replace. To import a new certificate, omit this field. *
* * @param certificateArn * The Amazon Resource * Name (ARN) of an imported certificate to replace. To import a new certificate, omit this field. */ public void setCertificateArn(String certificateArn) { this.certificateArn = certificateArn; } /** ** The Amazon Resource Name * (ARN) of an imported certificate to replace. To import a new certificate, omit this field. *
* * @return The Amazon Resource * Name (ARN) of an imported certificate to replace. To import a new certificate, omit this field. */ public String getCertificateArn() { return this.certificateArn; } /** ** The Amazon Resource Name * (ARN) of an imported certificate to replace. To import a new certificate, omit this field. *
* * @param certificateArn * The Amazon Resource * Name (ARN) of an imported certificate to replace. To import a new certificate, omit this field. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportCertificateRequest withCertificateArn(String certificateArn) { setCertificateArn(certificateArn); return this; } /** ** The certificate to import. *
** The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. * Users of the SDK should not perform Base64 encoding on this field. *
** Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future * major version of the SDK. *
* * @param certificate * The certificate to import. */ public void setCertificate(java.nio.ByteBuffer certificate) { this.certificate = certificate; } /** ** The certificate to import. *
** {@code ByteBuffer}s are stateful. Calling their {@code get} methods changes their {@code position}. We recommend * using {@link java.nio.ByteBuffer#asReadOnlyBuffer()} to create a read-only view of the buffer with an independent * {@code position}, and calling {@code get} methods on this rather than directly on the returned {@code ByteBuffer}. * Doing so will ensure that anyone else using the {@code ByteBuffer} will not be affected by changes to the * {@code position}. *
* * @return The certificate to import. */ public java.nio.ByteBuffer getCertificate() { return this.certificate; } /** ** The certificate to import. *
** The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. * Users of the SDK should not perform Base64 encoding on this field. *
** Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future * major version of the SDK. *
* * @param certificate * The certificate to import. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportCertificateRequest withCertificate(java.nio.ByteBuffer certificate) { setCertificate(certificate); return this; } /** ** The private key that matches the public key in the certificate. *
** The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. * Users of the SDK should not perform Base64 encoding on this field. *
** Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future * major version of the SDK. *
* * @param privateKey * The private key that matches the public key in the certificate. */ public void setPrivateKey(java.nio.ByteBuffer privateKey) { this.privateKey = privateKey; } /** ** The private key that matches the public key in the certificate. *
** {@code ByteBuffer}s are stateful. Calling their {@code get} methods changes their {@code position}. We recommend * using {@link java.nio.ByteBuffer#asReadOnlyBuffer()} to create a read-only view of the buffer with an independent * {@code position}, and calling {@code get} methods on this rather than directly on the returned {@code ByteBuffer}. * Doing so will ensure that anyone else using the {@code ByteBuffer} will not be affected by changes to the * {@code position}. *
* * @return The private key that matches the public key in the certificate. */ public java.nio.ByteBuffer getPrivateKey() { return this.privateKey; } /** ** The private key that matches the public key in the certificate. *
** The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. * Users of the SDK should not perform Base64 encoding on this field. *
** Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future * major version of the SDK. *
* * @param privateKey * The private key that matches the public key in the certificate. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportCertificateRequest withPrivateKey(java.nio.ByteBuffer privateKey) { setPrivateKey(privateKey); return this; } /** ** The PEM encoded certificate chain. *
** The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. * Users of the SDK should not perform Base64 encoding on this field. *
** Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future * major version of the SDK. *
* * @param certificateChain * The PEM encoded certificate chain. */ public void setCertificateChain(java.nio.ByteBuffer certificateChain) { this.certificateChain = certificateChain; } /** ** The PEM encoded certificate chain. *
** {@code ByteBuffer}s are stateful. Calling their {@code get} methods changes their {@code position}. We recommend * using {@link java.nio.ByteBuffer#asReadOnlyBuffer()} to create a read-only view of the buffer with an independent * {@code position}, and calling {@code get} methods on this rather than directly on the returned {@code ByteBuffer}. * Doing so will ensure that anyone else using the {@code ByteBuffer} will not be affected by changes to the * {@code position}. *
* * @return The PEM encoded certificate chain. */ public java.nio.ByteBuffer getCertificateChain() { return this.certificateChain; } /** ** The PEM encoded certificate chain. *
** The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. * Users of the SDK should not perform Base64 encoding on this field. *
** Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future * major version of the SDK. *
* * @param certificateChain * The PEM encoded certificate chain. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportCertificateRequest withCertificateChain(java.nio.ByteBuffer certificateChain) { setCertificateChain(certificateChain); return this; } /** ** One or more resource tags to associate with the imported certificate. *
** Note: You cannot apply tags when reimporting a certificate. *
* * @return One or more resource tags to associate with the imported certificate. *
* Note: You cannot apply tags when reimporting a certificate.
*/
public java.util.List
* One or more resource tags to associate with the imported certificate.
*
* Note: You cannot apply tags when reimporting a certificate.
*
* Note: You cannot apply tags when reimporting a certificate.
*/
public void setTags(java.util.Collection
* One or more resource tags to associate with the imported certificate.
*
* Note: You cannot apply tags when reimporting a certificate.
*
* 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.
*
* Note: You cannot apply tags when reimporting a certificate.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportCertificateRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList
* One or more resource tags to associate with the imported certificate.
*
* Note: You cannot apply tags when reimporting a certificate.
*
* Note: You cannot apply tags when reimporting a certificate.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportCertificateRequest withTags(java.util.Collection