aws-sdk-sagemaker 1.189.0

AWS SDK for Amazon SageMaker Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents an amount of money in United States dollars.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Usd {
    /// <p>The whole number of dollars in the amount.</p>
    pub dollars: ::std::option::Option<i32>,
    /// <p>The fractional portion, in cents, of the amount.</p>
    pub cents: ::std::option::Option<i32>,
    /// <p>Fractions of a cent, in tenths.</p>
    pub tenth_fractions_of_a_cent: ::std::option::Option<i32>,
}
impl Usd {
    /// <p>The whole number of dollars in the amount.</p>
    pub fn dollars(&self) -> ::std::option::Option<i32> {
        self.dollars
    }
    /// <p>The fractional portion, in cents, of the amount.</p>
    pub fn cents(&self) -> ::std::option::Option<i32> {
        self.cents
    }
    /// <p>Fractions of a cent, in tenths.</p>
    pub fn tenth_fractions_of_a_cent(&self) -> ::std::option::Option<i32> {
        self.tenth_fractions_of_a_cent
    }
}
impl Usd {
    /// Creates a new builder-style object to manufacture [`Usd`](crate::types::Usd).
    pub fn builder() -> crate::types::builders::UsdBuilder {
        crate::types::builders::UsdBuilder::default()
    }
}

/// A builder for [`Usd`](crate::types::Usd).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UsdBuilder {
    pub(crate) dollars: ::std::option::Option<i32>,
    pub(crate) cents: ::std::option::Option<i32>,
    pub(crate) tenth_fractions_of_a_cent: ::std::option::Option<i32>,
}
impl UsdBuilder {
    /// <p>The whole number of dollars in the amount.</p>
    pub fn dollars(mut self, input: i32) -> Self {
        self.dollars = ::std::option::Option::Some(input);
        self
    }
    /// <p>The whole number of dollars in the amount.</p>
    pub fn set_dollars(mut self, input: ::std::option::Option<i32>) -> Self {
        self.dollars = input;
        self
    }
    /// <p>The whole number of dollars in the amount.</p>
    pub fn get_dollars(&self) -> &::std::option::Option<i32> {
        &self.dollars
    }
    /// <p>The fractional portion, in cents, of the amount.</p>
    pub fn cents(mut self, input: i32) -> Self {
        self.cents = ::std::option::Option::Some(input);
        self
    }
    /// <p>The fractional portion, in cents, of the amount.</p>
    pub fn set_cents(mut self, input: ::std::option::Option<i32>) -> Self {
        self.cents = input;
        self
    }
    /// <p>The fractional portion, in cents, of the amount.</p>
    pub fn get_cents(&self) -> &::std::option::Option<i32> {
        &self.cents
    }
    /// <p>Fractions of a cent, in tenths.</p>
    pub fn tenth_fractions_of_a_cent(mut self, input: i32) -> Self {
        self.tenth_fractions_of_a_cent = ::std::option::Option::Some(input);
        self
    }
    /// <p>Fractions of a cent, in tenths.</p>
    pub fn set_tenth_fractions_of_a_cent(mut self, input: ::std::option::Option<i32>) -> Self {
        self.tenth_fractions_of_a_cent = input;
        self
    }
    /// <p>Fractions of a cent, in tenths.</p>
    pub fn get_tenth_fractions_of_a_cent(&self) -> &::std::option::Option<i32> {
        &self.tenth_fractions_of_a_cent
    }
    /// Consumes the builder and constructs a [`Usd`](crate::types::Usd).
    pub fn build(self) -> crate::types::Usd {
        crate::types::Usd {
            dollars: self.dollars,
            cents: self.cents,
            tenth_fractions_of_a_cent: self.tenth_fractions_of_a_cent,
        }
    }
}