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 UpdateSubscriptionInput {
/// <p>The ARN of the subscription to update.</p>
pub arn: ::std::option::Option<::std::string::String>,
/// <p>The new tier level for the subscription.</p>
pub plan_tier: ::std::option::Option<::std::string::String>,
/// <p>The usage level within the plan tier. Specify <code>DEFAULT</code> for the base configuration. If omitted, the usage level is reset to the default.</p>
pub usage_level: ::std::option::Option<::std::string::String>,
/// <p>The <code>ETag</code> value from a previous <code>GetSubscription</code> or <code>ListSubscriptions</code> response. This ensures you are updating the expected version of the subscription.</p>
pub if_match: ::std::option::Option<::std::string::String>,
/// <p>A unique, case-sensitive identifier that you provide to ensure the request is handled only once.</p>
pub client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateSubscriptionInput {
/// <p>The ARN of the subscription to update.</p>
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The new tier level for the subscription.</p>
pub fn plan_tier(&self) -> ::std::option::Option<&str> {
self.plan_tier.as_deref()
}
/// <p>The usage level within the plan tier. Specify <code>DEFAULT</code> for the base configuration. If omitted, the usage level is reset to the default.</p>
pub fn usage_level(&self) -> ::std::option::Option<&str> {
self.usage_level.as_deref()
}
/// <p>The <code>ETag</code> value from a previous <code>GetSubscription</code> or <code>ListSubscriptions</code> response. This ensures you are updating the expected version of the subscription.</p>
pub fn if_match(&self) -> ::std::option::Option<&str> {
self.if_match.as_deref()
}
/// <p>A unique, case-sensitive identifier that you provide to ensure the request is handled only once.</p>
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl UpdateSubscriptionInput {
/// Creates a new builder-style object to manufacture [`UpdateSubscriptionInput`](crate::operation::update_subscription::UpdateSubscriptionInput).
pub fn builder() -> crate::operation::update_subscription::builders::UpdateSubscriptionInputBuilder {
crate::operation::update_subscription::builders::UpdateSubscriptionInputBuilder::default()
}
}
/// A builder for [`UpdateSubscriptionInput`](crate::operation::update_subscription::UpdateSubscriptionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSubscriptionInputBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) plan_tier: ::std::option::Option<::std::string::String>,
pub(crate) usage_level: ::std::option::Option<::std::string::String>,
pub(crate) if_match: ::std::option::Option<::std::string::String>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateSubscriptionInputBuilder {
/// <p>The ARN of the subscription to update.</p>
/// This field is required.
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the subscription to update.</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The ARN of the subscription to update.</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>The new tier level for the subscription.</p>
/// This field is required.
pub fn plan_tier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.plan_tier = ::std::option::Option::Some(input.into());
self
}
/// <p>The new tier level for the subscription.</p>
pub fn set_plan_tier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.plan_tier = input;
self
}
/// <p>The new tier level for the subscription.</p>
pub fn get_plan_tier(&self) -> &::std::option::Option<::std::string::String> {
&self.plan_tier
}
/// <p>The usage level within the plan tier. Specify <code>DEFAULT</code> for the base configuration. If omitted, the usage level is reset to the default.</p>
pub fn usage_level(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.usage_level = ::std::option::Option::Some(input.into());
self
}
/// <p>The usage level within the plan tier. Specify <code>DEFAULT</code> for the base configuration. If omitted, the usage level is reset to the default.</p>
pub fn set_usage_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.usage_level = input;
self
}
/// <p>The usage level within the plan tier. Specify <code>DEFAULT</code> for the base configuration. If omitted, the usage level is reset to the default.</p>
pub fn get_usage_level(&self) -> &::std::option::Option<::std::string::String> {
&self.usage_level
}
/// <p>The <code>ETag</code> value from a previous <code>GetSubscription</code> or <code>ListSubscriptions</code> response. This ensures you are updating the expected version of the subscription.</p>
/// This field is required.
pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.if_match = ::std::option::Option::Some(input.into());
self
}
/// <p>The <code>ETag</code> value from a previous <code>GetSubscription</code> or <code>ListSubscriptions</code> response. This ensures you are updating the expected version of the subscription.</p>
pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.if_match = input;
self
}
/// <p>The <code>ETag</code> value from a previous <code>GetSubscription</code> or <code>ListSubscriptions</code> response. This ensures you are updating the expected version of the subscription.</p>
pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
&self.if_match
}
/// <p>A unique, case-sensitive identifier that you provide to ensure the request is handled only once.</p>
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
/// <p>A unique, case-sensitive identifier that you provide to ensure the request is handled only once.</p>
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
/// <p>A unique, case-sensitive identifier that you provide to ensure the request is handled only once.</p>
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
/// Consumes the builder and constructs a [`UpdateSubscriptionInput`](crate::operation::update_subscription::UpdateSubscriptionInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_subscription::UpdateSubscriptionInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_subscription::UpdateSubscriptionInput {
arn: self.arn,
plan_tier: self.plan_tier,
usage_level: self.usage_level,
if_match: self.if_match,
client_token: self.client_token,
})
}
}