aws_sdk_iotwireless/operation/update_position/
_update_position_input.rs

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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[deprecated(note = "This operation is no longer supported.")]
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdatePositionInput {
    /// <p>Resource identifier of the resource for which position is updated.</p>
    pub resource_identifier: ::std::option::Option<::std::string::String>,
    /// <p>Resource type of the resource for which position is updated.</p>
    pub resource_type: ::std::option::Option<crate::types::PositionResourceType>,
    /// <p>The position information of the resource.</p>
    pub position: ::std::option::Option<::std::vec::Vec<f32>>,
}
impl UpdatePositionInput {
    /// <p>Resource identifier of the resource for which position is updated.</p>
    pub fn resource_identifier(&self) -> ::std::option::Option<&str> {
        self.resource_identifier.as_deref()
    }
    /// <p>Resource type of the resource for which position is updated.</p>
    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::PositionResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The position information of the resource.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.position.is_none()`.
    pub fn position(&self) -> &[f32] {
        self.position.as_deref().unwrap_or_default()
    }
}
impl UpdatePositionInput {
    /// Creates a new builder-style object to manufacture [`UpdatePositionInput`](crate::operation::update_position::UpdatePositionInput).
    pub fn builder() -> crate::operation::update_position::builders::UpdatePositionInputBuilder {
        crate::operation::update_position::builders::UpdatePositionInputBuilder::default()
    }
}

/// A builder for [`UpdatePositionInput`](crate::operation::update_position::UpdatePositionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdatePositionInputBuilder {
    pub(crate) resource_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) resource_type: ::std::option::Option<crate::types::PositionResourceType>,
    pub(crate) position: ::std::option::Option<::std::vec::Vec<f32>>,
}
impl UpdatePositionInputBuilder {
    /// <p>Resource identifier of the resource for which position is updated.</p>
    /// This field is required.
    pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Resource identifier of the resource for which position is updated.</p>
    pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_identifier = input;
        self
    }
    /// <p>Resource identifier of the resource for which position is updated.</p>
    pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_identifier
    }
    /// <p>Resource type of the resource for which position is updated.</p>
    /// This field is required.
    pub fn resource_type(mut self, input: crate::types::PositionResourceType) -> Self {
        self.resource_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Resource type of the resource for which position is updated.</p>
    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::PositionResourceType>) -> Self {
        self.resource_type = input;
        self
    }
    /// <p>Resource type of the resource for which position is updated.</p>
    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::PositionResourceType> {
        &self.resource_type
    }
    /// Appends an item to `position`.
    ///
    /// To override the contents of this collection use [`set_position`](Self::set_position).
    ///
    /// <p>The position information of the resource.</p>
    pub fn position(mut self, input: f32) -> Self {
        let mut v = self.position.unwrap_or_default();
        v.push(input);
        self.position = ::std::option::Option::Some(v);
        self
    }
    /// <p>The position information of the resource.</p>
    pub fn set_position(mut self, input: ::std::option::Option<::std::vec::Vec<f32>>) -> Self {
        self.position = input;
        self
    }
    /// <p>The position information of the resource.</p>
    pub fn get_position(&self) -> &::std::option::Option<::std::vec::Vec<f32>> {
        &self.position
    }
    /// Consumes the builder and constructs a [`UpdatePositionInput`](crate::operation::update_position::UpdatePositionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_position::UpdatePositionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_position::UpdatePositionInput {
            resource_identifier: self.resource_identifier,
            resource_type: self.resource_type,
            position: self.position,
        })
    }
}