aws-sdk-comprehend 1.98.0

AWS SDK for Amazon Comprehend
Documentation
// 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 }
    }
}