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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Contains the parameters for <code>UpdateSchedulingPolicy</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateSchedulingPolicyInput {
/// <p>The Amazon Resource Name (ARN) of the scheduling policy to update.</p>
pub arn: ::std::option::Option<::std::string::String>,
/// <p>The quota share scheduling policy details. Once set during creation, a quotaSharePolicy cannot be removed or changed to a fairsharePolicy.</p>
pub quota_share_policy: ::std::option::Option<crate::types::QuotaSharePolicy>,
/// <p>The fair-share policy scheduling details. Once set during creation, a fairsharePolicy cannot be removed or changed to a quotaSharePolicy.</p>
pub fairshare_policy: ::std::option::Option<crate::types::FairsharePolicy>,
}
impl UpdateSchedulingPolicyInput {
/// <p>The Amazon Resource Name (ARN) of the scheduling policy to update.</p>
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The quota share scheduling policy details. Once set during creation, a quotaSharePolicy cannot be removed or changed to a fairsharePolicy.</p>
pub fn quota_share_policy(&self) -> ::std::option::Option<&crate::types::QuotaSharePolicy> {
self.quota_share_policy.as_ref()
}
/// <p>The fair-share policy scheduling details. Once set during creation, a fairsharePolicy cannot be removed or changed to a quotaSharePolicy.</p>
pub fn fairshare_policy(&self) -> ::std::option::Option<&crate::types::FairsharePolicy> {
self.fairshare_policy.as_ref()
}
}
impl UpdateSchedulingPolicyInput {
/// Creates a new builder-style object to manufacture [`UpdateSchedulingPolicyInput`](crate::operation::update_scheduling_policy::UpdateSchedulingPolicyInput).
pub fn builder() -> crate::operation::update_scheduling_policy::builders::UpdateSchedulingPolicyInputBuilder {
crate::operation::update_scheduling_policy::builders::UpdateSchedulingPolicyInputBuilder::default()
}
}
/// A builder for [`UpdateSchedulingPolicyInput`](crate::operation::update_scheduling_policy::UpdateSchedulingPolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSchedulingPolicyInputBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) quota_share_policy: ::std::option::Option<crate::types::QuotaSharePolicy>,
pub(crate) fairshare_policy: ::std::option::Option<crate::types::FairsharePolicy>,
}
impl UpdateSchedulingPolicyInputBuilder {
/// <p>The Amazon Resource Name (ARN) of the scheduling policy 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 Amazon Resource Name (ARN) of the scheduling policy to update.</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the scheduling policy to update.</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>The quota share scheduling policy details. Once set during creation, a quotaSharePolicy cannot be removed or changed to a fairsharePolicy.</p>
pub fn quota_share_policy(mut self, input: crate::types::QuotaSharePolicy) -> Self {
self.quota_share_policy = ::std::option::Option::Some(input);
self
}
/// <p>The quota share scheduling policy details. Once set during creation, a quotaSharePolicy cannot be removed or changed to a fairsharePolicy.</p>
pub fn set_quota_share_policy(mut self, input: ::std::option::Option<crate::types::QuotaSharePolicy>) -> Self {
self.quota_share_policy = input;
self
}
/// <p>The quota share scheduling policy details. Once set during creation, a quotaSharePolicy cannot be removed or changed to a fairsharePolicy.</p>
pub fn get_quota_share_policy(&self) -> &::std::option::Option<crate::types::QuotaSharePolicy> {
&self.quota_share_policy
}
/// <p>The fair-share policy scheduling details. Once set during creation, a fairsharePolicy cannot be removed or changed to a quotaSharePolicy.</p>
pub fn fairshare_policy(mut self, input: crate::types::FairsharePolicy) -> Self {
self.fairshare_policy = ::std::option::Option::Some(input);
self
}
/// <p>The fair-share policy scheduling details. Once set during creation, a fairsharePolicy cannot be removed or changed to a quotaSharePolicy.</p>
pub fn set_fairshare_policy(mut self, input: ::std::option::Option<crate::types::FairsharePolicy>) -> Self {
self.fairshare_policy = input;
self
}
/// <p>The fair-share policy scheduling details. Once set during creation, a fairsharePolicy cannot be removed or changed to a quotaSharePolicy.</p>
pub fn get_fairshare_policy(&self) -> &::std::option::Option<crate::types::FairsharePolicy> {
&self.fairshare_policy
}
/// Consumes the builder and constructs a [`UpdateSchedulingPolicyInput`](crate::operation::update_scheduling_policy::UpdateSchedulingPolicyInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::update_scheduling_policy::UpdateSchedulingPolicyInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::update_scheduling_policy::UpdateSchedulingPolicyInput {
arn: self.arn,
quota_share_policy: self.quota_share_policy,
fairshare_policy: self.fairshare_policy,
})
}
}