aws_sdk_ssm/operation/put_parameter/_put_parameter_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, ::std::fmt::Debug)]
5pub struct PutParameterOutput {
6 /// <p>The new version number of a parameter. If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents). By default, if you don't specify a specific version, the system returns the latest parameter value when a parameter is called.</p>
7 pub version: i64,
8 /// <p>The tier assigned to the parameter.</p>
9 pub tier: ::std::option::Option<crate::types::ParameterTier>,
10 _request_id: Option<String>,
11}
12impl PutParameterOutput {
13 /// <p>The new version number of a parameter. If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents). By default, if you don't specify a specific version, the system returns the latest parameter value when a parameter is called.</p>
14 pub fn version(&self) -> i64 {
15 self.version
16 }
17 /// <p>The tier assigned to the parameter.</p>
18 pub fn tier(&self) -> ::std::option::Option<&crate::types::ParameterTier> {
19 self.tier.as_ref()
20 }
21}
22impl ::aws_types::request_id::RequestId for PutParameterOutput {
23 fn request_id(&self) -> Option<&str> {
24 self._request_id.as_deref()
25 }
26}
27impl PutParameterOutput {
28 /// Creates a new builder-style object to manufacture [`PutParameterOutput`](crate::operation::put_parameter::PutParameterOutput).
29 pub fn builder() -> crate::operation::put_parameter::builders::PutParameterOutputBuilder {
30 crate::operation::put_parameter::builders::PutParameterOutputBuilder::default()
31 }
32}
33
34/// A builder for [`PutParameterOutput`](crate::operation::put_parameter::PutParameterOutput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct PutParameterOutputBuilder {
38 pub(crate) version: ::std::option::Option<i64>,
39 pub(crate) tier: ::std::option::Option<crate::types::ParameterTier>,
40 _request_id: Option<String>,
41}
42impl PutParameterOutputBuilder {
43 /// <p>The new version number of a parameter. If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents). By default, if you don't specify a specific version, the system returns the latest parameter value when a parameter is called.</p>
44 pub fn version(mut self, input: i64) -> Self {
45 self.version = ::std::option::Option::Some(input);
46 self
47 }
48 /// <p>The new version number of a parameter. If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents). By default, if you don't specify a specific version, the system returns the latest parameter value when a parameter is called.</p>
49 pub fn set_version(mut self, input: ::std::option::Option<i64>) -> Self {
50 self.version = input;
51 self
52 }
53 /// <p>The new version number of a parameter. If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents). By default, if you don't specify a specific version, the system returns the latest parameter value when a parameter is called.</p>
54 pub fn get_version(&self) -> &::std::option::Option<i64> {
55 &self.version
56 }
57 /// <p>The tier assigned to the parameter.</p>
58 pub fn tier(mut self, input: crate::types::ParameterTier) -> Self {
59 self.tier = ::std::option::Option::Some(input);
60 self
61 }
62 /// <p>The tier assigned to the parameter.</p>
63 pub fn set_tier(mut self, input: ::std::option::Option<crate::types::ParameterTier>) -> Self {
64 self.tier = input;
65 self
66 }
67 /// <p>The tier assigned to the parameter.</p>
68 pub fn get_tier(&self) -> &::std::option::Option<crate::types::ParameterTier> {
69 &self.tier
70 }
71 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
72 self._request_id = Some(request_id.into());
73 self
74 }
75
76 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
77 self._request_id = request_id;
78 self
79 }
80 /// Consumes the builder and constructs a [`PutParameterOutput`](crate::operation::put_parameter::PutParameterOutput).
81 pub fn build(self) -> crate::operation::put_parameter::PutParameterOutput {
82 crate::operation::put_parameter::PutParameterOutput {
83 version: self.version.unwrap_or_default(),
84 tier: self.tier,
85 _request_id: self._request_id,
86 }
87 }
88}