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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
// 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)]
pub struct GetLatestConfigurationOutput {
/// <p>The latest token describing the current state of the configuration session. This <i>must</i> be provided to the next call to <code>GetLatestConfiguration.</code></p><important>
/// <p>This token should only be used once. To support long poll use cases, the token is valid for up to 24 hours. If a <code>GetLatestConfiguration</code> call uses an expired token, the system returns <code>BadRequestException</code>.</p>
/// </important>
pub next_poll_configuration_token: ::std::option::Option<::std::string::String>,
/// <p>The amount of time the client should wait before polling for configuration updates again. Use <code>RequiredMinimumPollIntervalInSeconds</code> to set the desired poll interval.</p>
pub next_poll_interval_in_seconds: i32,
/// <p>A standard MIME type describing the format of the configuration content.</p>
pub content_type: ::std::option::Option<::std::string::String>,
/// <p>The data of the configuration. This may be empty if the client already has the latest version of configuration.</p>
pub configuration: ::std::option::Option<::aws_smithy_types::Blob>,
/// <p>The user-defined label for the AppConfig hosted configuration version. This attribute doesn't apply if the configuration is not from an AppConfig hosted configuration version. If the client already has the latest version of the configuration data, this value is empty.</p>
pub version_label: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetLatestConfigurationOutput {
/// <p>The latest token describing the current state of the configuration session. This <i>must</i> be provided to the next call to <code>GetLatestConfiguration.</code></p><important>
/// <p>This token should only be used once. To support long poll use cases, the token is valid for up to 24 hours. If a <code>GetLatestConfiguration</code> call uses an expired token, the system returns <code>BadRequestException</code>.</p>
/// </important>
pub fn next_poll_configuration_token(&self) -> ::std::option::Option<&str> {
self.next_poll_configuration_token.as_deref()
}
/// <p>The amount of time the client should wait before polling for configuration updates again. Use <code>RequiredMinimumPollIntervalInSeconds</code> to set the desired poll interval.</p>
pub fn next_poll_interval_in_seconds(&self) -> i32 {
self.next_poll_interval_in_seconds
}
/// <p>A standard MIME type describing the format of the configuration content.</p>
pub fn content_type(&self) -> ::std::option::Option<&str> {
self.content_type.as_deref()
}
/// <p>The data of the configuration. This may be empty if the client already has the latest version of configuration.</p>
pub fn configuration(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
self.configuration.as_ref()
}
/// <p>The user-defined label for the AppConfig hosted configuration version. This attribute doesn't apply if the configuration is not from an AppConfig hosted configuration version. If the client already has the latest version of the configuration data, this value is empty.</p>
pub fn version_label(&self) -> ::std::option::Option<&str> {
self.version_label.as_deref()
}
}
impl ::std::fmt::Debug for GetLatestConfigurationOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetLatestConfigurationOutput");
formatter.field("next_poll_configuration_token", &self.next_poll_configuration_token);
formatter.field("next_poll_interval_in_seconds", &self.next_poll_interval_in_seconds);
formatter.field("content_type", &self.content_type);
formatter.field("configuration", &"*** Sensitive Data Redacted ***");
formatter.field("version_label", &self.version_label);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetLatestConfigurationOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetLatestConfigurationOutput {
/// Creates a new builder-style object to manufacture [`GetLatestConfigurationOutput`](crate::operation::get_latest_configuration::GetLatestConfigurationOutput).
pub fn builder() -> crate::operation::get_latest_configuration::builders::GetLatestConfigurationOutputBuilder {
crate::operation::get_latest_configuration::builders::GetLatestConfigurationOutputBuilder::default()
}
}
/// A builder for [`GetLatestConfigurationOutput`](crate::operation::get_latest_configuration::GetLatestConfigurationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetLatestConfigurationOutputBuilder {
pub(crate) next_poll_configuration_token: ::std::option::Option<::std::string::String>,
pub(crate) next_poll_interval_in_seconds: ::std::option::Option<i32>,
pub(crate) content_type: ::std::option::Option<::std::string::String>,
pub(crate) configuration: ::std::option::Option<::aws_smithy_types::Blob>,
pub(crate) version_label: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetLatestConfigurationOutputBuilder {
/// <p>The latest token describing the current state of the configuration session. This <i>must</i> be provided to the next call to <code>GetLatestConfiguration.</code></p><important>
/// <p>This token should only be used once. To support long poll use cases, the token is valid for up to 24 hours. If a <code>GetLatestConfiguration</code> call uses an expired token, the system returns <code>BadRequestException</code>.</p>
/// </important>
pub fn next_poll_configuration_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_poll_configuration_token = ::std::option::Option::Some(input.into());
self
}
/// <p>The latest token describing the current state of the configuration session. This <i>must</i> be provided to the next call to <code>GetLatestConfiguration.</code></p><important>
/// <p>This token should only be used once. To support long poll use cases, the token is valid for up to 24 hours. If a <code>GetLatestConfiguration</code> call uses an expired token, the system returns <code>BadRequestException</code>.</p>
/// </important>
pub fn set_next_poll_configuration_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_poll_configuration_token = input;
self
}
/// <p>The latest token describing the current state of the configuration session. This <i>must</i> be provided to the next call to <code>GetLatestConfiguration.</code></p><important>
/// <p>This token should only be used once. To support long poll use cases, the token is valid for up to 24 hours. If a <code>GetLatestConfiguration</code> call uses an expired token, the system returns <code>BadRequestException</code>.</p>
/// </important>
pub fn get_next_poll_configuration_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_poll_configuration_token
}
/// <p>The amount of time the client should wait before polling for configuration updates again. Use <code>RequiredMinimumPollIntervalInSeconds</code> to set the desired poll interval.</p>
pub fn next_poll_interval_in_seconds(mut self, input: i32) -> Self {
self.next_poll_interval_in_seconds = ::std::option::Option::Some(input);
self
}
/// <p>The amount of time the client should wait before polling for configuration updates again. Use <code>RequiredMinimumPollIntervalInSeconds</code> to set the desired poll interval.</p>
pub fn set_next_poll_interval_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
self.next_poll_interval_in_seconds = input;
self
}
/// <p>The amount of time the client should wait before polling for configuration updates again. Use <code>RequiredMinimumPollIntervalInSeconds</code> to set the desired poll interval.</p>
pub fn get_next_poll_interval_in_seconds(&self) -> &::std::option::Option<i32> {
&self.next_poll_interval_in_seconds
}
/// <p>A standard MIME type describing the format of the configuration content.</p>
pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.content_type = ::std::option::Option::Some(input.into());
self
}
/// <p>A standard MIME type describing the format of the configuration content.</p>
pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.content_type = input;
self
}
/// <p>A standard MIME type describing the format of the configuration content.</p>
pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
&self.content_type
}
/// <p>The data of the configuration. This may be empty if the client already has the latest version of configuration.</p>
pub fn configuration(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.configuration = ::std::option::Option::Some(input);
self
}
/// <p>The data of the configuration. This may be empty if the client already has the latest version of configuration.</p>
pub fn set_configuration(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.configuration = input;
self
}
/// <p>The data of the configuration. This may be empty if the client already has the latest version of configuration.</p>
pub fn get_configuration(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.configuration
}
/// <p>The user-defined label for the AppConfig hosted configuration version. This attribute doesn't apply if the configuration is not from an AppConfig hosted configuration version. If the client already has the latest version of the configuration data, this value is empty.</p>
pub fn version_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version_label = ::std::option::Option::Some(input.into());
self
}
/// <p>The user-defined label for the AppConfig hosted configuration version. This attribute doesn't apply if the configuration is not from an AppConfig hosted configuration version. If the client already has the latest version of the configuration data, this value is empty.</p>
pub fn set_version_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version_label = input;
self
}
/// <p>The user-defined label for the AppConfig hosted configuration version. This attribute doesn't apply if the configuration is not from an AppConfig hosted configuration version. If the client already has the latest version of the configuration data, this value is empty.</p>
pub fn get_version_label(&self) -> &::std::option::Option<::std::string::String> {
&self.version_label
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`GetLatestConfigurationOutput`](crate::operation::get_latest_configuration::GetLatestConfigurationOutput).
pub fn build(self) -> crate::operation::get_latest_configuration::GetLatestConfigurationOutput {
crate::operation::get_latest_configuration::GetLatestConfigurationOutput {
next_poll_configuration_token: self.next_poll_configuration_token,
next_poll_interval_in_seconds: self.next_poll_interval_in_seconds.unwrap_or_default(),
content_type: self.content_type,
configuration: self.configuration,
version_label: self.version_label,
_request_id: self._request_id,
}
}
}
impl ::std::fmt::Debug for GetLatestConfigurationOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetLatestConfigurationOutputBuilder");
formatter.field("next_poll_configuration_token", &self.next_poll_configuration_token);
formatter.field("next_poll_interval_in_seconds", &self.next_poll_interval_in_seconds);
formatter.field("content_type", &self.content_type);
formatter.field("configuration", &"*** Sensitive Data Redacted ***");
formatter.field("version_label", &self.version_label);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}