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
// 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 LabelParameterVersionInput {
/// <p>The parameter name on which you want to attach one or more labels.</p><note>
/// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
/// </note>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The specific version of the parameter on which you want to attach one or more labels. If no version is specified, the system attaches the label to the latest version.</p>
pub parameter_version: ::std::option::Option<i64>,
/// <p>One or more labels to attach to the specified parameter version.</p>
pub labels: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl LabelParameterVersionInput {
/// <p>The parameter name on which you want to attach one or more labels.</p><note>
/// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
/// </note>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The specific version of the parameter on which you want to attach one or more labels. If no version is specified, the system attaches the label to the latest version.</p>
pub fn parameter_version(&self) -> ::std::option::Option<i64> {
self.parameter_version
}
/// <p>One or more labels to attach to the specified parameter version.</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 `.labels.is_none()`.
pub fn labels(&self) -> &[::std::string::String] {
self.labels.as_deref().unwrap_or_default()
}
}
impl LabelParameterVersionInput {
/// Creates a new builder-style object to manufacture [`LabelParameterVersionInput`](crate::operation::label_parameter_version::LabelParameterVersionInput).
pub fn builder() -> crate::operation::label_parameter_version::builders::LabelParameterVersionInputBuilder {
crate::operation::label_parameter_version::builders::LabelParameterVersionInputBuilder::default()
}
}
/// A builder for [`LabelParameterVersionInput`](crate::operation::label_parameter_version::LabelParameterVersionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct LabelParameterVersionInputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) parameter_version: ::std::option::Option<i64>,
pub(crate) labels: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl LabelParameterVersionInputBuilder {
/// <p>The parameter name on which you want to attach one or more labels.</p><note>
/// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
/// </note>
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The parameter name on which you want to attach one or more labels.</p><note>
/// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
/// </note>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The parameter name on which you want to attach one or more labels.</p><note>
/// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
/// </note>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The specific version of the parameter on which you want to attach one or more labels. If no version is specified, the system attaches the label to the latest version.</p>
pub fn parameter_version(mut self, input: i64) -> Self {
self.parameter_version = ::std::option::Option::Some(input);
self
}
/// <p>The specific version of the parameter on which you want to attach one or more labels. If no version is specified, the system attaches the label to the latest version.</p>
pub fn set_parameter_version(mut self, input: ::std::option::Option<i64>) -> Self {
self.parameter_version = input;
self
}
/// <p>The specific version of the parameter on which you want to attach one or more labels. If no version is specified, the system attaches the label to the latest version.</p>
pub fn get_parameter_version(&self) -> &::std::option::Option<i64> {
&self.parameter_version
}
/// Appends an item to `labels`.
///
/// To override the contents of this collection use [`set_labels`](Self::set_labels).
///
/// <p>One or more labels to attach to the specified parameter version.</p>
pub fn labels(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.labels.unwrap_or_default();
v.push(input.into());
self.labels = ::std::option::Option::Some(v);
self
}
/// <p>One or more labels to attach to the specified parameter version.</p>
pub fn set_labels(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.labels = input;
self
}
/// <p>One or more labels to attach to the specified parameter version.</p>
pub fn get_labels(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.labels
}
/// Consumes the builder and constructs a [`LabelParameterVersionInput`](crate::operation::label_parameter_version::LabelParameterVersionInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::label_parameter_version::LabelParameterVersionInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::label_parameter_version::LabelParameterVersionInput {
name: self.name,
parameter_version: self.parameter_version,
labels: self.labels,
})
}
}