#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutCustomChargesOutput {
pub billing_period_start_at: ::aws_smithy_types::DateTime,
pub billing_period_end_at: ::aws_smithy_types::DateTime,
_request_id: Option<String>,
}
impl PutCustomChargesOutput {
pub fn billing_period_start_at(&self) -> &::aws_smithy_types::DateTime {
&self.billing_period_start_at
}
pub fn billing_period_end_at(&self) -> &::aws_smithy_types::DateTime {
&self.billing_period_end_at
}
}
impl ::aws_types::request_id::RequestId for PutCustomChargesOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl PutCustomChargesOutput {
pub fn builder() -> crate::operation::put_custom_charges::builders::PutCustomChargesOutputBuilder {
crate::operation::put_custom_charges::builders::PutCustomChargesOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutCustomChargesOutputBuilder {
pub(crate) billing_period_start_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) billing_period_end_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl PutCustomChargesOutputBuilder {
pub fn billing_period_start_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.billing_period_start_at = ::std::option::Option::Some(input);
self
}
pub fn set_billing_period_start_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.billing_period_start_at = input;
self
}
pub fn get_billing_period_start_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.billing_period_start_at
}
pub fn billing_period_end_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.billing_period_end_at = ::std::option::Option::Some(input);
self
}
pub fn set_billing_period_end_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.billing_period_end_at = input;
self
}
pub fn get_billing_period_end_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.billing_period_end_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,
) -> ::std::result::Result<crate::operation::put_custom_charges::PutCustomChargesOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::put_custom_charges::PutCustomChargesOutput {
billing_period_start_at: self.billing_period_start_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"billing_period_start_at",
"billing_period_start_at was not specified but it is required when building PutCustomChargesOutput",
)
})?,
billing_period_end_at: self.billing_period_end_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"billing_period_end_at",
"billing_period_end_at was not specified but it is required when building PutCustomChargesOutput",
)
})?,
_request_id: self._request_id,
})
}
}