Skip to main content

aws_sdk_connect/operation/list_contact_references/
_list_contact_references_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 ListContactReferencesInput {
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 initial contact.</p>
9    pub contact_id: ::std::option::Option<::std::string::String>,
10    /// <p>The type of reference.</p>
11    pub reference_types: ::std::option::Option<::std::vec::Vec<crate::types::ReferenceType>>,
12    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p><important>
13    /// <p>This is not expected to be set, because the value returned in the previous response is always null.</p>
14    /// </important>
15    pub next_token: ::std::option::Option<::std::string::String>,
16}
17impl ListContactReferencesInput {
18    /// <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>
19    pub fn instance_id(&self) -> ::std::option::Option<&str> {
20        self.instance_id.as_deref()
21    }
22    /// <p>The identifier of the initial contact.</p>
23    pub fn contact_id(&self) -> ::std::option::Option<&str> {
24        self.contact_id.as_deref()
25    }
26    /// <p>The type of reference.</p>
27    ///
28    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.reference_types.is_none()`.
29    pub fn reference_types(&self) -> &[crate::types::ReferenceType] {
30        self.reference_types.as_deref().unwrap_or_default()
31    }
32    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p><important>
33    /// <p>This is not expected to be set, because the value returned in the previous response is always null.</p>
34    /// </important>
35    pub fn next_token(&self) -> ::std::option::Option<&str> {
36        self.next_token.as_deref()
37    }
38}
39impl ListContactReferencesInput {
40    /// Creates a new builder-style object to manufacture [`ListContactReferencesInput`](crate::operation::list_contact_references::ListContactReferencesInput).
41    pub fn builder() -> crate::operation::list_contact_references::builders::ListContactReferencesInputBuilder {
42        crate::operation::list_contact_references::builders::ListContactReferencesInputBuilder::default()
43    }
44}
45
46/// A builder for [`ListContactReferencesInput`](crate::operation::list_contact_references::ListContactReferencesInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct ListContactReferencesInputBuilder {
50    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
51    pub(crate) contact_id: ::std::option::Option<::std::string::String>,
52    pub(crate) reference_types: ::std::option::Option<::std::vec::Vec<crate::types::ReferenceType>>,
53    pub(crate) next_token: ::std::option::Option<::std::string::String>,
54}
55impl ListContactReferencesInputBuilder {
56    /// <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>
57    /// This field is required.
58    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.instance_id = ::std::option::Option::Some(input.into());
60        self
61    }
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    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.instance_id = input;
65        self
66    }
67    /// <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>
68    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
69        &self.instance_id
70    }
71    /// <p>The identifier of the initial contact.</p>
72    /// This field is required.
73    pub fn contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.contact_id = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The identifier of the initial contact.</p>
78    pub fn set_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.contact_id = input;
80        self
81    }
82    /// <p>The identifier of the initial contact.</p>
83    pub fn get_contact_id(&self) -> &::std::option::Option<::std::string::String> {
84        &self.contact_id
85    }
86    /// Appends an item to `reference_types`.
87    ///
88    /// To override the contents of this collection use [`set_reference_types`](Self::set_reference_types).
89    ///
90    /// <p>The type of reference.</p>
91    pub fn reference_types(mut self, input: crate::types::ReferenceType) -> Self {
92        let mut v = self.reference_types.unwrap_or_default();
93        v.push(input);
94        self.reference_types = ::std::option::Option::Some(v);
95        self
96    }
97    /// <p>The type of reference.</p>
98    pub fn set_reference_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReferenceType>>) -> Self {
99        self.reference_types = input;
100        self
101    }
102    /// <p>The type of reference.</p>
103    pub fn get_reference_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReferenceType>> {
104        &self.reference_types
105    }
106    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p><important>
107    /// <p>This is not expected to be set, because the value returned in the previous response is always null.</p>
108    /// </important>
109    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.next_token = ::std::option::Option::Some(input.into());
111        self
112    }
113    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p><important>
114    /// <p>This is not expected to be set, because the value returned in the previous response is always null.</p>
115    /// </important>
116    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.next_token = input;
118        self
119    }
120    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p><important>
121    /// <p>This is not expected to be set, because the value returned in the previous response is always null.</p>
122    /// </important>
123    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
124        &self.next_token
125    }
126    /// Consumes the builder and constructs a [`ListContactReferencesInput`](crate::operation::list_contact_references::ListContactReferencesInput).
127    pub fn build(
128        self,
129    ) -> ::std::result::Result<crate::operation::list_contact_references::ListContactReferencesInput, ::aws_smithy_types::error::operation::BuildError>
130    {
131        ::std::result::Result::Ok(crate::operation::list_contact_references::ListContactReferencesInput {
132            instance_id: self.instance_id,
133            contact_id: self.contact_id,
134            reference_types: self.reference_types,
135            next_token: self.next_token,
136        })
137    }
138}