aws_sdk_connect/operation/associate_routing_profile_queues/
_associate_routing_profile_queues_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 AssociateRoutingProfileQueuesInput {
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 routing profile.</p>
9    pub routing_profile_id: ::std::option::Option<::std::string::String>,
10    /// <p>The queues to associate with this routing profile.</p>
11    pub queue_configs: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileQueueConfig>>,
12    /// <p>The manual assignment queues to associate with this routing profile.</p>
13    pub manual_assignment_queue_configs: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileManualAssignmentQueueConfig>>,
14}
15impl AssociateRoutingProfileQueuesInput {
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.</p>
17    pub fn instance_id(&self) -> ::std::option::Option<&str> {
18        self.instance_id.as_deref()
19    }
20    /// <p>The identifier of the routing profile.</p>
21    pub fn routing_profile_id(&self) -> ::std::option::Option<&str> {
22        self.routing_profile_id.as_deref()
23    }
24    /// <p>The queues to associate with this routing profile.</p>
25    ///
26    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.queue_configs.is_none()`.
27    pub fn queue_configs(&self) -> &[crate::types::RoutingProfileQueueConfig] {
28        self.queue_configs.as_deref().unwrap_or_default()
29    }
30    /// <p>The manual assignment queues to associate with this routing profile.</p>
31    ///
32    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.manual_assignment_queue_configs.is_none()`.
33    pub fn manual_assignment_queue_configs(&self) -> &[crate::types::RoutingProfileManualAssignmentQueueConfig] {
34        self.manual_assignment_queue_configs.as_deref().unwrap_or_default()
35    }
36}
37impl AssociateRoutingProfileQueuesInput {
38    /// Creates a new builder-style object to manufacture [`AssociateRoutingProfileQueuesInput`](crate::operation::associate_routing_profile_queues::AssociateRoutingProfileQueuesInput).
39    pub fn builder() -> crate::operation::associate_routing_profile_queues::builders::AssociateRoutingProfileQueuesInputBuilder {
40        crate::operation::associate_routing_profile_queues::builders::AssociateRoutingProfileQueuesInputBuilder::default()
41    }
42}
43
44/// A builder for [`AssociateRoutingProfileQueuesInput`](crate::operation::associate_routing_profile_queues::AssociateRoutingProfileQueuesInput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct AssociateRoutingProfileQueuesInputBuilder {
48    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
49    pub(crate) routing_profile_id: ::std::option::Option<::std::string::String>,
50    pub(crate) queue_configs: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileQueueConfig>>,
51    pub(crate) manual_assignment_queue_configs: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileManualAssignmentQueueConfig>>,
52}
53impl AssociateRoutingProfileQueuesInputBuilder {
54    /// <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>
55    /// This field is required.
56    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57        self.instance_id = ::std::option::Option::Some(input.into());
58        self
59    }
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.</p>
61    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62        self.instance_id = input;
63        self
64    }
65    /// <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>
66    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
67        &self.instance_id
68    }
69    /// <p>The identifier of the routing profile.</p>
70    /// This field is required.
71    pub fn routing_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72        self.routing_profile_id = ::std::option::Option::Some(input.into());
73        self
74    }
75    /// <p>The identifier of the routing profile.</p>
76    pub fn set_routing_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77        self.routing_profile_id = input;
78        self
79    }
80    /// <p>The identifier of the routing profile.</p>
81    pub fn get_routing_profile_id(&self) -> &::std::option::Option<::std::string::String> {
82        &self.routing_profile_id
83    }
84    /// Appends an item to `queue_configs`.
85    ///
86    /// To override the contents of this collection use [`set_queue_configs`](Self::set_queue_configs).
87    ///
88    /// <p>The queues to associate with this routing profile.</p>
89    pub fn queue_configs(mut self, input: crate::types::RoutingProfileQueueConfig) -> Self {
90        let mut v = self.queue_configs.unwrap_or_default();
91        v.push(input);
92        self.queue_configs = ::std::option::Option::Some(v);
93        self
94    }
95    /// <p>The queues to associate with this routing profile.</p>
96    pub fn set_queue_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileQueueConfig>>) -> Self {
97        self.queue_configs = input;
98        self
99    }
100    /// <p>The queues to associate with this routing profile.</p>
101    pub fn get_queue_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileQueueConfig>> {
102        &self.queue_configs
103    }
104    /// Appends an item to `manual_assignment_queue_configs`.
105    ///
106    /// To override the contents of this collection use [`set_manual_assignment_queue_configs`](Self::set_manual_assignment_queue_configs).
107    ///
108    /// <p>The manual assignment queues to associate with this routing profile.</p>
109    pub fn manual_assignment_queue_configs(mut self, input: crate::types::RoutingProfileManualAssignmentQueueConfig) -> Self {
110        let mut v = self.manual_assignment_queue_configs.unwrap_or_default();
111        v.push(input);
112        self.manual_assignment_queue_configs = ::std::option::Option::Some(v);
113        self
114    }
115    /// <p>The manual assignment queues to associate with this routing profile.</p>
116    pub fn set_manual_assignment_queue_configs(
117        mut self,
118        input: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileManualAssignmentQueueConfig>>,
119    ) -> Self {
120        self.manual_assignment_queue_configs = input;
121        self
122    }
123    /// <p>The manual assignment queues to associate with this routing profile.</p>
124    pub fn get_manual_assignment_queue_configs(
125        &self,
126    ) -> &::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileManualAssignmentQueueConfig>> {
127        &self.manual_assignment_queue_configs
128    }
129    /// Consumes the builder and constructs a [`AssociateRoutingProfileQueuesInput`](crate::operation::associate_routing_profile_queues::AssociateRoutingProfileQueuesInput).
130    pub fn build(
131        self,
132    ) -> ::std::result::Result<
133        crate::operation::associate_routing_profile_queues::AssociateRoutingProfileQueuesInput,
134        ::aws_smithy_types::error::operation::BuildError,
135    > {
136        ::std::result::Result::Ok(crate::operation::associate_routing_profile_queues::AssociateRoutingProfileQueuesInput {
137            instance_id: self.instance_id,
138            routing_profile_id: self.routing_profile_id,
139            queue_configs: self.queue_configs,
140            manual_assignment_queue_configs: self.manual_assignment_queue_configs,
141        })
142    }
143}