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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents the screen resolution of a device in height and width, expressed in pixels.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Resolution {
/// <p>The screen resolution's width, expressed in pixels.</p>
pub width: ::std::option::Option<i32>,
/// <p>The screen resolution's height, expressed in pixels.</p>
pub height: ::std::option::Option<i32>,
}
impl Resolution {
/// <p>The screen resolution's width, expressed in pixels.</p>
pub fn width(&self) -> ::std::option::Option<i32> {
self.width
}
/// <p>The screen resolution's height, expressed in pixels.</p>
pub fn height(&self) -> ::std::option::Option<i32> {
self.height
}
}
impl Resolution {
/// Creates a new builder-style object to manufacture [`Resolution`](crate::types::Resolution).
pub fn builder() -> crate::types::builders::ResolutionBuilder {
crate::types::builders::ResolutionBuilder::default()
}
}
/// A builder for [`Resolution`](crate::types::Resolution).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ResolutionBuilder {
pub(crate) width: ::std::option::Option<i32>,
pub(crate) height: ::std::option::Option<i32>,
}
impl ResolutionBuilder {
/// <p>The screen resolution's width, expressed in pixels.</p>
pub fn width(mut self, input: i32) -> Self {
self.width = ::std::option::Option::Some(input);
self
}
/// <p>The screen resolution's width, expressed in pixels.</p>
pub fn set_width(mut self, input: ::std::option::Option<i32>) -> Self {
self.width = input;
self
}
/// <p>The screen resolution's width, expressed in pixels.</p>
pub fn get_width(&self) -> &::std::option::Option<i32> {
&self.width
}
/// <p>The screen resolution's height, expressed in pixels.</p>
pub fn height(mut self, input: i32) -> Self {
self.height = ::std::option::Option::Some(input);
self
}
/// <p>The screen resolution's height, expressed in pixels.</p>
pub fn set_height(mut self, input: ::std::option::Option<i32>) -> Self {
self.height = input;
self
}
/// <p>The screen resolution's height, expressed in pixels.</p>
pub fn get_height(&self) -> &::std::option::Option<i32> {
&self.height
}
/// Consumes the builder and constructs a [`Resolution`](crate::types::Resolution).
pub fn build(self) -> crate::types::Resolution {
crate::types::Resolution {
width: self.width,
height: self.height,
}
}
}