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
// 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, std::fmt::Debug)]
pub struct PutGeofenceInput {
/// <p>The geofence collection to store the geofence in.</p>
#[doc(hidden)]
pub collection_name: std::option::Option<std::string::String>,
/// <p>An identifier for the geofence. For example, <code>ExampleGeofence-1</code>.</p>
#[doc(hidden)]
pub geofence_id: std::option::Option<std::string::String>,
/// <p>Contains the details to specify the position of the geofence. Can be either a polygon or a circle. Including both will return a validation error.</p> <note>
/// <p>Each <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> can have a maximum of 1,000 vertices.</p>
/// </note>
#[doc(hidden)]
pub geometry: std::option::Option<crate::types::GeofenceGeometry>,
}
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 either a polygon or a circle. Including both will return a validation error.</p> <note>
/// <p>Each <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> can have a maximum of 1,000 vertices.</p>
/// </note>
pub fn geometry(&self) -> std::option::Option<&crate::types::GeofenceGeometry> {
self.geometry.as_ref()
}
}
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).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
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>,
}
impl PutGeofenceInputBuilder {
/// <p>The geofence collection to store the geofence in.</p>
pub fn collection_name(mut self, input: impl Into<std::string::String>) -> Self {
self.collection_name = 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>An identifier for the geofence. For example, <code>ExampleGeofence-1</code>.</p>
pub fn geofence_id(mut self, input: impl Into<std::string::String>) -> Self {
self.geofence_id = 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>Contains the details to specify the position of the geofence. Can be either a polygon or a circle. Including both will return a validation error.</p> <note>
/// <p>Each <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> can have a maximum of 1,000 vertices.</p>
/// </note>
pub fn geometry(mut self, input: crate::types::GeofenceGeometry) -> Self {
self.geometry = Some(input);
self
}
/// <p>Contains the details to specify the position of the geofence. Can be either a polygon or a circle. Including both will return a validation error.</p> <note>
/// <p>Each <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> can have a maximum of 1,000 vertices.</p>
/// </note>
pub fn set_geometry(
mut self,
input: std::option::Option<crate::types::GeofenceGeometry>,
) -> Self {
self.geometry = input;
self
}
/// Consumes the builder and constructs a [`PutGeofenceInput`](crate::operation::put_geofence::PutGeofenceInput).
pub fn build(
self,
) -> Result<
crate::operation::put_geofence::PutGeofenceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::put_geofence::PutGeofenceInput {
collection_name: self.collection_name,
geofence_id: self.geofence_id,
geometry: self.geometry,
})
}
}