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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdatePredefinedAttributeInput {
/// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
pub instance_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the predefined attribute.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The values of the predefined attribute.</p>
pub values: ::std::option::Option<crate::types::PredefinedAttributeValues>,
/// <p>Values that enable you to categorize your predefined attributes. You can use them in custom UI elements across the Amazon Connect admin website.</p>
pub purposes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Custom metadata that is associated to predefined attributes to control behavior in upstream services, such as controlling how a predefined attribute should be displayed in the Amazon Connect admin website.</p>
pub attribute_configuration: ::std::option::Option<crate::types::InputPredefinedAttributeConfiguration>,
}
impl UpdatePredefinedAttributeInput {
/// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
pub fn instance_id(&self) -> ::std::option::Option<&str> {
self.instance_id.as_deref()
}
/// <p>The name of the predefined attribute.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The values of the predefined attribute.</p>
pub fn values(&self) -> ::std::option::Option<&crate::types::PredefinedAttributeValues> {
self.values.as_ref()
}
/// <p>Values that enable you to categorize your predefined attributes. You can use them in custom UI elements across the Amazon Connect admin website.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.purposes.is_none()`.
pub fn purposes(&self) -> &[::std::string::String] {
self.purposes.as_deref().unwrap_or_default()
}
/// <p>Custom metadata that is associated to predefined attributes to control behavior in upstream services, such as controlling how a predefined attribute should be displayed in the Amazon Connect admin website.</p>
pub fn attribute_configuration(&self) -> ::std::option::Option<&crate::types::InputPredefinedAttributeConfiguration> {
self.attribute_configuration.as_ref()
}
}
impl UpdatePredefinedAttributeInput {
/// Creates a new builder-style object to manufacture [`UpdatePredefinedAttributeInput`](crate::operation::update_predefined_attribute::UpdatePredefinedAttributeInput).
pub fn builder() -> crate::operation::update_predefined_attribute::builders::UpdatePredefinedAttributeInputBuilder {
crate::operation::update_predefined_attribute::builders::UpdatePredefinedAttributeInputBuilder::default()
}
}
/// A builder for [`UpdatePredefinedAttributeInput`](crate::operation::update_predefined_attribute::UpdatePredefinedAttributeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdatePredefinedAttributeInputBuilder {
pub(crate) instance_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) values: ::std::option::Option<crate::types::PredefinedAttributeValues>,
pub(crate) purposes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) attribute_configuration: ::std::option::Option<crate::types::InputPredefinedAttributeConfiguration>,
}
impl UpdatePredefinedAttributeInputBuilder {
/// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
/// This field is required.
pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.instance_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.instance_id = input;
self
}
/// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_id
}
/// <p>The name of the predefined attribute.</p>
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the predefined attribute.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the predefined attribute.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The values of the predefined attribute.</p>
pub fn values(mut self, input: crate::types::PredefinedAttributeValues) -> Self {
self.values = ::std::option::Option::Some(input);
self
}
/// <p>The values of the predefined attribute.</p>
pub fn set_values(mut self, input: ::std::option::Option<crate::types::PredefinedAttributeValues>) -> Self {
self.values = input;
self
}
/// <p>The values of the predefined attribute.</p>
pub fn get_values(&self) -> &::std::option::Option<crate::types::PredefinedAttributeValues> {
&self.values
}
/// Appends an item to `purposes`.
///
/// To override the contents of this collection use [`set_purposes`](Self::set_purposes).
///
/// <p>Values that enable you to categorize your predefined attributes. You can use them in custom UI elements across the Amazon Connect admin website.</p>
pub fn purposes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.purposes.unwrap_or_default();
v.push(input.into());
self.purposes = ::std::option::Option::Some(v);
self
}
/// <p>Values that enable you to categorize your predefined attributes. You can use them in custom UI elements across the Amazon Connect admin website.</p>
pub fn set_purposes(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.purposes = input;
self
}
/// <p>Values that enable you to categorize your predefined attributes. You can use them in custom UI elements across the Amazon Connect admin website.</p>
pub fn get_purposes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.purposes
}
/// <p>Custom metadata that is associated to predefined attributes to control behavior in upstream services, such as controlling how a predefined attribute should be displayed in the Amazon Connect admin website.</p>
pub fn attribute_configuration(mut self, input: crate::types::InputPredefinedAttributeConfiguration) -> Self {
self.attribute_configuration = ::std::option::Option::Some(input);
self
}
/// <p>Custom metadata that is associated to predefined attributes to control behavior in upstream services, such as controlling how a predefined attribute should be displayed in the Amazon Connect admin website.</p>
pub fn set_attribute_configuration(mut self, input: ::std::option::Option<crate::types::InputPredefinedAttributeConfiguration>) -> Self {
self.attribute_configuration = input;
self
}
/// <p>Custom metadata that is associated to predefined attributes to control behavior in upstream services, such as controlling how a predefined attribute should be displayed in the Amazon Connect admin website.</p>
pub fn get_attribute_configuration(&self) -> &::std::option::Option<crate::types::InputPredefinedAttributeConfiguration> {
&self.attribute_configuration
}
/// Consumes the builder and constructs a [`UpdatePredefinedAttributeInput`](crate::operation::update_predefined_attribute::UpdatePredefinedAttributeInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::update_predefined_attribute::UpdatePredefinedAttributeInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::update_predefined_attribute::UpdatePredefinedAttributeInput {
instance_id: self.instance_id,
name: self.name,
values: self.values,
purposes: self.purposes,
attribute_configuration: self.attribute_configuration,
})
}
}