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
// 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 ListKeysInput {
/// <p>The key state of the keys you want to list.</p>
pub key_state: ::std::option::Option<crate::types::KeyState>,
/// <p>Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of <code>NextToken</code> from the truncated response you just received.</p>
pub next_token: ::std::option::Option<::std::string::String>,
/// <p>Use this parameter to specify the maximum number of items to return. When this value is present, Amazon Web Services Payment Cryptography does not return more than the specified number of items, but it might return fewer.</p>
/// <p>This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.</p>
pub max_results: ::std::option::Option<i32>,
}
impl ListKeysInput {
/// <p>The key state of the keys you want to list.</p>
pub fn key_state(&self) -> ::std::option::Option<&crate::types::KeyState> {
self.key_state.as_ref()
}
/// <p>Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of <code>NextToken</code> from the truncated response you just received.</p>
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
/// <p>Use this parameter to specify the maximum number of items to return. When this value is present, Amazon Web Services Payment Cryptography does not return more than the specified number of items, but it might return fewer.</p>
/// <p>This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.</p>
pub fn max_results(&self) -> ::std::option::Option<i32> {
self.max_results
}
}
impl ListKeysInput {
/// Creates a new builder-style object to manufacture [`ListKeysInput`](crate::operation::list_keys::ListKeysInput).
pub fn builder() -> crate::operation::list_keys::builders::ListKeysInputBuilder {
crate::operation::list_keys::builders::ListKeysInputBuilder::default()
}
}
/// A builder for [`ListKeysInput`](crate::operation::list_keys::ListKeysInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListKeysInputBuilder {
pub(crate) key_state: ::std::option::Option<crate::types::KeyState>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
pub(crate) max_results: ::std::option::Option<i32>,
}
impl ListKeysInputBuilder {
/// <p>The key state of the keys you want to list.</p>
pub fn key_state(mut self, input: crate::types::KeyState) -> Self {
self.key_state = ::std::option::Option::Some(input);
self
}
/// <p>The key state of the keys you want to list.</p>
pub fn set_key_state(mut self, input: ::std::option::Option<crate::types::KeyState>) -> Self {
self.key_state = input;
self
}
/// <p>The key state of the keys you want to list.</p>
pub fn get_key_state(&self) -> &::std::option::Option<crate::types::KeyState> {
&self.key_state
}
/// <p>Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of <code>NextToken</code> from the truncated response you just received.</p>
pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::Some(input.into());
self
}
/// <p>Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of <code>NextToken</code> from the truncated response you just received.</p>
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
/// <p>Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of <code>NextToken</code> from the truncated response you just received.</p>
pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
/// <p>Use this parameter to specify the maximum number of items to return. When this value is present, Amazon Web Services Payment Cryptography does not return more than the specified number of items, but it might return fewer.</p>
/// <p>This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = ::std::option::Option::Some(input);
self
}
/// <p>Use this parameter to specify the maximum number of items to return. When this value is present, Amazon Web Services Payment Cryptography does not return more than the specified number of items, but it might return fewer.</p>
/// <p>This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.</p>
pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
/// <p>Use this parameter to specify the maximum number of items to return. When this value is present, Amazon Web Services Payment Cryptography does not return more than the specified number of items, but it might return fewer.</p>
/// <p>This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.</p>
pub fn get_max_results(&self) -> &::std::option::Option<i32> {
&self.max_results
}
/// Consumes the builder and constructs a [`ListKeysInput`](crate::operation::list_keys::ListKeysInput).
pub fn build(self) -> ::std::result::Result<crate::operation::list_keys::ListKeysInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::list_keys::ListKeysInput {
key_state: self.key_state,
next_token: self.next_token,
max_results: self.max_results,
})
}
}