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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct PutGeofenceInput {
/// <p>The geofence collection to store the geofence in.</p>
pub collection_name: ::std::option::Option<::std::string::String>,
/// <p>An identifier for the geofence. For example, <code>ExampleGeofence-1</code>.</p>
pub geofence_id: ::std::option::Option<::std::string::String>,
/// <p>Contains the details to specify the position of the geofence. Can be a polygon, a circle or a polygon encoded in Geobuf format. Including multiple selections will return a validation error.</p><note>
/// <p>The <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> format supports a maximum of 1,000 vertices. The <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html">Geofence Geobuf</a> format supports a maximum of 100,000 vertices.</p>
/// </note>
pub geometry: ::std::option::Option<crate::types::GeofenceGeometry>,
/// <p>Associates one of more properties with the geofence. A property is a key-value pair stored with the geofence and added to any geofence event triggered with that geofence.</p>
/// <p>Format: <code>"key" : "value"</code></p>
pub geofence_properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl PutGeofenceInput {
/// <p>The geofence collection to store the geofence in.</p>
pub fn collection_name(&self) -> ::std::option::Option<&str> {
self.collection_name.as_deref()
}
/// <p>An identifier for the geofence. For example, <code>ExampleGeofence-1</code>.</p>
pub fn geofence_id(&self) -> ::std::option::Option<&str> {
self.geofence_id.as_deref()
}
/// <p>Contains the details to specify the position of the geofence. Can be a polygon, a circle or a polygon encoded in Geobuf format. Including multiple selections will return a validation error.</p><note>
/// <p>The <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> format supports a maximum of 1,000 vertices. The <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html">Geofence Geobuf</a> format supports a maximum of 100,000 vertices.</p>
/// </note>
pub fn geometry(&self) -> ::std::option::Option<&crate::types::GeofenceGeometry> {
self.geometry.as_ref()
}
/// <p>Associates one of more properties with the geofence. A property is a key-value pair stored with the geofence and added to any geofence event triggered with that geofence.</p>
/// <p>Format: <code>"key" : "value"</code></p>
pub fn geofence_properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.geofence_properties.as_ref()
}
}
impl ::std::fmt::Debug for PutGeofenceInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("PutGeofenceInput");
formatter.field("collection_name", &self.collection_name);
formatter.field("geofence_id", &self.geofence_id);
formatter.field("geometry", &self.geometry);
formatter.field("geofence_properties", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl PutGeofenceInput {
/// Creates a new builder-style object to manufacture [`PutGeofenceInput`](crate::operation::put_geofence::PutGeofenceInput).
pub fn builder() -> crate::operation::put_geofence::builders::PutGeofenceInputBuilder {
crate::operation::put_geofence::builders::PutGeofenceInputBuilder::default()
}
}
/// A builder for [`PutGeofenceInput`](crate::operation::put_geofence::PutGeofenceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct PutGeofenceInputBuilder {
pub(crate) collection_name: ::std::option::Option<::std::string::String>,
pub(crate) geofence_id: ::std::option::Option<::std::string::String>,
pub(crate) geometry: ::std::option::Option<crate::types::GeofenceGeometry>,
pub(crate) geofence_properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl PutGeofenceInputBuilder {
/// <p>The geofence collection to store the geofence in.</p>
/// This field is required.
pub fn collection_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.collection_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The geofence collection to store the geofence in.</p>
pub fn set_collection_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.collection_name = input;
self
}
/// <p>The geofence collection to store the geofence in.</p>
pub fn get_collection_name(&self) -> &::std::option::Option<::std::string::String> {
&self.collection_name
}
/// <p>An identifier for the geofence. For example, <code>ExampleGeofence-1</code>.</p>
/// This field is required.
pub fn geofence_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.geofence_id = ::std::option::Option::Some(input.into());
self
}
/// <p>An identifier for the geofence. For example, <code>ExampleGeofence-1</code>.</p>
pub fn set_geofence_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.geofence_id = input;
self
}
/// <p>An identifier for the geofence. For example, <code>ExampleGeofence-1</code>.</p>
pub fn get_geofence_id(&self) -> &::std::option::Option<::std::string::String> {
&self.geofence_id
}
/// <p>Contains the details to specify the position of the geofence. Can be a polygon, a circle or a polygon encoded in Geobuf format. Including multiple selections will return a validation error.</p><note>
/// <p>The <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> format supports a maximum of 1,000 vertices. The <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html">Geofence Geobuf</a> format supports a maximum of 100,000 vertices.</p>
/// </note>
/// This field is required.
pub fn geometry(mut self, input: crate::types::GeofenceGeometry) -> Self {
self.geometry = ::std::option::Option::Some(input);
self
}
/// <p>Contains the details to specify the position of the geofence. Can be a polygon, a circle or a polygon encoded in Geobuf format. Including multiple selections will return a validation error.</p><note>
/// <p>The <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> format supports a maximum of 1,000 vertices. The <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html">Geofence Geobuf</a> format supports a maximum of 100,000 vertices.</p>
/// </note>
pub fn set_geometry(mut self, input: ::std::option::Option<crate::types::GeofenceGeometry>) -> Self {
self.geometry = input;
self
}
/// <p>Contains the details to specify the position of the geofence. Can be a polygon, a circle or a polygon encoded in Geobuf format. Including multiple selections will return a validation error.</p><note>
/// <p>The <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> format supports a maximum of 1,000 vertices. The <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html">Geofence Geobuf</a> format supports a maximum of 100,000 vertices.</p>
/// </note>
pub fn get_geometry(&self) -> &::std::option::Option<crate::types::GeofenceGeometry> {
&self.geometry
}
/// Adds a key-value pair to `geofence_properties`.
///
/// To override the contents of this collection use [`set_geofence_properties`](Self::set_geofence_properties).
///
/// <p>Associates one of more properties with the geofence. A property is a key-value pair stored with the geofence and added to any geofence event triggered with that geofence.</p>
/// <p>Format: <code>"key" : "value"</code></p>
pub fn geofence_properties(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.geofence_properties.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.geofence_properties = ::std::option::Option::Some(hash_map);
self
}
/// <p>Associates one of more properties with the geofence. A property is a key-value pair stored with the geofence and added to any geofence event triggered with that geofence.</p>
/// <p>Format: <code>"key" : "value"</code></p>
pub fn set_geofence_properties(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.geofence_properties = input;
self
}
/// <p>Associates one of more properties with the geofence. A property is a key-value pair stored with the geofence and added to any geofence event triggered with that geofence.</p>
/// <p>Format: <code>"key" : "value"</code></p>
pub fn get_geofence_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.geofence_properties
}
/// Consumes the builder and constructs a [`PutGeofenceInput`](crate::operation::put_geofence::PutGeofenceInput).
pub fn build(self) -> ::std::result::Result<crate::operation::put_geofence::PutGeofenceInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::put_geofence::PutGeofenceInput {
collection_name: self.collection_name,
geofence_id: self.geofence_id,
geometry: self.geometry,
geofence_properties: self.geofence_properties,
})
}
}
impl ::std::fmt::Debug for PutGeofenceInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("PutGeofenceInputBuilder");
formatter.field("collection_name", &self.collection_name);
formatter.field("geofence_id", &self.geofence_id);
formatter.field("geometry", &self.geometry);
formatter.field("geofence_properties", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}