aws-sdk-mediaconnect 1.109.0

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

/// <p>A pricing agreement for a discounted rate for a specific outbound bandwidth that your MediaConnect account will use each month over a specific time period. The discounted rate in the reservation applies to outbound bandwidth for all flows from your account until your account reaches the amount of bandwidth in your reservation. If you use more outbound bandwidth than the agreed upon amount in a single month, the overage is charged at the on-demand rate.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Reservation {
    /// <p>The type of currency that is used for billing. The currencyCode used for your reservation is US dollars.</p>
    pub currency_code: ::std::option::Option<::std::string::String>,
    /// <p>The length of time that this reservation is active. MediaConnect defines this value in the offering.</p>
    pub duration: ::std::option::Option<i32>,
    /// <p>The unit of measurement for the duration of the reservation. MediaConnect defines this value in the offering.</p>
    pub duration_units: ::std::option::Option<crate::types::DurationUnits>,
    /// <p>The day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.</p>
    pub end: ::std::option::Option<::std::string::String>,
    /// <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. MediaConnect defines this value in 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. MediaConnect defines this value in the offering.</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. MediaConnect defines this value in the offering.</p>
    pub price_units: ::std::option::Option<crate::types::PriceUnits>,
    /// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.</p>
    pub reservation_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name that you assigned to the reservation when you purchased the offering.</p>
    pub reservation_name: ::std::option::Option<::std::string::String>,
    /// <p>The status of your reservation.</p>
    pub reservation_state: ::std::option::Option<crate::types::ReservationState>,
    /// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering. MediaConnect defines the values that make up the resourceSpecification in the offering.</p>
    pub resource_specification: ::std::option::Option<crate::types::ResourceSpecification>,
    /// <p>The day and time that the reservation becomes active. You set this value when you purchase the offering.</p>
    pub start: ::std::option::Option<::std::string::String>,
}
impl Reservation {
    /// <p>The type of currency that is used for billing. The currencyCode used for your reservation is US dollars.</p>
    pub fn currency_code(&self) -> ::std::option::Option<&str> {
        self.currency_code.as_deref()
    }
    /// <p>The length of time that this reservation is active. MediaConnect defines this value in the offering.</p>
    pub fn duration(&self) -> ::std::option::Option<i32> {
        self.duration
    }
    /// <p>The unit of measurement for the duration of the reservation. MediaConnect defines this value in the offering.</p>
    pub fn duration_units(&self) -> ::std::option::Option<&crate::types::DurationUnits> {
        self.duration_units.as_ref()
    }
    /// <p>The day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.</p>
    pub fn end(&self) -> ::std::option::Option<&str> {
        self.end.as_deref()
    }
    /// <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. MediaConnect defines this value in 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. MediaConnect defines this value in the offering.</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. MediaConnect defines this value in the offering.</p>
    pub fn price_units(&self) -> ::std::option::Option<&crate::types::PriceUnits> {
        self.price_units.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.</p>
    pub fn reservation_arn(&self) -> ::std::option::Option<&str> {
        self.reservation_arn.as_deref()
    }
    /// <p>The name that you assigned to the reservation when you purchased the offering.</p>
    pub fn reservation_name(&self) -> ::std::option::Option<&str> {
        self.reservation_name.as_deref()
    }
    /// <p>The status of your reservation.</p>
    pub fn reservation_state(&self) -> ::std::option::Option<&crate::types::ReservationState> {
        self.reservation_state.as_ref()
    }
    /// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering. MediaConnect defines the values that make up the resourceSpecification in the offering.</p>
    pub fn resource_specification(&self) -> ::std::option::Option<&crate::types::ResourceSpecification> {
        self.resource_specification.as_ref()
    }
    /// <p>The day and time that the reservation becomes active. You set this value when you purchase the offering.</p>
    pub fn start(&self) -> ::std::option::Option<&str> {
        self.start.as_deref()
    }
}
impl Reservation {
    /// Creates a new builder-style object to manufacture [`Reservation`](crate::types::Reservation).
    pub fn builder() -> crate::types::builders::ReservationBuilder {
        crate::types::builders::ReservationBuilder::default()
    }
}

/// A builder for [`Reservation`](crate::types::Reservation).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ReservationBuilder {
    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) end: ::std::option::Option<::std::string::String>,
    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) reservation_arn: ::std::option::Option<::std::string::String>,
    pub(crate) reservation_name: ::std::option::Option<::std::string::String>,
    pub(crate) reservation_state: ::std::option::Option<crate::types::ReservationState>,
    pub(crate) resource_specification: ::std::option::Option<crate::types::ResourceSpecification>,
    pub(crate) start: ::std::option::Option<::std::string::String>,
}
impl ReservationBuilder {
    /// <p>The type of currency that is used for billing. The currencyCode used for your reservation 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 your reservation 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 your reservation 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 this reservation is active. MediaConnect defines this value in the offering.</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 this reservation is active. MediaConnect defines this value in the offering.</p>
    pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
        self.duration = input;
        self
    }
    /// <p>The length of time that this reservation is active. MediaConnect defines this value in the offering.</p>
    pub fn get_duration(&self) -> &::std::option::Option<i32> {
        &self.duration
    }
    /// <p>The unit of measurement for the duration of the reservation. MediaConnect defines this value in 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 reservation. MediaConnect defines this value in 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 reservation. MediaConnect defines this value in the offering.</p>
    pub fn get_duration_units(&self) -> &::std::option::Option<crate::types::DurationUnits> {
        &self.duration_units
    }
    /// <p>The day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.</p>
    /// This field is required.
    pub fn end(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.end = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.</p>
    pub fn set_end(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.end = input;
        self
    }
    /// <p>The day and time that this reservation expires. This value is calculated based on the start date and time that you set and the offering's duration.</p>
    pub fn get_end(&self) -> &::std::option::Option<::std::string::String> {
        &self.end
    }
    /// <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. MediaConnect defines this value in 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. MediaConnect defines this value in 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. MediaConnect defines this value in 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. MediaConnect defines this value in the offering.</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. MediaConnect defines this value in the offering.</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. MediaConnect defines this value in the offering.</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. MediaConnect defines this value in the offering.</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. MediaConnect defines this value in the offering.</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. MediaConnect defines this value in the offering.</p>
    pub fn get_price_units(&self) -> &::std::option::Option<crate::types::PriceUnits> {
        &self.price_units
    }
    /// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.</p>
    /// This field is required.
    pub fn reservation_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reservation_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.</p>
    pub fn set_reservation_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reservation_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) that MediaConnect assigns to the reservation when you purchase an offering.</p>
    pub fn get_reservation_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.reservation_arn
    }
    /// <p>The name that you assigned to the reservation when you purchased the offering.</p>
    /// This field is required.
    pub fn reservation_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reservation_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name that you assigned to the reservation when you purchased the offering.</p>
    pub fn set_reservation_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reservation_name = input;
        self
    }
    /// <p>The name that you assigned to the reservation when you purchased the offering.</p>
    pub fn get_reservation_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.reservation_name
    }
    /// <p>The status of your reservation.</p>
    /// This field is required.
    pub fn reservation_state(mut self, input: crate::types::ReservationState) -> Self {
        self.reservation_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of your reservation.</p>
    pub fn set_reservation_state(mut self, input: ::std::option::Option<crate::types::ReservationState>) -> Self {
        self.reservation_state = input;
        self
    }
    /// <p>The status of your reservation.</p>
    pub fn get_reservation_state(&self) -> &::std::option::Option<crate::types::ReservationState> {
        &self.reservation_state
    }
    /// <p>A definition of the amount of outbound bandwidth that you would be reserving if you purchase the offering. MediaConnect defines the values that make up the resourceSpecification in 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. MediaConnect defines the values that make up the resourceSpecification in 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. MediaConnect defines the values that make up the resourceSpecification in the offering.</p>
    pub fn get_resource_specification(&self) -> &::std::option::Option<crate::types::ResourceSpecification> {
        &self.resource_specification
    }
    /// <p>The day and time that the reservation becomes active. You set this value when you purchase the offering.</p>
    /// This field is required.
    pub fn start(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.start = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The day and time that the reservation becomes active. You set this value when you purchase the offering.</p>
    pub fn set_start(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.start = input;
        self
    }
    /// <p>The day and time that the reservation becomes active. You set this value when you purchase the offering.</p>
    pub fn get_start(&self) -> &::std::option::Option<::std::string::String> {
        &self.start
    }
    /// Consumes the builder and constructs a [`Reservation`](crate::types::Reservation).
    pub fn build(self) -> crate::types::Reservation {
        crate::types::Reservation {
            currency_code: self.currency_code,
            duration: self.duration,
            duration_units: self.duration_units,
            end: self.end,
            offering_arn: self.offering_arn,
            offering_description: self.offering_description,
            price_per_unit: self.price_per_unit,
            price_units: self.price_units,
            reservation_arn: self.reservation_arn,
            reservation_name: self.reservation_name,
            reservation_state: self.reservation_state,
            resource_specification: self.resource_specification,
            start: self.start,
        }
    }
}