Skip to main content

aws_sdk_greengrass/operation/create_subscription_definition_version/
_create_subscription_definition_version_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 CreateSubscriptionDefinitionVersionOutput {
6    /// The ARN of the version.
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// The time, in milliseconds since the epoch, when the version was created.
9    pub creation_timestamp: ::std::option::Option<::std::string::String>,
10    /// The ID of the parent definition that the version is associated with.
11    pub id: ::std::option::Option<::std::string::String>,
12    /// The ID of the version.
13    pub version: ::std::option::Option<::std::string::String>,
14    _request_id: Option<String>,
15}
16impl CreateSubscriptionDefinitionVersionOutput {
17    /// The ARN of the version.
18    pub fn arn(&self) -> ::std::option::Option<&str> {
19        self.arn.as_deref()
20    }
21    /// The time, in milliseconds since the epoch, when the version was created.
22    pub fn creation_timestamp(&self) -> ::std::option::Option<&str> {
23        self.creation_timestamp.as_deref()
24    }
25    /// The ID of the parent definition that the version is associated with.
26    pub fn id(&self) -> ::std::option::Option<&str> {
27        self.id.as_deref()
28    }
29    /// The ID of the version.
30    pub fn version(&self) -> ::std::option::Option<&str> {
31        self.version.as_deref()
32    }
33}
34impl ::aws_types::request_id::RequestId for CreateSubscriptionDefinitionVersionOutput {
35    fn request_id(&self) -> Option<&str> {
36        self._request_id.as_deref()
37    }
38}
39impl CreateSubscriptionDefinitionVersionOutput {
40    /// Creates a new builder-style object to manufacture [`CreateSubscriptionDefinitionVersionOutput`](crate::operation::create_subscription_definition_version::CreateSubscriptionDefinitionVersionOutput).
41    pub fn builder() -> crate::operation::create_subscription_definition_version::builders::CreateSubscriptionDefinitionVersionOutputBuilder {
42        crate::operation::create_subscription_definition_version::builders::CreateSubscriptionDefinitionVersionOutputBuilder::default()
43    }
44}
45
46/// A builder for [`CreateSubscriptionDefinitionVersionOutput`](crate::operation::create_subscription_definition_version::CreateSubscriptionDefinitionVersionOutput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct CreateSubscriptionDefinitionVersionOutputBuilder {
50    pub(crate) arn: ::std::option::Option<::std::string::String>,
51    pub(crate) creation_timestamp: ::std::option::Option<::std::string::String>,
52    pub(crate) id: ::std::option::Option<::std::string::String>,
53    pub(crate) version: ::std::option::Option<::std::string::String>,
54    _request_id: Option<String>,
55}
56impl CreateSubscriptionDefinitionVersionOutputBuilder {
57    /// The ARN of the version.
58    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.arn = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// The ARN of the version.
63    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.arn = input;
65        self
66    }
67    /// The ARN of the version.
68    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
69        &self.arn
70    }
71    /// The time, in milliseconds since the epoch, when the version was created.
72    pub fn creation_timestamp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.creation_timestamp = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// The time, in milliseconds since the epoch, when the version was created.
77    pub fn set_creation_timestamp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.creation_timestamp = input;
79        self
80    }
81    /// The time, in milliseconds since the epoch, when the version was created.
82    pub fn get_creation_timestamp(&self) -> &::std::option::Option<::std::string::String> {
83        &self.creation_timestamp
84    }
85    /// The ID of the parent definition that the version is associated with.
86    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.id = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// The ID of the parent definition that the version is associated with.
91    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.id = input;
93        self
94    }
95    /// The ID of the parent definition that the version is associated with.
96    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
97        &self.id
98    }
99    /// The ID of the version.
100    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.version = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// The ID of the version.
105    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.version = input;
107        self
108    }
109    /// The ID of the version.
110    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
111        &self.version
112    }
113    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
114        self._request_id = Some(request_id.into());
115        self
116    }
117
118    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
119        self._request_id = request_id;
120        self
121    }
122    /// Consumes the builder and constructs a [`CreateSubscriptionDefinitionVersionOutput`](crate::operation::create_subscription_definition_version::CreateSubscriptionDefinitionVersionOutput).
123    pub fn build(self) -> crate::operation::create_subscription_definition_version::CreateSubscriptionDefinitionVersionOutput {
124        crate::operation::create_subscription_definition_version::CreateSubscriptionDefinitionVersionOutput {
125            arn: self.arn,
126            creation_timestamp: self.creation_timestamp,
127            id: self.id,
128            version: self.version,
129            _request_id: self._request_id,
130        }
131    }
132}