aws_sdk_location/operation/put_geofence/
_put_geofence_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct PutGeofenceOutput {
6 pub geofence_id: ::std::string::String,
8 pub create_time: ::aws_smithy_types::DateTime,
10 pub update_time: ::aws_smithy_types::DateTime,
12 _request_id: Option<String>,
13}
14impl PutGeofenceOutput {
15 pub fn geofence_id(&self) -> &str {
17 use std::ops::Deref;
18 self.geofence_id.deref()
19 }
20 pub fn create_time(&self) -> &::aws_smithy_types::DateTime {
22 &self.create_time
23 }
24 pub fn update_time(&self) -> &::aws_smithy_types::DateTime {
26 &self.update_time
27 }
28}
29impl ::std::fmt::Debug for PutGeofenceOutput {
30 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31 let mut formatter = f.debug_struct("PutGeofenceOutput");
32 formatter.field("geofence_id", &self.geofence_id);
33 formatter.field("create_time", &"*** Sensitive Data Redacted ***");
34 formatter.field("update_time", &"*** Sensitive Data Redacted ***");
35 formatter.field("_request_id", &self._request_id);
36 formatter.finish()
37 }
38}
39impl ::aws_types::request_id::RequestId for PutGeofenceOutput {
40 fn request_id(&self) -> Option<&str> {
41 self._request_id.as_deref()
42 }
43}
44impl PutGeofenceOutput {
45 pub fn builder() -> crate::operation::put_geofence::builders::PutGeofenceOutputBuilder {
47 crate::operation::put_geofence::builders::PutGeofenceOutputBuilder::default()
48 }
49}
50
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
53#[non_exhaustive]
54pub struct PutGeofenceOutputBuilder {
55 pub(crate) geofence_id: ::std::option::Option<::std::string::String>,
56 pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
57 pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
58 _request_id: Option<String>,
59}
60impl PutGeofenceOutputBuilder {
61 pub fn geofence_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.geofence_id = ::std::option::Option::Some(input.into());
65 self
66 }
67 pub fn set_geofence_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69 self.geofence_id = input;
70 self
71 }
72 pub fn get_geofence_id(&self) -> &::std::option::Option<::std::string::String> {
74 &self.geofence_id
75 }
76 pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
79 self.create_time = ::std::option::Option::Some(input);
80 self
81 }
82 pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
84 self.create_time = input;
85 self
86 }
87 pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
89 &self.create_time
90 }
91 pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
94 self.update_time = ::std::option::Option::Some(input);
95 self
96 }
97 pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
99 self.update_time = input;
100 self
101 }
102 pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
104 &self.update_time
105 }
106 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
107 self._request_id = Some(request_id.into());
108 self
109 }
110
111 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
112 self._request_id = request_id;
113 self
114 }
115 pub fn build(self) -> ::std::result::Result<crate::operation::put_geofence::PutGeofenceOutput, ::aws_smithy_types::error::operation::BuildError> {
121 ::std::result::Result::Ok(crate::operation::put_geofence::PutGeofenceOutput {
122 geofence_id: self.geofence_id.ok_or_else(|| {
123 ::aws_smithy_types::error::operation::BuildError::missing_field(
124 "geofence_id",
125 "geofence_id was not specified but it is required when building PutGeofenceOutput",
126 )
127 })?,
128 create_time: self.create_time.ok_or_else(|| {
129 ::aws_smithy_types::error::operation::BuildError::missing_field(
130 "create_time",
131 "create_time was not specified but it is required when building PutGeofenceOutput",
132 )
133 })?,
134 update_time: self.update_time.ok_or_else(|| {
135 ::aws_smithy_types::error::operation::BuildError::missing_field(
136 "update_time",
137 "update_time was not specified but it is required when building PutGeofenceOutput",
138 )
139 })?,
140 _request_id: self._request_id,
141 })
142 }
143}
144impl ::std::fmt::Debug for PutGeofenceOutputBuilder {
145 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
146 let mut formatter = f.debug_struct("PutGeofenceOutputBuilder");
147 formatter.field("geofence_id", &self.geofence_id);
148 formatter.field("create_time", &"*** Sensitive Data Redacted ***");
149 formatter.field("update_time", &"*** Sensitive Data Redacted ***");
150 formatter.field("_request_id", &self._request_id);
151 formatter.finish()
152 }
153}