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
// 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 UpdateScopeInput {
/// <p>The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.</p>
pub scope_id: ::std::option::Option<::std::string::String>,
/// <p>A list of resources to add to a scope.</p>
pub resources_to_add: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>,
/// <p>A list of resources to delete from a scope.</p>
pub resources_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>,
}
impl UpdateScopeInput {
/// <p>The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.</p>
pub fn scope_id(&self) -> ::std::option::Option<&str> {
self.scope_id.as_deref()
}
/// <p>A list of resources to add to a scope.</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 `.resources_to_add.is_none()`.
pub fn resources_to_add(&self) -> &[crate::types::TargetResource] {
self.resources_to_add.as_deref().unwrap_or_default()
}
/// <p>A list of resources to delete from a scope.</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 `.resources_to_delete.is_none()`.
pub fn resources_to_delete(&self) -> &[crate::types::TargetResource] {
self.resources_to_delete.as_deref().unwrap_or_default()
}
}
impl UpdateScopeInput {
/// Creates a new builder-style object to manufacture [`UpdateScopeInput`](crate::operation::update_scope::UpdateScopeInput).
pub fn builder() -> crate::operation::update_scope::builders::UpdateScopeInputBuilder {
crate::operation::update_scope::builders::UpdateScopeInputBuilder::default()
}
}
/// A builder for [`UpdateScopeInput`](crate::operation::update_scope::UpdateScopeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateScopeInputBuilder {
pub(crate) scope_id: ::std::option::Option<::std::string::String>,
pub(crate) resources_to_add: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>,
pub(crate) resources_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>,
}
impl UpdateScopeInputBuilder {
/// <p>The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.</p>
/// This field is required.
pub fn scope_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.scope_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.</p>
pub fn set_scope_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.scope_id = input;
self
}
/// <p>The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.</p>
pub fn get_scope_id(&self) -> &::std::option::Option<::std::string::String> {
&self.scope_id
}
/// Appends an item to `resources_to_add`.
///
/// To override the contents of this collection use [`set_resources_to_add`](Self::set_resources_to_add).
///
/// <p>A list of resources to add to a scope.</p>
pub fn resources_to_add(mut self, input: crate::types::TargetResource) -> Self {
let mut v = self.resources_to_add.unwrap_or_default();
v.push(input);
self.resources_to_add = ::std::option::Option::Some(v);
self
}
/// <p>A list of resources to add to a scope.</p>
pub fn set_resources_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>) -> Self {
self.resources_to_add = input;
self
}
/// <p>A list of resources to add to a scope.</p>
pub fn get_resources_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetResource>> {
&self.resources_to_add
}
/// Appends an item to `resources_to_delete`.
///
/// To override the contents of this collection use [`set_resources_to_delete`](Self::set_resources_to_delete).
///
/// <p>A list of resources to delete from a scope.</p>
pub fn resources_to_delete(mut self, input: crate::types::TargetResource) -> Self {
let mut v = self.resources_to_delete.unwrap_or_default();
v.push(input);
self.resources_to_delete = ::std::option::Option::Some(v);
self
}
/// <p>A list of resources to delete from a scope.</p>
pub fn set_resources_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>) -> Self {
self.resources_to_delete = input;
self
}
/// <p>A list of resources to delete from a scope.</p>
pub fn get_resources_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetResource>> {
&self.resources_to_delete
}
/// Consumes the builder and constructs a [`UpdateScopeInput`](crate::operation::update_scope::UpdateScopeInput).
pub fn build(self) -> ::std::result::Result<crate::operation::update_scope::UpdateScopeInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_scope::UpdateScopeInput {
scope_id: self.scope_id,
resources_to_add: self.resources_to_add,
resources_to_delete: self.resources_to_delete,
})
}
}