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
// 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 UpdateMetricContentInput {
/// <p>The identifier of the Connect Customer 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>
pub instance_id: ::std::option::Option<::std::string::String>,
/// <p>The identifier of the metric to update. Adding the <code>$SAVED</code> qualifier will update the saved version of the metric. Adding <code>$LATEST</code> or omitting a qualifier will update the published version.</p>
pub metric_id: ::std::option::Option<::std::string::String>,
/// <p>The updated calculation definition for the metric.</p>
pub metric_calculation: ::std::option::Option<crate::types::MetricCalculation>,
/// <p>The updated display unit for the metric.</p>
pub unit: ::std::option::Option<crate::types::MetricUnit>,
/// <p>How an increase in the metric value should be interpreted. Valid values: <code>POSITIVE</code>, <code>NEUTRAL</code>, <code>NEGATIVE</code>.</p>
pub positive_trend_indicator: ::std::option::Option<crate::types::TrendIndicator>,
}
impl UpdateMetricContentInput {
/// <p>The identifier of the Connect Customer 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>
pub fn instance_id(&self) -> ::std::option::Option<&str> {
self.instance_id.as_deref()
}
/// <p>The identifier of the metric to update. Adding the <code>$SAVED</code> qualifier will update the saved version of the metric. Adding <code>$LATEST</code> or omitting a qualifier will update the published version.</p>
pub fn metric_id(&self) -> ::std::option::Option<&str> {
self.metric_id.as_deref()
}
/// <p>The updated calculation definition for the metric.</p>
pub fn metric_calculation(&self) -> ::std::option::Option<&crate::types::MetricCalculation> {
self.metric_calculation.as_ref()
}
/// <p>The updated display unit for the metric.</p>
pub fn unit(&self) -> ::std::option::Option<&crate::types::MetricUnit> {
self.unit.as_ref()
}
/// <p>How an increase in the metric value should be interpreted. Valid values: <code>POSITIVE</code>, <code>NEUTRAL</code>, <code>NEGATIVE</code>.</p>
pub fn positive_trend_indicator(&self) -> ::std::option::Option<&crate::types::TrendIndicator> {
self.positive_trend_indicator.as_ref()
}
}
impl UpdateMetricContentInput {
/// Creates a new builder-style object to manufacture [`UpdateMetricContentInput`](crate::operation::update_metric_content::UpdateMetricContentInput).
pub fn builder() -> crate::operation::update_metric_content::builders::UpdateMetricContentInputBuilder {
crate::operation::update_metric_content::builders::UpdateMetricContentInputBuilder::default()
}
}
/// A builder for [`UpdateMetricContentInput`](crate::operation::update_metric_content::UpdateMetricContentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateMetricContentInputBuilder {
pub(crate) instance_id: ::std::option::Option<::std::string::String>,
pub(crate) metric_id: ::std::option::Option<::std::string::String>,
pub(crate) metric_calculation: ::std::option::Option<crate::types::MetricCalculation>,
pub(crate) unit: ::std::option::Option<crate::types::MetricUnit>,
pub(crate) positive_trend_indicator: ::std::option::Option<crate::types::TrendIndicator>,
}
impl UpdateMetricContentInputBuilder {
/// <p>The identifier of the Connect Customer 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>
/// 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 Connect Customer 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>
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 Connect Customer 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>
pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_id
}
/// <p>The identifier of the metric to update. Adding the <code>$SAVED</code> qualifier will update the saved version of the metric. Adding <code>$LATEST</code> or omitting a qualifier will update the published version.</p>
/// This field is required.
pub fn metric_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.metric_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the metric to update. Adding the <code>$SAVED</code> qualifier will update the saved version of the metric. Adding <code>$LATEST</code> or omitting a qualifier will update the published version.</p>
pub fn set_metric_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.metric_id = input;
self
}
/// <p>The identifier of the metric to update. Adding the <code>$SAVED</code> qualifier will update the saved version of the metric. Adding <code>$LATEST</code> or omitting a qualifier will update the published version.</p>
pub fn get_metric_id(&self) -> &::std::option::Option<::std::string::String> {
&self.metric_id
}
/// <p>The updated calculation definition for the metric.</p>
pub fn metric_calculation(mut self, input: crate::types::MetricCalculation) -> Self {
self.metric_calculation = ::std::option::Option::Some(input);
self
}
/// <p>The updated calculation definition for the metric.</p>
pub fn set_metric_calculation(mut self, input: ::std::option::Option<crate::types::MetricCalculation>) -> Self {
self.metric_calculation = input;
self
}
/// <p>The updated calculation definition for the metric.</p>
pub fn get_metric_calculation(&self) -> &::std::option::Option<crate::types::MetricCalculation> {
&self.metric_calculation
}
/// <p>The updated display unit for the metric.</p>
pub fn unit(mut self, input: crate::types::MetricUnit) -> Self {
self.unit = ::std::option::Option::Some(input);
self
}
/// <p>The updated display unit for the metric.</p>
pub fn set_unit(mut self, input: ::std::option::Option<crate::types::MetricUnit>) -> Self {
self.unit = input;
self
}
/// <p>The updated display unit for the metric.</p>
pub fn get_unit(&self) -> &::std::option::Option<crate::types::MetricUnit> {
&self.unit
}
/// <p>How an increase in the metric value should be interpreted. Valid values: <code>POSITIVE</code>, <code>NEUTRAL</code>, <code>NEGATIVE</code>.</p>
pub fn positive_trend_indicator(mut self, input: crate::types::TrendIndicator) -> Self {
self.positive_trend_indicator = ::std::option::Option::Some(input);
self
}
/// <p>How an increase in the metric value should be interpreted. Valid values: <code>POSITIVE</code>, <code>NEUTRAL</code>, <code>NEGATIVE</code>.</p>
pub fn set_positive_trend_indicator(mut self, input: ::std::option::Option<crate::types::TrendIndicator>) -> Self {
self.positive_trend_indicator = input;
self
}
/// <p>How an increase in the metric value should be interpreted. Valid values: <code>POSITIVE</code>, <code>NEUTRAL</code>, <code>NEGATIVE</code>.</p>
pub fn get_positive_trend_indicator(&self) -> &::std::option::Option<crate::types::TrendIndicator> {
&self.positive_trend_indicator
}
/// Consumes the builder and constructs a [`UpdateMetricContentInput`](crate::operation::update_metric_content::UpdateMetricContentInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_metric_content::UpdateMetricContentInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::update_metric_content::UpdateMetricContentInput {
instance_id: self.instance_id,
metric_id: self.metric_id,
metric_calculation: self.metric_calculation,
unit: self.unit,
positive_trend_indicator: self.positive_trend_indicator,
})
}
}