1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// 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).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
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,
}
}
}