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
// 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> <code>Statement</code> </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>
    #[doc(hidden)]
    pub line: i32,
    /// <p>The column in the line containing the specified position in the document.</p>
    #[doc(hidden)]
    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).
#[non_exhaustive]
#[derive(
    ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug,
)]
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 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
    }
    /// 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(),
        }
    }
}