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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The X and Y coordinates of a point on a document page.</p>
/// <p>For additional information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/API_Point.html">Point</a> in the Amazon Textract API reference.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Point {
/// <p>The value of the X coordinate for a point on a polygon</p>
pub x: ::std::option::Option<f32>,
/// <p>The value of the Y coordinate for a point on a polygon</p>
pub y: ::std::option::Option<f32>,
}
impl Point {
/// <p>The value of the X coordinate for a point on a polygon</p>
pub fn x(&self) -> ::std::option::Option<f32> {
self.x
}
/// <p>The value of the Y coordinate for a point on a polygon</p>
pub fn y(&self) -> ::std::option::Option<f32> {
self.y
}
}
impl Point {
/// Creates a new builder-style object to manufacture [`Point`](crate::types::Point).
pub fn builder() -> crate::types::builders::PointBuilder {
crate::types::builders::PointBuilder::default()
}
}
/// A builder for [`Point`](crate::types::Point).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PointBuilder {
pub(crate) x: ::std::option::Option<f32>,
pub(crate) y: ::std::option::Option<f32>,
}
impl PointBuilder {
/// <p>The value of the X coordinate for a point on a polygon</p>
pub fn x(mut self, input: f32) -> Self {
self.x = ::std::option::Option::Some(input);
self
}
/// <p>The value of the X coordinate for a point on a polygon</p>
pub fn set_x(mut self, input: ::std::option::Option<f32>) -> Self {
self.x = input;
self
}
/// <p>The value of the X coordinate for a point on a polygon</p>
pub fn get_x(&self) -> &::std::option::Option<f32> {
&self.x
}
/// <p>The value of the Y coordinate for a point on a polygon</p>
pub fn y(mut self, input: f32) -> Self {
self.y = ::std::option::Option::Some(input);
self
}
/// <p>The value of the Y coordinate for a point on a polygon</p>
pub fn set_y(mut self, input: ::std::option::Option<f32>) -> Self {
self.y = input;
self
}
/// <p>The value of the Y coordinate for a point on a polygon</p>
pub fn get_y(&self) -> &::std::option::Option<f32> {
&self.y
}
/// Consumes the builder and constructs a [`Point`](crate::types::Point).
pub fn build(self) -> crate::types::Point {
crate::types::Point { x: self.x, y: self.y }
}
}