#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ReturnSavingsPlanInput {
pub savings_plan_id: ::std::option::Option<::std::string::String>,
pub client_token: ::std::option::Option<::std::string::String>,
}
impl ReturnSavingsPlanInput {
pub fn savings_plan_id(&self) -> ::std::option::Option<&str> {
self.savings_plan_id.as_deref()
}
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl ReturnSavingsPlanInput {
pub fn builder() -> crate::operation::return_savings_plan::builders::ReturnSavingsPlanInputBuilder {
crate::operation::return_savings_plan::builders::ReturnSavingsPlanInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ReturnSavingsPlanInputBuilder {
pub(crate) savings_plan_id: ::std::option::Option<::std::string::String>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl ReturnSavingsPlanInputBuilder {
pub fn savings_plan_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.savings_plan_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_savings_plan_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.savings_plan_id = input;
self
}
pub fn get_savings_plan_id(&self) -> &::std::option::Option<::std::string::String> {
&self.savings_plan_id
}
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::return_savings_plan::ReturnSavingsPlanInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::return_savings_plan::ReturnSavingsPlanInput {
savings_plan_id: self.savings_plan_id,
client_token: self.client_token,
})
}
}