aws-sdk-mediaconvert 1.115.0

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

/// Use Rectangle to identify a specific area of the video frame.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Rectangle {
    /// Height of rectangle in pixels. Specify only even numbers.
    pub height: ::std::option::Option<i32>,
    /// Width of rectangle in pixels. Specify only even numbers.
    pub width: ::std::option::Option<i32>,
    /// The distance, in pixels, between the rectangle and the left edge of the video frame. Specify only even numbers.
    pub x: ::std::option::Option<i32>,
    /// The distance, in pixels, between the rectangle and the top edge of the video frame. Specify only even numbers.
    pub y: ::std::option::Option<i32>,
}
impl Rectangle {
    /// Height of rectangle in pixels. Specify only even numbers.
    pub fn height(&self) -> ::std::option::Option<i32> {
        self.height
    }
    /// Width of rectangle in pixels. Specify only even numbers.
    pub fn width(&self) -> ::std::option::Option<i32> {
        self.width
    }
    /// The distance, in pixels, between the rectangle and the left edge of the video frame. Specify only even numbers.
    pub fn x(&self) -> ::std::option::Option<i32> {
        self.x
    }
    /// The distance, in pixels, between the rectangle and the top edge of the video frame. Specify only even numbers.
    pub fn y(&self) -> ::std::option::Option<i32> {
        self.y
    }
}
impl Rectangle {
    /// Creates a new builder-style object to manufacture [`Rectangle`](crate::types::Rectangle).
    pub fn builder() -> crate::types::builders::RectangleBuilder {
        crate::types::builders::RectangleBuilder::default()
    }
}

/// A builder for [`Rectangle`](crate::types::Rectangle).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RectangleBuilder {
    pub(crate) height: ::std::option::Option<i32>,
    pub(crate) width: ::std::option::Option<i32>,
    pub(crate) x: ::std::option::Option<i32>,
    pub(crate) y: ::std::option::Option<i32>,
}
impl RectangleBuilder {
    /// Height of rectangle in pixels. Specify only even numbers.
    pub fn height(mut self, input: i32) -> Self {
        self.height = ::std::option::Option::Some(input);
        self
    }
    /// Height of rectangle in pixels. Specify only even numbers.
    pub fn set_height(mut self, input: ::std::option::Option<i32>) -> Self {
        self.height = input;
        self
    }
    /// Height of rectangle in pixels. Specify only even numbers.
    pub fn get_height(&self) -> &::std::option::Option<i32> {
        &self.height
    }
    /// Width of rectangle in pixels. Specify only even numbers.
    pub fn width(mut self, input: i32) -> Self {
        self.width = ::std::option::Option::Some(input);
        self
    }
    /// Width of rectangle in pixels. Specify only even numbers.
    pub fn set_width(mut self, input: ::std::option::Option<i32>) -> Self {
        self.width = input;
        self
    }
    /// Width of rectangle in pixels. Specify only even numbers.
    pub fn get_width(&self) -> &::std::option::Option<i32> {
        &self.width
    }
    /// The distance, in pixels, between the rectangle and the left edge of the video frame. Specify only even numbers.
    pub fn x(mut self, input: i32) -> Self {
        self.x = ::std::option::Option::Some(input);
        self
    }
    /// The distance, in pixels, between the rectangle and the left edge of the video frame. Specify only even numbers.
    pub fn set_x(mut self, input: ::std::option::Option<i32>) -> Self {
        self.x = input;
        self
    }
    /// The distance, in pixels, between the rectangle and the left edge of the video frame. Specify only even numbers.
    pub fn get_x(&self) -> &::std::option::Option<i32> {
        &self.x
    }
    /// The distance, in pixels, between the rectangle and the top edge of the video frame. Specify only even numbers.
    pub fn y(mut self, input: i32) -> Self {
        self.y = ::std::option::Option::Some(input);
        self
    }
    /// The distance, in pixels, between the rectangle and the top edge of the video frame. Specify only even numbers.
    pub fn set_y(mut self, input: ::std::option::Option<i32>) -> Self {
        self.y = input;
        self
    }
    /// The distance, in pixels, between the rectangle and the top edge of the video frame. Specify only even numbers.
    pub fn get_y(&self) -> &::std::option::Option<i32> {
        &self.y
    }
    /// Consumes the builder and constructs a [`Rectangle`](crate::types::Rectangle).
    pub fn build(self) -> crate::types::Rectangle {
        crate::types::Rectangle {
            height: self.height,
            width: self.width,
            x: self.x,
            y: self.y,
        }
    }
}