/* * Copyright 2010-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.kms.model; import java.io.Serializable; /** *
* Describes the configuration of this multi-Region key. This field appears only * when the KMS key is a primary or replica of a multi-Region key. *
** For more information about any listed KMS key, use the DescribeKey * operation. *
*/ public class MultiRegionConfiguration implements Serializable { /** *
* Indicates whether the KMS key is a PRIMARY
or
* REPLICA
key.
*
* Constraints:
* Allowed Values: PRIMARY, REPLICA
*/
private String multiRegionKeyType;
/**
*
* Displays the key ARN and Region of the primary key. This field includes * the current KMS key if it is the primary key. *
*/ private MultiRegionKey primaryKey; /** ** displays the key ARNs and Regions of all replica keys. This field * includes the current KMS key if it is a replica key. *
*/ private java.util.List
* Indicates whether the KMS key is a PRIMARY
or
* REPLICA
key.
*
* Constraints:
* Allowed Values: PRIMARY, REPLICA
*
* @return
* Indicates whether the KMS key is a PRIMARY
or
* REPLICA
key.
*
* Indicates whether the KMS key is a PRIMARY
or
* REPLICA
key.
*
* Constraints:
* Allowed Values: PRIMARY, REPLICA
*
* @param multiRegionKeyType
* Indicates whether the KMS key is a PRIMARY
or
* REPLICA
key.
*
* Indicates whether the KMS key is a PRIMARY
or
* REPLICA
key.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: PRIMARY, REPLICA
*
* @param multiRegionKeyType
* Indicates whether the KMS key is a PRIMARY
or
* REPLICA
key.
*
* Indicates whether the KMS key is a PRIMARY
or
* REPLICA
key.
*
* Constraints:
* Allowed Values: PRIMARY, REPLICA
*
* @param multiRegionKeyType
* Indicates whether the KMS key is a PRIMARY
or
* REPLICA
key.
*
* Indicates whether the KMS key is a PRIMARY
or
* REPLICA
key.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: PRIMARY, REPLICA
*
* @param multiRegionKeyType
* Indicates whether the KMS key is a PRIMARY
or
* REPLICA
key.
*
* Displays the key ARN and Region of the primary key. This field includes * the current KMS key if it is the primary key. *
* * @return* Displays the key ARN and Region of the primary key. This field * includes the current KMS key if it is the primary key. *
*/ public MultiRegionKey getPrimaryKey() { return primaryKey; } /** ** Displays the key ARN and Region of the primary key. This field includes * the current KMS key if it is the primary key. *
* * @param primaryKey* Displays the key ARN and Region of the primary key. This field * includes the current KMS key if it is the primary key. *
*/ public void setPrimaryKey(MultiRegionKey primaryKey) { this.primaryKey = primaryKey; } /** ** Displays the key ARN and Region of the primary key. This field includes * the current KMS key if it is the primary key. *
** Returns a reference to this object so that method calls can be chained * together. * * @param primaryKey
* Displays the key ARN and Region of the primary key. This field * includes the current KMS key if it is the primary key. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MultiRegionConfiguration withPrimaryKey(MultiRegionKey primaryKey) { this.primaryKey = primaryKey; return this; } /** ** displays the key ARNs and Regions of all replica keys. This field * includes the current KMS key if it is a replica key. *
* * @return* displays the key ARNs and Regions of all replica keys. This field * includes the current KMS key if it is a replica key. *
*/ public java.util.List* displays the key ARNs and Regions of all replica keys. This field * includes the current KMS key if it is a replica key. *
* * @param replicaKeys* displays the key ARNs and Regions of all replica keys. This * field includes the current KMS key if it is a replica key. *
*/ public void setReplicaKeys(java.util.Collection* displays the key ARNs and Regions of all replica keys. This field * includes the current KMS key if it is a replica key. *
** Returns a reference to this object so that method calls can be chained * together. * * @param replicaKeys
* displays the key ARNs and Regions of all replica keys. This * field includes the current KMS key if it is a replica key. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MultiRegionConfiguration withReplicaKeys(MultiRegionKey... replicaKeys) { if (getReplicaKeys() == null) { this.replicaKeys = new java.util.ArrayList* displays the key ARNs and Regions of all replica keys. This field * includes the current KMS key if it is a replica key. *
** Returns a reference to this object so that method calls can be chained * together. * * @param replicaKeys
* displays the key ARNs and Regions of all replica keys. This * field includes the current KMS key if it is a replica key. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MultiRegionConfiguration withReplicaKeys(java.util.Collection