aws-sdk-iam 1.109.0

AWS SDK for AWS Identity and Access Management
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains the row and column of a location of a <code>Statement</code> element in a policy document.</p>
/// <p>This data type is used as a member of the <code> <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_Statement.html">Statement</a> </code> type.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Position {
    /// <p>The line containing the specified position in the document.</p>
    pub line: i32,
    /// <p>The column in the line containing the specified position in the document.</p>
    pub column: i32,
}
impl Position {
    /// <p>The line containing the specified position in the document.</p>
    pub fn line(&self) -> i32 {
        self.line
    }
    /// <p>The column in the line containing the specified position in the document.</p>
    pub fn column(&self) -> i32 {
        self.column
    }
}
impl Position {
    /// Creates a new builder-style object to manufacture [`Position`](crate::types::Position).
    pub fn builder() -> crate::types::builders::PositionBuilder {
        crate::types::builders::PositionBuilder::default()
    }
}

/// A builder for [`Position`](crate::types::Position).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PositionBuilder {
    pub(crate) line: ::std::option::Option<i32>,
    pub(crate) column: ::std::option::Option<i32>,
}
impl PositionBuilder {
    /// <p>The line containing the specified position in the document.</p>
    pub fn line(mut self, input: i32) -> Self {
        self.line = ::std::option::Option::Some(input);
        self
    }
    /// <p>The line containing the specified position in the document.</p>
    pub fn set_line(mut self, input: ::std::option::Option<i32>) -> Self {
        self.line = input;
        self
    }
    /// <p>The line containing the specified position in the document.</p>
    pub fn get_line(&self) -> &::std::option::Option<i32> {
        &self.line
    }
    /// <p>The column in the line containing the specified position in the document.</p>
    pub fn column(mut self, input: i32) -> Self {
        self.column = ::std::option::Option::Some(input);
        self
    }
    /// <p>The column in the line containing the specified position in the document.</p>
    pub fn set_column(mut self, input: ::std::option::Option<i32>) -> Self {
        self.column = input;
        self
    }
    /// <p>The column in the line containing the specified position in the document.</p>
    pub fn get_column(&self) -> &::std::option::Option<i32> {
        &self.column
    }
    /// Consumes the builder and constructs a [`Position`](crate::types::Position).
    pub fn build(self) -> crate::types::Position {
        crate::types::Position {
            line: self.line.unwrap_or_default(),
            column: self.column.unwrap_or_default(),
        }
    }
}