/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace KMS { namespace Model { /** *

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.

See Also:

AWS * API Reference

*/ class MultiRegionConfiguration { public: AWS_KMS_API MultiRegionConfiguration(); AWS_KMS_API MultiRegionConfiguration(Aws::Utils::Json::JsonView jsonValue); AWS_KMS_API MultiRegionConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_KMS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Indicates whether the KMS key is a PRIMARY or * REPLICA key.

*/ inline const MultiRegionKeyType& GetMultiRegionKeyType() const{ return m_multiRegionKeyType; } /** *

Indicates whether the KMS key is a PRIMARY or * REPLICA key.

*/ inline bool MultiRegionKeyTypeHasBeenSet() const { return m_multiRegionKeyTypeHasBeenSet; } /** *

Indicates whether the KMS key is a PRIMARY or * REPLICA key.

*/ inline void SetMultiRegionKeyType(const MultiRegionKeyType& value) { m_multiRegionKeyTypeHasBeenSet = true; m_multiRegionKeyType = value; } /** *

Indicates whether the KMS key is a PRIMARY or * REPLICA key.

*/ inline void SetMultiRegionKeyType(MultiRegionKeyType&& value) { m_multiRegionKeyTypeHasBeenSet = true; m_multiRegionKeyType = std::move(value); } /** *

Indicates whether the KMS key is a PRIMARY or * REPLICA key.

*/ inline MultiRegionConfiguration& WithMultiRegionKeyType(const MultiRegionKeyType& value) { SetMultiRegionKeyType(value); return *this;} /** *

Indicates whether the KMS key is a PRIMARY or * REPLICA key.

*/ inline MultiRegionConfiguration& WithMultiRegionKeyType(MultiRegionKeyType&& value) { SetMultiRegionKeyType(std::move(value)); return *this;} /** *

Displays the key ARN and Region of the primary key. This field includes the * current KMS key if it is the primary key.

*/ inline const MultiRegionKey& GetPrimaryKey() const{ return m_primaryKey; } /** *

Displays the key ARN and Region of the primary key. This field includes the * current KMS key if it is the primary key.

*/ inline bool PrimaryKeyHasBeenSet() const { return m_primaryKeyHasBeenSet; } /** *

Displays the key ARN and Region of the primary key. This field includes the * current KMS key if it is the primary key.

*/ inline void SetPrimaryKey(const MultiRegionKey& value) { m_primaryKeyHasBeenSet = true; m_primaryKey = value; } /** *

Displays the key ARN and Region of the primary key. This field includes the * current KMS key if it is the primary key.

*/ inline void SetPrimaryKey(MultiRegionKey&& value) { m_primaryKeyHasBeenSet = true; m_primaryKey = std::move(value); } /** *

Displays the key ARN and Region of the primary key. This field includes the * current KMS key if it is the primary key.

*/ inline MultiRegionConfiguration& WithPrimaryKey(const MultiRegionKey& value) { SetPrimaryKey(value); return *this;} /** *

Displays the key ARN and Region of the primary key. This field includes the * current KMS key if it is the primary key.

*/ inline MultiRegionConfiguration& WithPrimaryKey(MultiRegionKey&& value) { SetPrimaryKey(std::move(value)); 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.

*/ inline const Aws::Vector& GetReplicaKeys() const{ return m_replicaKeys; } /** *

displays the key ARNs and Regions of all replica keys. This field includes * the current KMS key if it is a replica key.

*/ inline bool ReplicaKeysHasBeenSet() const { return m_replicaKeysHasBeenSet; } /** *

displays the key ARNs and Regions of all replica keys. This field includes * the current KMS key if it is a replica key.

*/ inline void SetReplicaKeys(const Aws::Vector& value) { m_replicaKeysHasBeenSet = true; m_replicaKeys = value; } /** *

displays the key ARNs and Regions of all replica keys. This field includes * the current KMS key if it is a replica key.

*/ inline void SetReplicaKeys(Aws::Vector&& value) { m_replicaKeysHasBeenSet = true; m_replicaKeys = std::move(value); } /** *

displays the key ARNs and Regions of all replica keys. This field includes * the current KMS key if it is a replica key.

*/ inline MultiRegionConfiguration& WithReplicaKeys(const Aws::Vector& value) { SetReplicaKeys(value); 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.

*/ inline MultiRegionConfiguration& WithReplicaKeys(Aws::Vector&& value) { SetReplicaKeys(std::move(value)); 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.

*/ inline MultiRegionConfiguration& AddReplicaKeys(const MultiRegionKey& value) { m_replicaKeysHasBeenSet = true; m_replicaKeys.push_back(value); 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.

*/ inline MultiRegionConfiguration& AddReplicaKeys(MultiRegionKey&& value) { m_replicaKeysHasBeenSet = true; m_replicaKeys.push_back(std::move(value)); return *this; } private: MultiRegionKeyType m_multiRegionKeyType; bool m_multiRegionKeyTypeHasBeenSet = false; MultiRegionKey m_primaryKey; bool m_primaryKeyHasBeenSet = false; Aws::Vector m_replicaKeys; bool m_replicaKeysHasBeenSet = false; }; } // namespace Model } // namespace KMS } // namespace Aws