aws_sdk_codecatalyst/operation/get_subscription/
_get_subscription_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 GetSubscriptionOutput {
6    /// <p>The type of the billing plan for the space.</p>
7    pub subscription_type: ::std::option::Option<::std::string::String>,
8    /// <p>The display name of the Amazon Web Services account used for billing for the space.</p>
9    pub aws_account_name: ::std::option::Option<::std::string::String>,
10    /// <p>The type of the billing plan that the space will be changed to at the start of the next billing cycle. This applies only to changes that reduce the functionality available for the space. Billing plan changes that increase functionality are applied immediately. For more information, see <a href="https://codecatalyst.aws/explore/pricing">Pricing</a>.</p>
11    pub pending_subscription_type: ::std::option::Option<::std::string::String>,
12    /// <p>The day and time the pending change will be applied to the space, in coordinated universal time (UTC) timestamp format as specified in <a href="https://www.rfc-editor.org/rfc/rfc3339#section-5.6">RFC 3339</a>.</p>
13    pub pending_subscription_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
14    _request_id: Option<String>,
15}
16impl GetSubscriptionOutput {
17    /// <p>The type of the billing plan for the space.</p>
18    pub fn subscription_type(&self) -> ::std::option::Option<&str> {
19        self.subscription_type.as_deref()
20    }
21    /// <p>The display name of the Amazon Web Services account used for billing for the space.</p>
22    pub fn aws_account_name(&self) -> ::std::option::Option<&str> {
23        self.aws_account_name.as_deref()
24    }
25    /// <p>The type of the billing plan that the space will be changed to at the start of the next billing cycle. This applies only to changes that reduce the functionality available for the space. Billing plan changes that increase functionality are applied immediately. For more information, see <a href="https://codecatalyst.aws/explore/pricing">Pricing</a>.</p>
26    pub fn pending_subscription_type(&self) -> ::std::option::Option<&str> {
27        self.pending_subscription_type.as_deref()
28    }
29    /// <p>The day and time the pending change will be applied to the space, in coordinated universal time (UTC) timestamp format as specified in <a href="https://www.rfc-editor.org/rfc/rfc3339#section-5.6">RFC 3339</a>.</p>
30    pub fn pending_subscription_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31        self.pending_subscription_start_time.as_ref()
32    }
33}
34impl ::aws_types::request_id::RequestId for GetSubscriptionOutput {
35    fn request_id(&self) -> Option<&str> {
36        self._request_id.as_deref()
37    }
38}
39impl GetSubscriptionOutput {
40    /// Creates a new builder-style object to manufacture [`GetSubscriptionOutput`](crate::operation::get_subscription::GetSubscriptionOutput).
41    pub fn builder() -> crate::operation::get_subscription::builders::GetSubscriptionOutputBuilder {
42        crate::operation::get_subscription::builders::GetSubscriptionOutputBuilder::default()
43    }
44}
45
46/// A builder for [`GetSubscriptionOutput`](crate::operation::get_subscription::GetSubscriptionOutput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct GetSubscriptionOutputBuilder {
50    pub(crate) subscription_type: ::std::option::Option<::std::string::String>,
51    pub(crate) aws_account_name: ::std::option::Option<::std::string::String>,
52    pub(crate) pending_subscription_type: ::std::option::Option<::std::string::String>,
53    pub(crate) pending_subscription_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
54    _request_id: Option<String>,
55}
56impl GetSubscriptionOutputBuilder {
57    /// <p>The type of the billing plan for the space.</p>
58    pub fn subscription_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.subscription_type = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The type of the billing plan for the space.</p>
63    pub fn set_subscription_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.subscription_type = input;
65        self
66    }
67    /// <p>The type of the billing plan for the space.</p>
68    pub fn get_subscription_type(&self) -> &::std::option::Option<::std::string::String> {
69        &self.subscription_type
70    }
71    /// <p>The display name of the Amazon Web Services account used for billing for the space.</p>
72    pub fn aws_account_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.aws_account_name = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The display name of the Amazon Web Services account used for billing for the space.</p>
77    pub fn set_aws_account_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.aws_account_name = input;
79        self
80    }
81    /// <p>The display name of the Amazon Web Services account used for billing for the space.</p>
82    pub fn get_aws_account_name(&self) -> &::std::option::Option<::std::string::String> {
83        &self.aws_account_name
84    }
85    /// <p>The type of the billing plan that the space will be changed to at the start of the next billing cycle. This applies only to changes that reduce the functionality available for the space. Billing plan changes that increase functionality are applied immediately. For more information, see <a href="https://codecatalyst.aws/explore/pricing">Pricing</a>.</p>
86    pub fn pending_subscription_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.pending_subscription_type = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The type of the billing plan that the space will be changed to at the start of the next billing cycle. This applies only to changes that reduce the functionality available for the space. Billing plan changes that increase functionality are applied immediately. For more information, see <a href="https://codecatalyst.aws/explore/pricing">Pricing</a>.</p>
91    pub fn set_pending_subscription_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.pending_subscription_type = input;
93        self
94    }
95    /// <p>The type of the billing plan that the space will be changed to at the start of the next billing cycle. This applies only to changes that reduce the functionality available for the space. Billing plan changes that increase functionality are applied immediately. For more information, see <a href="https://codecatalyst.aws/explore/pricing">Pricing</a>.</p>
96    pub fn get_pending_subscription_type(&self) -> &::std::option::Option<::std::string::String> {
97        &self.pending_subscription_type
98    }
99    /// <p>The day and time the pending change will be applied to the space, in coordinated universal time (UTC) timestamp format as specified in <a href="https://www.rfc-editor.org/rfc/rfc3339#section-5.6">RFC 3339</a>.</p>
100    pub fn pending_subscription_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
101        self.pending_subscription_start_time = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>The day and time the pending change will be applied to the space, in coordinated universal time (UTC) timestamp format as specified in <a href="https://www.rfc-editor.org/rfc/rfc3339#section-5.6">RFC 3339</a>.</p>
105    pub fn set_pending_subscription_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
106        self.pending_subscription_start_time = input;
107        self
108    }
109    /// <p>The day and time the pending change will be applied to the space, in coordinated universal time (UTC) timestamp format as specified in <a href="https://www.rfc-editor.org/rfc/rfc3339#section-5.6">RFC 3339</a>.</p>
110    pub fn get_pending_subscription_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
111        &self.pending_subscription_start_time
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 [`GetSubscriptionOutput`](crate::operation::get_subscription::GetSubscriptionOutput).
123    pub fn build(self) -> crate::operation::get_subscription::GetSubscriptionOutput {
124        crate::operation::get_subscription::GetSubscriptionOutput {
125            subscription_type: self.subscription_type,
126            aws_account_name: self.aws_account_name,
127            pending_subscription_type: self.pending_subscription_type,
128            pending_subscription_start_time: self.pending_subscription_start_time,
129            _request_id: self._request_id,
130        }
131    }
132}