aws-sdk-mediaconnect 1.80.0

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

/// <p>A savings plan that reserves a certain amount of outbound bandwidth usage at a discounted rate each month over a period of time.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Offering {
    /// <p>The type of currency that is used for billing. The currencyCode used for all reservations is US dollars.</p>
    pub currency_code: ::std::option::Option<::std::string::String>,
    /// <p>The length of time that your reservation would be active.</p>
    pub duration: ::std::option::Option<i32>,
    /// <p>The unit of measurement for the duration of the offering.</p>
    pub duration_units: ::std::option::Option<crate::types::DurationUnits>,
    /// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.</p>
    pub offering_arn: ::std::option::Option<::std::string::String>,
    /// <p>A description of the offering.</p>
    pub offering_description: ::std::option::Option<::std::string::String>,
    /// <p>The cost of a single unit. This value, in combination with priceUnits, makes up the rate.</p>
    pub price_per_unit: ::std::option::Option<::std::string::String>,
    /// <p>The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate.</p>
    pub price_units: ::std::option::Option<crate::types::PriceUnits>,
    /// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering.</p>
    pub resource_specification: ::std::option::Option<crate::types::ResourceSpecification>,
}
impl Offering {
    /// <p>The type of currency that is used for billing. The currencyCode used for all reservations is US dollars.</p>
    pub fn currency_code(&self) -> ::std::option::Option<&str> {
        self.currency_code.as_deref()
    }
    /// <p>The length of time that your reservation would be active.</p>
    pub fn duration(&self) -> ::std::option::Option<i32> {
        self.duration
    }
    /// <p>The unit of measurement for the duration of the offering.</p>
    pub fn duration_units(&self) -> ::std::option::Option<&crate::types::DurationUnits> {
        self.duration_units.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.</p>
    pub fn offering_arn(&self) -> ::std::option::Option<&str> {
        self.offering_arn.as_deref()
    }
    /// <p>A description of the offering.</p>
    pub fn offering_description(&self) -> ::std::option::Option<&str> {
        self.offering_description.as_deref()
    }
    /// <p>The cost of a single unit. This value, in combination with priceUnits, makes up the rate.</p>
    pub fn price_per_unit(&self) -> ::std::option::Option<&str> {
        self.price_per_unit.as_deref()
    }
    /// <p>The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate.</p>
    pub fn price_units(&self) -> ::std::option::Option<&crate::types::PriceUnits> {
        self.price_units.as_ref()
    }
    /// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering.</p>
    pub fn resource_specification(&self) -> ::std::option::Option<&crate::types::ResourceSpecification> {
        self.resource_specification.as_ref()
    }
}
impl Offering {
    /// Creates a new builder-style object to manufacture [`Offering`](crate::types::Offering).
    pub fn builder() -> crate::types::builders::OfferingBuilder {
        crate::types::builders::OfferingBuilder::default()
    }
}

/// A builder for [`Offering`](crate::types::Offering).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct OfferingBuilder {
    pub(crate) currency_code: ::std::option::Option<::std::string::String>,
    pub(crate) duration: ::std::option::Option<i32>,
    pub(crate) duration_units: ::std::option::Option<crate::types::DurationUnits>,
    pub(crate) offering_arn: ::std::option::Option<::std::string::String>,
    pub(crate) offering_description: ::std::option::Option<::std::string::String>,
    pub(crate) price_per_unit: ::std::option::Option<::std::string::String>,
    pub(crate) price_units: ::std::option::Option<crate::types::PriceUnits>,
    pub(crate) resource_specification: ::std::option::Option<crate::types::ResourceSpecification>,
}
impl OfferingBuilder {
    /// <p>The type of currency that is used for billing. The currencyCode used for all reservations is US dollars.</p>
    /// This field is required.
    pub fn currency_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.currency_code = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of currency that is used for billing. The currencyCode used for all reservations is US dollars.</p>
    pub fn set_currency_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.currency_code = input;
        self
    }
    /// <p>The type of currency that is used for billing. The currencyCode used for all reservations is US dollars.</p>
    pub fn get_currency_code(&self) -> &::std::option::Option<::std::string::String> {
        &self.currency_code
    }
    /// <p>The length of time that your reservation would be active.</p>
    /// This field is required.
    pub fn duration(mut self, input: i32) -> Self {
        self.duration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The length of time that your reservation would be active.</p>
    pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
        self.duration = input;
        self
    }
    /// <p>The length of time that your reservation would be active.</p>
    pub fn get_duration(&self) -> &::std::option::Option<i32> {
        &self.duration
    }
    /// <p>The unit of measurement for the duration of the offering.</p>
    /// This field is required.
    pub fn duration_units(mut self, input: crate::types::DurationUnits) -> Self {
        self.duration_units = ::std::option::Option::Some(input);
        self
    }
    /// <p>The unit of measurement for the duration of the offering.</p>
    pub fn set_duration_units(mut self, input: ::std::option::Option<crate::types::DurationUnits>) -> Self {
        self.duration_units = input;
        self
    }
    /// <p>The unit of measurement for the duration of the offering.</p>
    pub fn get_duration_units(&self) -> &::std::option::Option<crate::types::DurationUnits> {
        &self.duration_units
    }
    /// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.</p>
    /// This field is required.
    pub fn offering_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.offering_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.</p>
    pub fn set_offering_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.offering_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the offering.</p>
    pub fn get_offering_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.offering_arn
    }
    /// <p>A description of the offering.</p>
    /// This field is required.
    pub fn offering_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.offering_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the offering.</p>
    pub fn set_offering_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.offering_description = input;
        self
    }
    /// <p>A description of the offering.</p>
    pub fn get_offering_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.offering_description
    }
    /// <p>The cost of a single unit. This value, in combination with priceUnits, makes up the rate.</p>
    /// This field is required.
    pub fn price_per_unit(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.price_per_unit = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The cost of a single unit. This value, in combination with priceUnits, makes up the rate.</p>
    pub fn set_price_per_unit(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.price_per_unit = input;
        self
    }
    /// <p>The cost of a single unit. This value, in combination with priceUnits, makes up the rate.</p>
    pub fn get_price_per_unit(&self) -> &::std::option::Option<::std::string::String> {
        &self.price_per_unit
    }
    /// <p>The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate.</p>
    /// This field is required.
    pub fn price_units(mut self, input: crate::types::PriceUnits) -> Self {
        self.price_units = ::std::option::Option::Some(input);
        self
    }
    /// <p>The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate.</p>
    pub fn set_price_units(mut self, input: ::std::option::Option<crate::types::PriceUnits>) -> Self {
        self.price_units = input;
        self
    }
    /// <p>The unit of measurement that is used for billing. This value, in combination with pricePerUnit, makes up the rate.</p>
    pub fn get_price_units(&self) -> &::std::option::Option<crate::types::PriceUnits> {
        &self.price_units
    }
    /// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering.</p>
    /// This field is required.
    pub fn resource_specification(mut self, input: crate::types::ResourceSpecification) -> Self {
        self.resource_specification = ::std::option::Option::Some(input);
        self
    }
    /// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering.</p>
    pub fn set_resource_specification(mut self, input: ::std::option::Option<crate::types::ResourceSpecification>) -> Self {
        self.resource_specification = input;
        self
    }
    /// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering.</p>
    pub fn get_resource_specification(&self) -> &::std::option::Option<crate::types::ResourceSpecification> {
        &self.resource_specification
    }
    /// Consumes the builder and constructs a [`Offering`](crate::types::Offering).
    pub fn build(self) -> crate::types::Offering {
        crate::types::Offering {
            currency_code: self.currency_code,
            duration: self.duration,
            duration_units: self.duration_units,
            offering_arn: self.offering_arn,
            offering_description: self.offering_description,
            price_per_unit: self.price_per_unit,
            price_units: self.price_units,
            resource_specification: self.resource_specification,
        }
    }
}