aws_sdk_appconfig/operation/get_configuration/
_get_configuration_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetConfigurationOutput {
6    /// <p>The content of the configuration or the configuration data.</p><important>
7    /// <p>The <code>Content</code> attribute only contains data if the system finds new or updated configuration data. If there is no new or updated data and <code>ClientConfigurationVersion</code> matches the version of the current configuration, AppConfig returns a <code>204 No Content</code> HTTP response code and the <code>Content</code> value will be empty.</p>
8    /// </important>
9    pub content: ::std::option::Option<::aws_smithy_types::Blob>,
10    /// <p>The configuration version.</p>
11    pub configuration_version: ::std::option::Option<::std::string::String>,
12    /// <p>A standard MIME type describing the format of the configuration content. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a>.</p>
13    pub content_type: ::std::option::Option<::std::string::String>,
14    _request_id: Option<String>,
15}
16impl GetConfigurationOutput {
17    /// <p>The content of the configuration or the configuration data.</p><important>
18    /// <p>The <code>Content</code> attribute only contains data if the system finds new or updated configuration data. If there is no new or updated data and <code>ClientConfigurationVersion</code> matches the version of the current configuration, AppConfig returns a <code>204 No Content</code> HTTP response code and the <code>Content</code> value will be empty.</p>
19    /// </important>
20    pub fn content(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
21        self.content.as_ref()
22    }
23    /// <p>The configuration version.</p>
24    pub fn configuration_version(&self) -> ::std::option::Option<&str> {
25        self.configuration_version.as_deref()
26    }
27    /// <p>A standard MIME type describing the format of the configuration content. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a>.</p>
28    pub fn content_type(&self) -> ::std::option::Option<&str> {
29        self.content_type.as_deref()
30    }
31}
32impl ::std::fmt::Debug for GetConfigurationOutput {
33    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34        let mut formatter = f.debug_struct("GetConfigurationOutput");
35        formatter.field("content", &"*** Sensitive Data Redacted ***");
36        formatter.field("configuration_version", &self.configuration_version);
37        formatter.field("content_type", &self.content_type);
38        formatter.field("_request_id", &self._request_id);
39        formatter.finish()
40    }
41}
42impl ::aws_types::request_id::RequestId for GetConfigurationOutput {
43    fn request_id(&self) -> Option<&str> {
44        self._request_id.as_deref()
45    }
46}
47impl GetConfigurationOutput {
48    /// Creates a new builder-style object to manufacture [`GetConfigurationOutput`](crate::operation::get_configuration::GetConfigurationOutput).
49    pub fn builder() -> crate::operation::get_configuration::builders::GetConfigurationOutputBuilder {
50        crate::operation::get_configuration::builders::GetConfigurationOutputBuilder::default()
51    }
52}
53
54/// A builder for [`GetConfigurationOutput`](crate::operation::get_configuration::GetConfigurationOutput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
56#[non_exhaustive]
57pub struct GetConfigurationOutputBuilder {
58    pub(crate) content: ::std::option::Option<::aws_smithy_types::Blob>,
59    pub(crate) configuration_version: ::std::option::Option<::std::string::String>,
60    pub(crate) content_type: ::std::option::Option<::std::string::String>,
61    _request_id: Option<String>,
62}
63impl GetConfigurationOutputBuilder {
64    /// <p>The content of the configuration or the configuration data.</p><important>
65    /// <p>The <code>Content</code> attribute only contains data if the system finds new or updated configuration data. If there is no new or updated data and <code>ClientConfigurationVersion</code> matches the version of the current configuration, AppConfig returns a <code>204 No Content</code> HTTP response code and the <code>Content</code> value will be empty.</p>
66    /// </important>
67    pub fn content(mut self, input: ::aws_smithy_types::Blob) -> Self {
68        self.content = ::std::option::Option::Some(input);
69        self
70    }
71    /// <p>The content of the configuration or the configuration data.</p><important>
72    /// <p>The <code>Content</code> attribute only contains data if the system finds new or updated configuration data. If there is no new or updated data and <code>ClientConfigurationVersion</code> matches the version of the current configuration, AppConfig returns a <code>204 No Content</code> HTTP response code and the <code>Content</code> value will be empty.</p>
73    /// </important>
74    pub fn set_content(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
75        self.content = input;
76        self
77    }
78    /// <p>The content of the configuration or the configuration data.</p><important>
79    /// <p>The <code>Content</code> attribute only contains data if the system finds new or updated configuration data. If there is no new or updated data and <code>ClientConfigurationVersion</code> matches the version of the current configuration, AppConfig returns a <code>204 No Content</code> HTTP response code and the <code>Content</code> value will be empty.</p>
80    /// </important>
81    pub fn get_content(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
82        &self.content
83    }
84    /// <p>The configuration version.</p>
85    pub fn configuration_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.configuration_version = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>The configuration version.</p>
90    pub fn set_configuration_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91        self.configuration_version = input;
92        self
93    }
94    /// <p>The configuration version.</p>
95    pub fn get_configuration_version(&self) -> &::std::option::Option<::std::string::String> {
96        &self.configuration_version
97    }
98    /// <p>A standard MIME type describing the format of the configuration content. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a>.</p>
99    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100        self.content_type = ::std::option::Option::Some(input.into());
101        self
102    }
103    /// <p>A standard MIME type describing the format of the configuration content. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a>.</p>
104    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.content_type = input;
106        self
107    }
108    /// <p>A standard MIME type describing the format of the configuration content. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a>.</p>
109    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
110        &self.content_type
111    }
112    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
113        self._request_id = Some(request_id.into());
114        self
115    }
116
117    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
118        self._request_id = request_id;
119        self
120    }
121    /// Consumes the builder and constructs a [`GetConfigurationOutput`](crate::operation::get_configuration::GetConfigurationOutput).
122    pub fn build(self) -> crate::operation::get_configuration::GetConfigurationOutput {
123        crate::operation::get_configuration::GetConfigurationOutput {
124            content: self.content,
125            configuration_version: self.configuration_version,
126            content_type: self.content_type,
127            _request_id: self._request_id,
128        }
129    }
130}
131impl ::std::fmt::Debug for GetConfigurationOutputBuilder {
132    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
133        let mut formatter = f.debug_struct("GetConfigurationOutputBuilder");
134        formatter.field("content", &"*** Sensitive Data Redacted ***");
135        formatter.field("configuration_version", &self.configuration_version);
136        formatter.field("content_type", &self.content_type);
137        formatter.field("_request_id", &self._request_id);
138        formatter.finish()
139    }
140}