1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes the primary or replica key in a multi-Region key.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MultiRegionKey {
/// <p>Displays the key ARN of a primary or replica key of a multi-Region key.</p>
#[doc(hidden)]
pub arn: std::option::Option<std::string::String>,
/// <p>Displays the Amazon Web Services Region of a primary or replica key in a multi-Region key.</p>
#[doc(hidden)]
pub region: std::option::Option<std::string::String>,
}
impl MultiRegionKey {
/// <p>Displays the key ARN of a primary or replica key of a multi-Region key.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>Displays the Amazon Web Services Region of a primary or replica key in a multi-Region key.</p>
pub fn region(&self) -> std::option::Option<&str> {
self.region.as_deref()
}
}
impl MultiRegionKey {
/// Creates a new builder-style object to manufacture [`MultiRegionKey`](crate::types::MultiRegionKey).
pub fn builder() -> crate::types::builders::MultiRegionKeyBuilder {
crate::types::builders::MultiRegionKeyBuilder::default()
}
}
/// A builder for [`MultiRegionKey`](crate::types::MultiRegionKey).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct MultiRegionKeyBuilder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) region: std::option::Option<std::string::String>,
}
impl MultiRegionKeyBuilder {
/// <p>Displays the key ARN of a primary or replica key of a multi-Region key.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>Displays the key ARN of a primary or replica key of a multi-Region key.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>Displays the Amazon Web Services Region of a primary or replica key in a multi-Region key.</p>
pub fn region(mut self, input: impl Into<std::string::String>) -> Self {
self.region = Some(input.into());
self
}
/// <p>Displays the Amazon Web Services Region of a primary or replica key in a multi-Region key.</p>
pub fn set_region(mut self, input: std::option::Option<std::string::String>) -> Self {
self.region = input;
self
}
/// Consumes the builder and constructs a [`MultiRegionKey`](crate::types::MultiRegionKey).
pub fn build(self) -> crate::types::MultiRegionKey {
crate::types::MultiRegionKey {
arn: self.arn,
region: self.region,
}
}
}