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
// 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 UpdateLinkInput {
/// <p>The ARN of the link that you want to update.</p>
pub identifier: ::std::option::Option<::std::string::String>,
/// <p>An array of strings that define which types of data that the source account will send to the monitoring account.</p>
/// <p>Your input here replaces the current set of data types that are shared.</p>
pub resource_types: ::std::option::Option<::std::vec::Vec<crate::types::ResourceType>>,
/// <p>Use this structure to filter which metric namespaces and which log groups are to be shared from the source account to the monitoring account.</p>
pub link_configuration: ::std::option::Option<crate::types::LinkConfiguration>,
/// <p>Specifies whether to include the tags associated with the link in the response after the update operation. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
/// <p>The default value is <code>false</code>.</p>
pub include_tags: ::std::option::Option<bool>,
}
impl UpdateLinkInput {
/// <p>The ARN of the link that you want to update.</p>
pub fn identifier(&self) -> ::std::option::Option<&str> {
self.identifier.as_deref()
}
/// <p>An array of strings that define which types of data that the source account will send to the monitoring account.</p>
/// <p>Your input here replaces the current set of data types that are shared.</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 `.resource_types.is_none()`.
pub fn resource_types(&self) -> &[crate::types::ResourceType] {
self.resource_types.as_deref().unwrap_or_default()
}
/// <p>Use this structure to filter which metric namespaces and which log groups are to be shared from the source account to the monitoring account.</p>
pub fn link_configuration(&self) -> ::std::option::Option<&crate::types::LinkConfiguration> {
self.link_configuration.as_ref()
}
/// <p>Specifies whether to include the tags associated with the link in the response after the update operation. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
/// <p>The default value is <code>false</code>.</p>
pub fn include_tags(&self) -> ::std::option::Option<bool> {
self.include_tags
}
}
impl UpdateLinkInput {
/// Creates a new builder-style object to manufacture [`UpdateLinkInput`](crate::operation::update_link::UpdateLinkInput).
pub fn builder() -> crate::operation::update_link::builders::UpdateLinkInputBuilder {
crate::operation::update_link::builders::UpdateLinkInputBuilder::default()
}
}
/// A builder for [`UpdateLinkInput`](crate::operation::update_link::UpdateLinkInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateLinkInputBuilder {
pub(crate) identifier: ::std::option::Option<::std::string::String>,
pub(crate) resource_types: ::std::option::Option<::std::vec::Vec<crate::types::ResourceType>>,
pub(crate) link_configuration: ::std::option::Option<crate::types::LinkConfiguration>,
pub(crate) include_tags: ::std::option::Option<bool>,
}
impl UpdateLinkInputBuilder {
/// <p>The ARN of the link that you want to update.</p>
/// This field is required.
pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the link that you want to update.</p>
pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.identifier = input;
self
}
/// <p>The ARN of the link that you want to update.</p>
pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.identifier
}
/// Appends an item to `resource_types`.
///
/// To override the contents of this collection use [`set_resource_types`](Self::set_resource_types).
///
/// <p>An array of strings that define which types of data that the source account will send to the monitoring account.</p>
/// <p>Your input here replaces the current set of data types that are shared.</p>
pub fn resource_types(mut self, input: crate::types::ResourceType) -> Self {
let mut v = self.resource_types.unwrap_or_default();
v.push(input);
self.resource_types = ::std::option::Option::Some(v);
self
}
/// <p>An array of strings that define which types of data that the source account will send to the monitoring account.</p>
/// <p>Your input here replaces the current set of data types that are shared.</p>
pub fn set_resource_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourceType>>) -> Self {
self.resource_types = input;
self
}
/// <p>An array of strings that define which types of data that the source account will send to the monitoring account.</p>
/// <p>Your input here replaces the current set of data types that are shared.</p>
pub fn get_resource_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourceType>> {
&self.resource_types
}
/// <p>Use this structure to filter which metric namespaces and which log groups are to be shared from the source account to the monitoring account.</p>
pub fn link_configuration(mut self, input: crate::types::LinkConfiguration) -> Self {
self.link_configuration = ::std::option::Option::Some(input);
self
}
/// <p>Use this structure to filter which metric namespaces and which log groups are to be shared from the source account to the monitoring account.</p>
pub fn set_link_configuration(mut self, input: ::std::option::Option<crate::types::LinkConfiguration>) -> Self {
self.link_configuration = input;
self
}
/// <p>Use this structure to filter which metric namespaces and which log groups are to be shared from the source account to the monitoring account.</p>
pub fn get_link_configuration(&self) -> &::std::option::Option<crate::types::LinkConfiguration> {
&self.link_configuration
}
/// <p>Specifies whether to include the tags associated with the link in the response after the update operation. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
/// <p>The default value is <code>false</code>.</p>
pub fn include_tags(mut self, input: bool) -> Self {
self.include_tags = ::std::option::Option::Some(input);
self
}
/// <p>Specifies whether to include the tags associated with the link in the response after the update operation. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
/// <p>The default value is <code>false</code>.</p>
pub fn set_include_tags(mut self, input: ::std::option::Option<bool>) -> Self {
self.include_tags = input;
self
}
/// <p>Specifies whether to include the tags associated with the link in the response after the update operation. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
/// <p>The default value is <code>false</code>.</p>
pub fn get_include_tags(&self) -> &::std::option::Option<bool> {
&self.include_tags
}
/// Consumes the builder and constructs a [`UpdateLinkInput`](crate::operation::update_link::UpdateLinkInput).
pub fn build(self) -> ::std::result::Result<crate::operation::update_link::UpdateLinkInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_link::UpdateLinkInput {
identifier: self.identifier,
resource_types: self.resource_types,
link_configuration: self.link_configuration,
include_tags: self.include_tags,
})
}
}