/* * 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.paymentcryptography.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 ImportKeyRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Specifies whether import key is enabled. *
*/ private Boolean enabled; /** ** The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV) for DES * and AES keys. *
** For DES key, the KCV is computed by encrypting 8 bytes, each with value '00', with the key to be checked and * retaining the 3 highest order bytes of the encrypted result. For AES key, the KCV is computed by encrypting 8 * bytes, each with value '01', with the key to be checked and retaining the 3 highest order bytes of the encrypted * result. *
*/ private String keyCheckValueAlgorithm; /** ** The key or public key certificate type to use during key material import, for example TR-34 or * RootCertificatePublicKey. *
*/ private ImportKeyMaterial keyMaterial; /** ** The tags to attach to the key. Each tag consists of a tag key and a tag value. Both the tag key and the tag value * are required, but the tag value can be an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key. *
** You can't have more than one tag on an Amazon Web Services Payment Cryptography key with the same tag key. If you * specify an existing tag key with a different tag value, Amazon Web Services Payment Cryptography replaces the * current tag value with the specified one. *
*
* To use this parameter, you must have TagResource
permission.
*
* Don't include confidential or sensitive information in this field. This field may be displayed in plaintext in * CloudTrail logs and other output. *
** Tagging or untagging an Amazon Web Services Payment Cryptography key can allow or deny permission to the key. *
** Specifies whether import key is enabled. *
* * @param enabled * Specifies whether import key is enabled. */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } /** ** Specifies whether import key is enabled. *
* * @return Specifies whether import key is enabled. */ public Boolean getEnabled() { return this.enabled; } /** ** Specifies whether import key is enabled. *
* * @param enabled * Specifies whether import key is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportKeyRequest withEnabled(Boolean enabled) { setEnabled(enabled); return this; } /** ** Specifies whether import key is enabled. *
* * @return Specifies whether import key is enabled. */ public Boolean isEnabled() { return this.enabled; } /** ** The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV) for DES * and AES keys. *
** For DES key, the KCV is computed by encrypting 8 bytes, each with value '00', with the key to be checked and * retaining the 3 highest order bytes of the encrypted result. For AES key, the KCV is computed by encrypting 8 * bytes, each with value '01', with the key to be checked and retaining the 3 highest order bytes of the encrypted * result. *
* * @param keyCheckValueAlgorithm * The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV) * for DES and AES keys. ** For DES key, the KCV is computed by encrypting 8 bytes, each with value '00', with the key to be checked * and retaining the 3 highest order bytes of the encrypted result. For AES key, the KCV is computed by * encrypting 8 bytes, each with value '01', with the key to be checked and retaining the 3 highest order * bytes of the encrypted result. * @see KeyCheckValueAlgorithm */ public void setKeyCheckValueAlgorithm(String keyCheckValueAlgorithm) { this.keyCheckValueAlgorithm = keyCheckValueAlgorithm; } /** *
* The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV) for DES * and AES keys. *
** For DES key, the KCV is computed by encrypting 8 bytes, each with value '00', with the key to be checked and * retaining the 3 highest order bytes of the encrypted result. For AES key, the KCV is computed by encrypting 8 * bytes, each with value '01', with the key to be checked and retaining the 3 highest order bytes of the encrypted * result. *
* * @return The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV) * for DES and AES keys. ** For DES key, the KCV is computed by encrypting 8 bytes, each with value '00', with the key to be checked * and retaining the 3 highest order bytes of the encrypted result. For AES key, the KCV is computed by * encrypting 8 bytes, each with value '01', with the key to be checked and retaining the 3 highest order * bytes of the encrypted result. * @see KeyCheckValueAlgorithm */ public String getKeyCheckValueAlgorithm() { return this.keyCheckValueAlgorithm; } /** *
* The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV) for DES * and AES keys. *
** For DES key, the KCV is computed by encrypting 8 bytes, each with value '00', with the key to be checked and * retaining the 3 highest order bytes of the encrypted result. For AES key, the KCV is computed by encrypting 8 * bytes, each with value '01', with the key to be checked and retaining the 3 highest order bytes of the encrypted * result. *
* * @param keyCheckValueAlgorithm * The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV) * for DES and AES keys. ** For DES key, the KCV is computed by encrypting 8 bytes, each with value '00', with the key to be checked * and retaining the 3 highest order bytes of the encrypted result. For AES key, the KCV is computed by * encrypting 8 bytes, each with value '01', with the key to be checked and retaining the 3 highest order * bytes of the encrypted result. * @return Returns a reference to this object so that method calls can be chained together. * @see KeyCheckValueAlgorithm */ public ImportKeyRequest withKeyCheckValueAlgorithm(String keyCheckValueAlgorithm) { setKeyCheckValueAlgorithm(keyCheckValueAlgorithm); return this; } /** *
* The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV) for DES * and AES keys. *
** For DES key, the KCV is computed by encrypting 8 bytes, each with value '00', with the key to be checked and * retaining the 3 highest order bytes of the encrypted result. For AES key, the KCV is computed by encrypting 8 * bytes, each with value '01', with the key to be checked and retaining the 3 highest order bytes of the encrypted * result. *
* * @param keyCheckValueAlgorithm * The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV) * for DES and AES keys. ** For DES key, the KCV is computed by encrypting 8 bytes, each with value '00', with the key to be checked * and retaining the 3 highest order bytes of the encrypted result. For AES key, the KCV is computed by * encrypting 8 bytes, each with value '01', with the key to be checked and retaining the 3 highest order * bytes of the encrypted result. * @return Returns a reference to this object so that method calls can be chained together. * @see KeyCheckValueAlgorithm */ public ImportKeyRequest withKeyCheckValueAlgorithm(KeyCheckValueAlgorithm keyCheckValueAlgorithm) { this.keyCheckValueAlgorithm = keyCheckValueAlgorithm.toString(); return this; } /** *
* The key or public key certificate type to use during key material import, for example TR-34 or * RootCertificatePublicKey. *
* * @param keyMaterial * The key or public key certificate type to use during key material import, for example TR-34 or * RootCertificatePublicKey. */ public void setKeyMaterial(ImportKeyMaterial keyMaterial) { this.keyMaterial = keyMaterial; } /** ** The key or public key certificate type to use during key material import, for example TR-34 or * RootCertificatePublicKey. *
* * @return The key or public key certificate type to use during key material import, for example TR-34 or * RootCertificatePublicKey. */ public ImportKeyMaterial getKeyMaterial() { return this.keyMaterial; } /** ** The key or public key certificate type to use during key material import, for example TR-34 or * RootCertificatePublicKey. *
* * @param keyMaterial * The key or public key certificate type to use during key material import, for example TR-34 or * RootCertificatePublicKey. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportKeyRequest withKeyMaterial(ImportKeyMaterial keyMaterial) { setKeyMaterial(keyMaterial); return this; } /** ** The tags to attach to the key. Each tag consists of a tag key and a tag value. Both the tag key and the tag value * are required, but the tag value can be an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key. *
** You can't have more than one tag on an Amazon Web Services Payment Cryptography key with the same tag key. If you * specify an existing tag key with a different tag value, Amazon Web Services Payment Cryptography replaces the * current tag value with the specified one. *
*
* To use this parameter, you must have TagResource
permission.
*
* Don't include confidential or sensitive information in this field. This field may be displayed in plaintext in * CloudTrail logs and other output. *
** Tagging or untagging an Amazon Web Services Payment Cryptography key can allow or deny permission to the key. *
** You can't have more than one tag on an Amazon Web Services Payment Cryptography key with the same tag * key. If you specify an existing tag key with a different tag value, Amazon Web Services Payment * Cryptography replaces the current tag value with the specified one. *
*
* To use this parameter, you must have TagResource
permission.
*
* Don't include confidential or sensitive information in this field. This field may be displayed in * plaintext in CloudTrail logs and other output. *
** Tagging or untagging an Amazon Web Services Payment Cryptography key can allow or deny permission to the * key. *
*/ public java.util.List* The tags to attach to the key. Each tag consists of a tag key and a tag value. Both the tag key and the tag value * are required, but the tag value can be an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key. *
** You can't have more than one tag on an Amazon Web Services Payment Cryptography key with the same tag key. If you * specify an existing tag key with a different tag value, Amazon Web Services Payment Cryptography replaces the * current tag value with the specified one. *
*
* To use this parameter, you must have TagResource
permission.
*
* Don't include confidential or sensitive information in this field. This field may be displayed in plaintext in * CloudTrail logs and other output. *
** Tagging or untagging an Amazon Web Services Payment Cryptography key can allow or deny permission to the key. *
** You can't have more than one tag on an Amazon Web Services Payment Cryptography key with the same tag key. * If you specify an existing tag key with a different tag value, Amazon Web Services Payment Cryptography * replaces the current tag value with the specified one. *
*
* To use this parameter, you must have TagResource
permission.
*
* Don't include confidential or sensitive information in this field. This field may be displayed in * plaintext in CloudTrail logs and other output. *
** Tagging or untagging an Amazon Web Services Payment Cryptography key can allow or deny permission to the * key. *
*/ public void setTags(java.util.Collection* The tags to attach to the key. Each tag consists of a tag key and a tag value. Both the tag key and the tag value * are required, but the tag value can be an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key. *
** You can't have more than one tag on an Amazon Web Services Payment Cryptography key with the same tag key. If you * specify an existing tag key with a different tag value, Amazon Web Services Payment Cryptography replaces the * current tag value with the specified one. *
*
* To use this parameter, you must have TagResource
permission.
*
* Don't include confidential or sensitive information in this field. This field may be displayed in plaintext in * CloudTrail logs and other output. *
** Tagging or untagging an Amazon Web Services Payment Cryptography key can allow or deny permission to the key. *
** 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 attach to the key. Each tag consists of a tag key and a tag value. Both the tag key and the * tag value are required, but the tag value can be an empty (null) string. You can't have more than one tag * on an Amazon Web Services Payment Cryptography key with the same tag key. ** You can't have more than one tag on an Amazon Web Services Payment Cryptography key with the same tag key. * If you specify an existing tag key with a different tag value, Amazon Web Services Payment Cryptography * replaces the current tag value with the specified one. *
*
* To use this parameter, you must have TagResource
permission.
*
* Don't include confidential or sensitive information in this field. This field may be displayed in * plaintext in CloudTrail logs and other output. *
** Tagging or untagging an Amazon Web Services Payment Cryptography key can allow or deny permission to the * key. *
* @return Returns a reference to this object so that method calls can be chained together. */ public ImportKeyRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* The tags to attach to the key. Each tag consists of a tag key and a tag value. Both the tag key and the tag value * are required, but the tag value can be an empty (null) string. You can't have more than one tag on an Amazon Web * Services Payment Cryptography key with the same tag key. *
** You can't have more than one tag on an Amazon Web Services Payment Cryptography key with the same tag key. If you * specify an existing tag key with a different tag value, Amazon Web Services Payment Cryptography replaces the * current tag value with the specified one. *
*
* To use this parameter, you must have TagResource
permission.
*
* Don't include confidential or sensitive information in this field. This field may be displayed in plaintext in * CloudTrail logs and other output. *
** Tagging or untagging an Amazon Web Services Payment Cryptography key can allow or deny permission to the key. *
** You can't have more than one tag on an Amazon Web Services Payment Cryptography key with the same tag key. * If you specify an existing tag key with a different tag value, Amazon Web Services Payment Cryptography * replaces the current tag value with the specified one. *
*
* To use this parameter, you must have TagResource
permission.
*
* Don't include confidential or sensitive information in this field. This field may be displayed in * plaintext in CloudTrail logs and other output. *
** Tagging or untagging an Amazon Web Services Payment Cryptography key can allow or deny permission to the * key. *
* @return Returns a reference to this object so that method calls can be chained together. */ public ImportKeyRequest withTags(java.util.Collection