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
// 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 ModifyUsageLimitInput {
/// <p>The identifier of the usage limit to modify.</p>
pub usage_limit_id: ::std::option::Option<::std::string::String>,
/// <p>The new limit amount. For more information about this parameter, see <code>UsageLimit</code>.</p>
pub amount: ::std::option::Option<i64>,
/// <p>The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see <code>UsageLimit</code>.</p>
pub breach_action: ::std::option::Option<crate::types::UsageLimitBreachAction>,
}
impl ModifyUsageLimitInput {
/// <p>The identifier of the usage limit to modify.</p>
pub fn usage_limit_id(&self) -> ::std::option::Option<&str> {
self.usage_limit_id.as_deref()
}
/// <p>The new limit amount. For more information about this parameter, see <code>UsageLimit</code>.</p>
pub fn amount(&self) -> ::std::option::Option<i64> {
self.amount
}
/// <p>The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see <code>UsageLimit</code>.</p>
pub fn breach_action(&self) -> ::std::option::Option<&crate::types::UsageLimitBreachAction> {
self.breach_action.as_ref()
}
}
impl ModifyUsageLimitInput {
/// Creates a new builder-style object to manufacture [`ModifyUsageLimitInput`](crate::operation::modify_usage_limit::ModifyUsageLimitInput).
pub fn builder() -> crate::operation::modify_usage_limit::builders::ModifyUsageLimitInputBuilder {
crate::operation::modify_usage_limit::builders::ModifyUsageLimitInputBuilder::default()
}
}
/// A builder for [`ModifyUsageLimitInput`](crate::operation::modify_usage_limit::ModifyUsageLimitInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyUsageLimitInputBuilder {
pub(crate) usage_limit_id: ::std::option::Option<::std::string::String>,
pub(crate) amount: ::std::option::Option<i64>,
pub(crate) breach_action: ::std::option::Option<crate::types::UsageLimitBreachAction>,
}
impl ModifyUsageLimitInputBuilder {
/// <p>The identifier of the usage limit to modify.</p>
/// This field is required.
pub fn usage_limit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.usage_limit_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the usage limit to modify.</p>
pub fn set_usage_limit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.usage_limit_id = input;
self
}
/// <p>The identifier of the usage limit to modify.</p>
pub fn get_usage_limit_id(&self) -> &::std::option::Option<::std::string::String> {
&self.usage_limit_id
}
/// <p>The new limit amount. For more information about this parameter, see <code>UsageLimit</code>.</p>
pub fn amount(mut self, input: i64) -> Self {
self.amount = ::std::option::Option::Some(input);
self
}
/// <p>The new limit amount. For more information about this parameter, see <code>UsageLimit</code>.</p>
pub fn set_amount(mut self, input: ::std::option::Option<i64>) -> Self {
self.amount = input;
self
}
/// <p>The new limit amount. For more information about this parameter, see <code>UsageLimit</code>.</p>
pub fn get_amount(&self) -> &::std::option::Option<i64> {
&self.amount
}
/// <p>The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see <code>UsageLimit</code>.</p>
pub fn breach_action(mut self, input: crate::types::UsageLimitBreachAction) -> Self {
self.breach_action = ::std::option::Option::Some(input);
self
}
/// <p>The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see <code>UsageLimit</code>.</p>
pub fn set_breach_action(mut self, input: ::std::option::Option<crate::types::UsageLimitBreachAction>) -> Self {
self.breach_action = input;
self
}
/// <p>The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see <code>UsageLimit</code>.</p>
pub fn get_breach_action(&self) -> &::std::option::Option<crate::types::UsageLimitBreachAction> {
&self.breach_action
}
/// Consumes the builder and constructs a [`ModifyUsageLimitInput`](crate::operation::modify_usage_limit::ModifyUsageLimitInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::modify_usage_limit::ModifyUsageLimitInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::modify_usage_limit::ModifyUsageLimitInput {
usage_limit_id: self.usage_limit_id,
amount: self.amount,
breach_action: self.breach_action,
})
}
}