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
135
136
137
138
139
140
141
142
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>DescribeTapesInput</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeTapesInput {
/// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
pub gateway_arn: ::std::option::Option<::std::string::String>,
/// <p>Specifies one or more unique Amazon Resource Names (ARNs) that represent the virtual tapes you want to describe. If this parameter is not specified, Tape gateway returns a description of all virtual tapes associated with the specified gateway.</p>
pub tape_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>A marker value, obtained in a previous call to <code>DescribeTapes</code>. This marker indicates which page of results to retrieve.</p>
/// <p>If not specified, the first page of results is retrieved.</p>
pub marker: ::std::option::Option<::std::string::String>,
/// <p>Specifies that the number of virtual tapes described be limited to the specified number.</p><note>
/// <p>Amazon Web Services may impose its own limit, if this field is not set.</p>
/// </note>
pub limit: ::std::option::Option<i32>,
}
impl DescribeTapesInput {
/// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
pub fn gateway_arn(&self) -> ::std::option::Option<&str> {
self.gateway_arn.as_deref()
}
/// <p>Specifies one or more unique Amazon Resource Names (ARNs) that represent the virtual tapes you want to describe. If this parameter is not specified, Tape gateway returns a description of all virtual tapes associated with the specified gateway.</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 `.tape_arns.is_none()`.
pub fn tape_arns(&self) -> &[::std::string::String] {
self.tape_arns.as_deref().unwrap_or_default()
}
/// <p>A marker value, obtained in a previous call to <code>DescribeTapes</code>. This marker indicates which page of results to retrieve.</p>
/// <p>If not specified, the first page of results is retrieved.</p>
pub fn marker(&self) -> ::std::option::Option<&str> {
self.marker.as_deref()
}
/// <p>Specifies that the number of virtual tapes described be limited to the specified number.</p><note>
/// <p>Amazon Web Services may impose its own limit, if this field is not set.</p>
/// </note>
pub fn limit(&self) -> ::std::option::Option<i32> {
self.limit
}
}
impl DescribeTapesInput {
/// Creates a new builder-style object to manufacture [`DescribeTapesInput`](crate::operation::describe_tapes::DescribeTapesInput).
pub fn builder() -> crate::operation::describe_tapes::builders::DescribeTapesInputBuilder {
crate::operation::describe_tapes::builders::DescribeTapesInputBuilder::default()
}
}
/// A builder for [`DescribeTapesInput`](crate::operation::describe_tapes::DescribeTapesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeTapesInputBuilder {
pub(crate) gateway_arn: ::std::option::Option<::std::string::String>,
pub(crate) tape_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) marker: ::std::option::Option<::std::string::String>,
pub(crate) limit: ::std::option::Option<i32>,
}
impl DescribeTapesInputBuilder {
/// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
/// This field is required.
pub fn gateway_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.gateway_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
pub fn set_gateway_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.gateway_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
pub fn get_gateway_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.gateway_arn
}
/// Appends an item to `tape_arns`.
///
/// To override the contents of this collection use [`set_tape_arns`](Self::set_tape_arns).
///
/// <p>Specifies one or more unique Amazon Resource Names (ARNs) that represent the virtual tapes you want to describe. If this parameter is not specified, Tape gateway returns a description of all virtual tapes associated with the specified gateway.</p>
pub fn tape_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.tape_arns.unwrap_or_default();
v.push(input.into());
self.tape_arns = ::std::option::Option::Some(v);
self
}
/// <p>Specifies one or more unique Amazon Resource Names (ARNs) that represent the virtual tapes you want to describe. If this parameter is not specified, Tape gateway returns a description of all virtual tapes associated with the specified gateway.</p>
pub fn set_tape_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.tape_arns = input;
self
}
/// <p>Specifies one or more unique Amazon Resource Names (ARNs) that represent the virtual tapes you want to describe. If this parameter is not specified, Tape gateway returns a description of all virtual tapes associated with the specified gateway.</p>
pub fn get_tape_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.tape_arns
}
/// <p>A marker value, obtained in a previous call to <code>DescribeTapes</code>. This marker indicates which page of results to retrieve.</p>
/// <p>If not specified, the first page of results is retrieved.</p>
pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.marker = ::std::option::Option::Some(input.into());
self
}
/// <p>A marker value, obtained in a previous call to <code>DescribeTapes</code>. This marker indicates which page of results to retrieve.</p>
/// <p>If not specified, the first page of results is retrieved.</p>
pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.marker = input;
self
}
/// <p>A marker value, obtained in a previous call to <code>DescribeTapes</code>. This marker indicates which page of results to retrieve.</p>
/// <p>If not specified, the first page of results is retrieved.</p>
pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
&self.marker
}
/// <p>Specifies that the number of virtual tapes described be limited to the specified number.</p><note>
/// <p>Amazon Web Services may impose its own limit, if this field is not set.</p>
/// </note>
pub fn limit(mut self, input: i32) -> Self {
self.limit = ::std::option::Option::Some(input);
self
}
/// <p>Specifies that the number of virtual tapes described be limited to the specified number.</p><note>
/// <p>Amazon Web Services may impose its own limit, if this field is not set.</p>
/// </note>
pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
self.limit = input;
self
}
/// <p>Specifies that the number of virtual tapes described be limited to the specified number.</p><note>
/// <p>Amazon Web Services may impose its own limit, if this field is not set.</p>
/// </note>
pub fn get_limit(&self) -> &::std::option::Option<i32> {
&self.limit
}
/// Consumes the builder and constructs a [`DescribeTapesInput`](crate::operation::describe_tapes::DescribeTapesInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::describe_tapes::DescribeTapesInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::describe_tapes::DescribeTapesInput {
gateway_arn: self.gateway_arn,
tape_arns: self.tape_arns,
marker: self.marker,
limit: self.limit,
})
}
}