aws_sdk_connect/operation/replicate_instance/
_replicate_instance_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct ReplicateInstanceInput {
6    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance. You can provide the <code>InstanceId</code>, or the entire ARN.</p>
7    pub instance_id: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Web Services Region where to replicate the Amazon Connect instance.</p>
9    pub replica_region: ::std::option::Option<::std::string::String>,
10    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
11    pub client_token: ::std::option::Option<::std::string::String>,
12    /// <p>The alias for the replicated instance. The <code>ReplicaAlias</code> must be unique.</p>
13    pub replica_alias: ::std::option::Option<::std::string::String>,
14}
15impl ReplicateInstanceInput {
16    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance. You can provide the <code>InstanceId</code>, or the entire ARN.</p>
17    pub fn instance_id(&self) -> ::std::option::Option<&str> {
18        self.instance_id.as_deref()
19    }
20    /// <p>The Amazon Web Services Region where to replicate the Amazon Connect instance.</p>
21    pub fn replica_region(&self) -> ::std::option::Option<&str> {
22        self.replica_region.as_deref()
23    }
24    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
25    pub fn client_token(&self) -> ::std::option::Option<&str> {
26        self.client_token.as_deref()
27    }
28    /// <p>The alias for the replicated instance. The <code>ReplicaAlias</code> must be unique.</p>
29    pub fn replica_alias(&self) -> ::std::option::Option<&str> {
30        self.replica_alias.as_deref()
31    }
32}
33impl ::std::fmt::Debug for ReplicateInstanceInput {
34    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35        let mut formatter = f.debug_struct("ReplicateInstanceInput");
36        formatter.field("instance_id", &self.instance_id);
37        formatter.field("replica_region", &self.replica_region);
38        formatter.field("client_token", &self.client_token);
39        formatter.field("replica_alias", &"*** Sensitive Data Redacted ***");
40        formatter.finish()
41    }
42}
43impl ReplicateInstanceInput {
44    /// Creates a new builder-style object to manufacture [`ReplicateInstanceInput`](crate::operation::replicate_instance::ReplicateInstanceInput).
45    pub fn builder() -> crate::operation::replicate_instance::builders::ReplicateInstanceInputBuilder {
46        crate::operation::replicate_instance::builders::ReplicateInstanceInputBuilder::default()
47    }
48}
49
50/// A builder for [`ReplicateInstanceInput`](crate::operation::replicate_instance::ReplicateInstanceInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
52#[non_exhaustive]
53pub struct ReplicateInstanceInputBuilder {
54    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
55    pub(crate) replica_region: ::std::option::Option<::std::string::String>,
56    pub(crate) client_token: ::std::option::Option<::std::string::String>,
57    pub(crate) replica_alias: ::std::option::Option<::std::string::String>,
58}
59impl ReplicateInstanceInputBuilder {
60    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance. You can provide the <code>InstanceId</code>, or the entire ARN.</p>
61    /// This field is required.
62    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63        self.instance_id = ::std::option::Option::Some(input.into());
64        self
65    }
66    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance. You can provide the <code>InstanceId</code>, or the entire ARN.</p>
67    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68        self.instance_id = input;
69        self
70    }
71    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance. You can provide the <code>InstanceId</code>, or the entire ARN.</p>
72    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
73        &self.instance_id
74    }
75    /// <p>The Amazon Web Services Region where to replicate the Amazon Connect instance.</p>
76    /// This field is required.
77    pub fn replica_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78        self.replica_region = ::std::option::Option::Some(input.into());
79        self
80    }
81    /// <p>The Amazon Web Services Region where to replicate the Amazon Connect instance.</p>
82    pub fn set_replica_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83        self.replica_region = input;
84        self
85    }
86    /// <p>The Amazon Web Services Region where to replicate the Amazon Connect instance.</p>
87    pub fn get_replica_region(&self) -> &::std::option::Option<::std::string::String> {
88        &self.replica_region
89    }
90    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
91    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92        self.client_token = ::std::option::Option::Some(input.into());
93        self
94    }
95    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
96    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97        self.client_token = input;
98        self
99    }
100    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
101    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
102        &self.client_token
103    }
104    /// <p>The alias for the replicated instance. The <code>ReplicaAlias</code> must be unique.</p>
105    /// This field is required.
106    pub fn replica_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107        self.replica_alias = ::std::option::Option::Some(input.into());
108        self
109    }
110    /// <p>The alias for the replicated instance. The <code>ReplicaAlias</code> must be unique.</p>
111    pub fn set_replica_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112        self.replica_alias = input;
113        self
114    }
115    /// <p>The alias for the replicated instance. The <code>ReplicaAlias</code> must be unique.</p>
116    pub fn get_replica_alias(&self) -> &::std::option::Option<::std::string::String> {
117        &self.replica_alias
118    }
119    /// Consumes the builder and constructs a [`ReplicateInstanceInput`](crate::operation::replicate_instance::ReplicateInstanceInput).
120    pub fn build(
121        self,
122    ) -> ::std::result::Result<crate::operation::replicate_instance::ReplicateInstanceInput, ::aws_smithy_types::error::operation::BuildError> {
123        ::std::result::Result::Ok(crate::operation::replicate_instance::ReplicateInstanceInput {
124            instance_id: self.instance_id,
125            replica_region: self.replica_region,
126            client_token: self.client_token,
127            replica_alias: self.replica_alias,
128        })
129    }
130}
131impl ::std::fmt::Debug for ReplicateInstanceInputBuilder {
132    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
133        let mut formatter = f.debug_struct("ReplicateInstanceInputBuilder");
134        formatter.field("instance_id", &self.instance_id);
135        formatter.field("replica_region", &self.replica_region);
136        formatter.field("client_token", &self.client_token);
137        formatter.field("replica_alias", &"*** Sensitive Data Redacted ***");
138        formatter.finish()
139    }
140}