#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetSubscriptionOutput {
pub subscription: ::std::option::Option<crate::types::Subscription>,
pub pending_change: ::std::option::Option<crate::types::PendingChange>,
pub current_period_ends_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetSubscriptionOutput {
pub fn subscription(&self) -> ::std::option::Option<&crate::types::Subscription> {
self.subscription.as_ref()
}
pub fn pending_change(&self) -> ::std::option::Option<&crate::types::PendingChange> {
self.pending_change.as_ref()
}
pub fn current_period_ends_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.current_period_ends_at.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetSubscriptionOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetSubscriptionOutput {
pub fn builder() -> crate::operation::get_subscription::builders::GetSubscriptionOutputBuilder {
crate::operation::get_subscription::builders::GetSubscriptionOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSubscriptionOutputBuilder {
pub(crate) subscription: ::std::option::Option<crate::types::Subscription>,
pub(crate) pending_change: ::std::option::Option<crate::types::PendingChange>,
pub(crate) current_period_ends_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetSubscriptionOutputBuilder {
pub fn subscription(mut self, input: crate::types::Subscription) -> Self {
self.subscription = ::std::option::Option::Some(input);
self
}
pub fn set_subscription(mut self, input: ::std::option::Option<crate::types::Subscription>) -> Self {
self.subscription = input;
self
}
pub fn get_subscription(&self) -> &::std::option::Option<crate::types::Subscription> {
&self.subscription
}
pub fn pending_change(mut self, input: crate::types::PendingChange) -> Self {
self.pending_change = ::std::option::Option::Some(input);
self
}
pub fn set_pending_change(mut self, input: ::std::option::Option<crate::types::PendingChange>) -> Self {
self.pending_change = input;
self
}
pub fn get_pending_change(&self) -> &::std::option::Option<crate::types::PendingChange> {
&self.pending_change
}
pub fn current_period_ends_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.current_period_ends_at = ::std::option::Option::Some(input);
self
}
pub fn set_current_period_ends_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.current_period_ends_at = input;
self
}
pub fn get_current_period_ends_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.current_period_ends_at
}
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
}
pub fn build(self) -> crate::operation::get_subscription::GetSubscriptionOutput {
crate::operation::get_subscription::GetSubscriptionOutput {
subscription: self.subscription,
pending_change: self.pending_change,
current_period_ends_at: self.current_period_ends_at,
_request_id: self._request_id,
}
}
}