aws_sdk_connect/operation/associate_flow/
_associate_flow_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, ::std::fmt::Debug)]
5pub struct AssociateFlowInput {
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.</p>
7    pub instance_id: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the resource.</p>
9    /// <ul>
10    /// <li>
11    /// <p>Amazon Web Services End User Messaging SMS phone number ARN when using <code>SMS_PHONE_NUMBER</code></p></li>
12    /// <li>
13    /// <p>Amazon Web Services End User Messaging Social phone number ARN when using <code>WHATSAPP_MESSAGING_PHONE_NUMBER</code></p></li>
14    /// </ul>
15    pub resource_id: ::std::option::Option<::std::string::String>,
16    /// <p>The identifier of the flow.</p>
17    pub flow_id: ::std::option::Option<::std::string::String>,
18    /// <p>A valid resource type.</p>
19    pub resource_type: ::std::option::Option<crate::types::FlowAssociationResourceType>,
20}
21impl AssociateFlowInput {
22    /// <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.</p>
23    pub fn instance_id(&self) -> ::std::option::Option<&str> {
24        self.instance_id.as_deref()
25    }
26    /// <p>The identifier of the resource.</p>
27    /// <ul>
28    /// <li>
29    /// <p>Amazon Web Services End User Messaging SMS phone number ARN when using <code>SMS_PHONE_NUMBER</code></p></li>
30    /// <li>
31    /// <p>Amazon Web Services End User Messaging Social phone number ARN when using <code>WHATSAPP_MESSAGING_PHONE_NUMBER</code></p></li>
32    /// </ul>
33    pub fn resource_id(&self) -> ::std::option::Option<&str> {
34        self.resource_id.as_deref()
35    }
36    /// <p>The identifier of the flow.</p>
37    pub fn flow_id(&self) -> ::std::option::Option<&str> {
38        self.flow_id.as_deref()
39    }
40    /// <p>A valid resource type.</p>
41    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::FlowAssociationResourceType> {
42        self.resource_type.as_ref()
43    }
44}
45impl AssociateFlowInput {
46    /// Creates a new builder-style object to manufacture [`AssociateFlowInput`](crate::operation::associate_flow::AssociateFlowInput).
47    pub fn builder() -> crate::operation::associate_flow::builders::AssociateFlowInputBuilder {
48        crate::operation::associate_flow::builders::AssociateFlowInputBuilder::default()
49    }
50}
51
52/// A builder for [`AssociateFlowInput`](crate::operation::associate_flow::AssociateFlowInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct AssociateFlowInputBuilder {
56    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
57    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
58    pub(crate) flow_id: ::std::option::Option<::std::string::String>,
59    pub(crate) resource_type: ::std::option::Option<crate::types::FlowAssociationResourceType>,
60}
61impl AssociateFlowInputBuilder {
62    /// <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.</p>
63    /// This field is required.
64    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65        self.instance_id = ::std::option::Option::Some(input.into());
66        self
67    }
68    /// <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.</p>
69    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70        self.instance_id = input;
71        self
72    }
73    /// <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.</p>
74    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
75        &self.instance_id
76    }
77    /// <p>The identifier of the resource.</p>
78    /// <ul>
79    /// <li>
80    /// <p>Amazon Web Services End User Messaging SMS phone number ARN when using <code>SMS_PHONE_NUMBER</code></p></li>
81    /// <li>
82    /// <p>Amazon Web Services End User Messaging Social phone number ARN when using <code>WHATSAPP_MESSAGING_PHONE_NUMBER</code></p></li>
83    /// </ul>
84    /// This field is required.
85    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.resource_id = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>The identifier of the resource.</p>
90    /// <ul>
91    /// <li>
92    /// <p>Amazon Web Services End User Messaging SMS phone number ARN when using <code>SMS_PHONE_NUMBER</code></p></li>
93    /// <li>
94    /// <p>Amazon Web Services End User Messaging Social phone number ARN when using <code>WHATSAPP_MESSAGING_PHONE_NUMBER</code></p></li>
95    /// </ul>
96    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97        self.resource_id = input;
98        self
99    }
100    /// <p>The identifier of the resource.</p>
101    /// <ul>
102    /// <li>
103    /// <p>Amazon Web Services End User Messaging SMS phone number ARN when using <code>SMS_PHONE_NUMBER</code></p></li>
104    /// <li>
105    /// <p>Amazon Web Services End User Messaging Social phone number ARN when using <code>WHATSAPP_MESSAGING_PHONE_NUMBER</code></p></li>
106    /// </ul>
107    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
108        &self.resource_id
109    }
110    /// <p>The identifier of the flow.</p>
111    /// This field is required.
112    pub fn flow_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.flow_id = ::std::option::Option::Some(input.into());
114        self
115    }
116    /// <p>The identifier of the flow.</p>
117    pub fn set_flow_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.flow_id = input;
119        self
120    }
121    /// <p>The identifier of the flow.</p>
122    pub fn get_flow_id(&self) -> &::std::option::Option<::std::string::String> {
123        &self.flow_id
124    }
125    /// <p>A valid resource type.</p>
126    /// This field is required.
127    pub fn resource_type(mut self, input: crate::types::FlowAssociationResourceType) -> Self {
128        self.resource_type = ::std::option::Option::Some(input);
129        self
130    }
131    /// <p>A valid resource type.</p>
132    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::FlowAssociationResourceType>) -> Self {
133        self.resource_type = input;
134        self
135    }
136    /// <p>A valid resource type.</p>
137    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::FlowAssociationResourceType> {
138        &self.resource_type
139    }
140    /// Consumes the builder and constructs a [`AssociateFlowInput`](crate::operation::associate_flow::AssociateFlowInput).
141    pub fn build(
142        self,
143    ) -> ::std::result::Result<crate::operation::associate_flow::AssociateFlowInput, ::aws_smithy_types::error::operation::BuildError> {
144        ::std::result::Result::Ok(crate::operation::associate_flow::AssociateFlowInput {
145            instance_id: self.instance_id,
146            resource_id: self.resource_id,
147            flow_id: self.flow_id,
148            resource_type: self.resource_type,
149        })
150    }
151}