Skip to content

Commit db6159a

Browse files
authored
feat(aws-android-sdk-location): update models to latest (#3324)
1 parent f74befe commit db6159a

29 files changed

+1795
-53
lines changed

aws-android-sdk-location/src/main/java/com/amazonaws/services/geo/AmazonLocation.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,9 @@ BatchPutGeofenceResult batchPutGeofence(BatchPutGeofenceRequest batchPutGeofence
304304
/**
305305
* <p>
306306
* Uploads position update data for one or more devices to a tracker
307-
* resource. Amazon Location uses the data when it reports the last known
308-
* device position and position history. Amazon Location retains location
309-
* data for 30 days.
307+
* resource (up to 10 devices per batch). Amazon Location uses the data when
308+
* it reports the last known device position and position history. Amazon
309+
* Location retains location data for 30 days.
310310
* </p>
311311
* <note>
312312
* <p>

aws-android-sdk-location/src/main/java/com/amazonaws/services/geo/AmazonLocationClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -730,9 +730,9 @@ public BatchPutGeofenceResult batchPutGeofence(BatchPutGeofenceRequest batchPutG
730730
/**
731731
* <p>
732732
* Uploads position update data for one or more devices to a tracker
733-
* resource. Amazon Location uses the data when it reports the last known
734-
* device position and position history. Amazon Location retains location
735-
* data for 30 days.
733+
* resource (up to 10 devices per batch). Amazon Location uses the data when
734+
* it reports the last known device position and position history. Amazon
735+
* Location retains location data for 30 days.
736736
* </p>
737737
* <note>
738738
* <p>

aws-android-sdk-location/src/main/java/com/amazonaws/services/geo/model/BatchPutGeofenceRequestEntry.java

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ public class BatchPutGeofenceRequestEntry implements Serializable {
3535
*/
3636
private String geofenceId;
3737

38+
/**
39+
* <p>
40+
* Specifies additional user-defined properties to store with the Geofence.
41+
* An array of key-value pairs.
42+
* </p>
43+
*/
44+
private java.util.Map<String, String> geofenceProperties;
45+
3846
/**
3947
* <p>
4048
* Contains the details of the position of the geofence. Can be either a
@@ -113,6 +121,96 @@ public BatchPutGeofenceRequestEntry withGeofenceId(String geofenceId) {
113121
return this;
114122
}
115123

124+
/**
125+
* <p>
126+
* Specifies additional user-defined properties to store with the Geofence.
127+
* An array of key-value pairs.
128+
* </p>
129+
*
130+
* @return <p>
131+
* Specifies additional user-defined properties to store with the
132+
* Geofence. An array of key-value pairs.
133+
* </p>
134+
*/
135+
public java.util.Map<String, String> getGeofenceProperties() {
136+
return geofenceProperties;
137+
}
138+
139+
/**
140+
* <p>
141+
* Specifies additional user-defined properties to store with the Geofence.
142+
* An array of key-value pairs.
143+
* </p>
144+
*
145+
* @param geofenceProperties <p>
146+
* Specifies additional user-defined properties to store with the
147+
* Geofence. An array of key-value pairs.
148+
* </p>
149+
*/
150+
public void setGeofenceProperties(java.util.Map<String, String> geofenceProperties) {
151+
this.geofenceProperties = geofenceProperties;
152+
}
153+
154+
/**
155+
* <p>
156+
* Specifies additional user-defined properties to store with the Geofence.
157+
* An array of key-value pairs.
158+
* </p>
159+
* <p>
160+
* Returns a reference to this object so that method calls can be chained
161+
* together.
162+
*
163+
* @param geofenceProperties <p>
164+
* Specifies additional user-defined properties to store with the
165+
* Geofence. An array of key-value pairs.
166+
* </p>
167+
* @return A reference to this updated object so that method calls can be
168+
* chained together.
169+
*/
170+
public BatchPutGeofenceRequestEntry withGeofenceProperties(
171+
java.util.Map<String, String> geofenceProperties) {
172+
this.geofenceProperties = geofenceProperties;
173+
return this;
174+
}
175+
176+
/**
177+
* <p>
178+
* Specifies additional user-defined properties to store with the Geofence.
179+
* An array of key-value pairs.
180+
* </p>
181+
* <p>
182+
* The method adds a new key-value pair into GeofenceProperties parameter,
183+
* and returns a reference to this object so that method calls can be
184+
* chained together.
185+
*
186+
* @param key The key of the entry to be added into GeofenceProperties.
187+
* @param value The corresponding value of the entry to be added into
188+
* GeofenceProperties.
189+
* @return A reference to this updated object so that method calls can be
190+
* chained together.
191+
*/
192+
public BatchPutGeofenceRequestEntry addGeofencePropertiesEntry(String key, String value) {
193+
if (null == this.geofenceProperties) {
194+
this.geofenceProperties = new java.util.HashMap<String, String>();
195+
}
196+
if (this.geofenceProperties.containsKey(key))
197+
throw new IllegalArgumentException("Duplicated keys (" + key.toString()
198+
+ ") are provided.");
199+
this.geofenceProperties.put(key, value);
200+
return this;
201+
}
202+
203+
/**
204+
* Removes all the entries added into GeofenceProperties.
205+
* <p>
206+
* Returns a reference to this object so that method calls can be chained
207+
* together.
208+
*/
209+
public BatchPutGeofenceRequestEntry clearGeofencePropertiesEntries() {
210+
this.geofenceProperties = null;
211+
return this;
212+
}
213+
116214
/**
117215
* <p>
118216
* Contains the details of the position of the geofence. Can be either a
@@ -222,6 +320,8 @@ public String toString() {
222320
sb.append("{");
223321
if (getGeofenceId() != null)
224322
sb.append("GeofenceId: " + getGeofenceId() + ",");
323+
if (getGeofenceProperties() != null)
324+
sb.append("GeofenceProperties: " + getGeofenceProperties() + ",");
225325
if (getGeometry() != null)
226326
sb.append("Geometry: " + getGeometry());
227327
sb.append("}");
@@ -234,6 +334,8 @@ public int hashCode() {
234334
int hashCode = 1;
235335

236336
hashCode = prime * hashCode + ((getGeofenceId() == null) ? 0 : getGeofenceId().hashCode());
337+
hashCode = prime * hashCode
338+
+ ((getGeofenceProperties() == null) ? 0 : getGeofenceProperties().hashCode());
237339
hashCode = prime * hashCode + ((getGeometry() == null) ? 0 : getGeometry().hashCode());
238340
return hashCode;
239341
}
@@ -254,6 +356,11 @@ public boolean equals(Object obj) {
254356
if (other.getGeofenceId() != null
255357
&& other.getGeofenceId().equals(this.getGeofenceId()) == false)
256358
return false;
359+
if (other.getGeofenceProperties() == null ^ this.getGeofenceProperties() == null)
360+
return false;
361+
if (other.getGeofenceProperties() != null
362+
&& other.getGeofenceProperties().equals(this.getGeofenceProperties()) == false)
363+
return false;
257364
if (other.getGeometry() == null ^ this.getGeometry() == null)
258365
return false;
259366
if (other.getGeometry() != null && other.getGeometry().equals(this.getGeometry()) == false)

aws-android-sdk-location/src/main/java/com/amazonaws/services/geo/model/BatchUpdateDevicePositionRequest.java

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121

2222
/**
2323
* <p>
24-
* Uploads position update data for one or more devices to a tracker resource.
25-
* Amazon Location uses the data when it reports the last known device position
26-
* and position history. Amazon Location retains location data for 30 days.
24+
* Uploads position update data for one or more devices to a tracker resource
25+
* (up to 10 devices per batch). Amazon Location uses the data when it reports
26+
* the last known device position and position history. Amazon Location retains
27+
* location data for 30 days.
2728
* </p>
2829
* <note>
2930
* <p>
@@ -67,7 +68,7 @@ public class BatchUpdateDevicePositionRequest extends AmazonWebServiceRequest im
6768

6869
/**
6970
* <p>
70-
* Contains the position update details for each device.
71+
* Contains the position update details for each device, up to 10 devices.
7172
* </p>
7273
*/
7374
private java.util.List<DevicePositionUpdate> updates;
@@ -131,11 +132,12 @@ public BatchUpdateDevicePositionRequest withTrackerName(String trackerName) {
131132

132133
/**
133134
* <p>
134-
* Contains the position update details for each device.
135+
* Contains the position update details for each device, up to 10 devices.
135136
* </p>
136137
*
137138
* @return <p>
138-
* Contains the position update details for each device.
139+
* Contains the position update details for each device, up to 10
140+
* devices.
139141
* </p>
140142
*/
141143
public java.util.List<DevicePositionUpdate> getUpdates() {
@@ -144,11 +146,12 @@ public java.util.List<DevicePositionUpdate> getUpdates() {
144146

145147
/**
146148
* <p>
147-
* Contains the position update details for each device.
149+
* Contains the position update details for each device, up to 10 devices.
148150
* </p>
149151
*
150152
* @param updates <p>
151-
* Contains the position update details for each device.
153+
* Contains the position update details for each device, up to 10
154+
* devices.
152155
* </p>
153156
*/
154157
public void setUpdates(java.util.Collection<DevicePositionUpdate> updates) {
@@ -162,14 +165,15 @@ public void setUpdates(java.util.Collection<DevicePositionUpdate> updates) {
162165

163166
/**
164167
* <p>
165-
* Contains the position update details for each device.
168+
* Contains the position update details for each device, up to 10 devices.
166169
* </p>
167170
* <p>
168171
* Returns a reference to this object so that method calls can be chained
169172
* together.
170173
*
171174
* @param updates <p>
172-
* Contains the position update details for each device.
175+
* Contains the position update details for each device, up to 10
176+
* devices.
173177
* </p>
174178
* @return A reference to this updated object so that method calls can be
175179
* chained together.
@@ -186,14 +190,15 @@ public BatchUpdateDevicePositionRequest withUpdates(DevicePositionUpdate... upda
186190

187191
/**
188192
* <p>
189-
* Contains the position update details for each device.
193+
* Contains the position update details for each device, up to 10 devices.
190194
* </p>
191195
* <p>
192196
* Returns a reference to this object so that method calls can be chained
193197
* together.
194198
*
195199
* @param updates <p>
196-
* Contains the position update details for each device.
200+
* Contains the position update details for each device, up to 10
201+
* devices.
197202
* </p>
198203
* @return A reference to this updated object so that method calls can be
199204
* chained together.

aws-android-sdk-location/src/main/java/com/amazonaws/services/geo/model/GetGeofenceResult.java

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ public class GetGeofenceResult implements Serializable {
3838
*/
3939
private String geofenceId;
4040

41+
/**
42+
* <p>
43+
* Contains additional user-defined properties stored with the geofence. An
44+
* array of key-value pairs.
45+
* </p>
46+
*/
47+
private java.util.Map<String, String> geofenceProperties;
48+
4149
/**
4250
* <p>
4351
* Contains the geofence geometry details describing a polygon or a circle.
@@ -207,6 +215,95 @@ public GetGeofenceResult withGeofenceId(String geofenceId) {
207215
return this;
208216
}
209217

218+
/**
219+
* <p>
220+
* Contains additional user-defined properties stored with the geofence. An
221+
* array of key-value pairs.
222+
* </p>
223+
*
224+
* @return <p>
225+
* Contains additional user-defined properties stored with the
226+
* geofence. An array of key-value pairs.
227+
* </p>
228+
*/
229+
public java.util.Map<String, String> getGeofenceProperties() {
230+
return geofenceProperties;
231+
}
232+
233+
/**
234+
* <p>
235+
* Contains additional user-defined properties stored with the geofence. An
236+
* array of key-value pairs.
237+
* </p>
238+
*
239+
* @param geofenceProperties <p>
240+
* Contains additional user-defined properties stored with the
241+
* geofence. An array of key-value pairs.
242+
* </p>
243+
*/
244+
public void setGeofenceProperties(java.util.Map<String, String> geofenceProperties) {
245+
this.geofenceProperties = geofenceProperties;
246+
}
247+
248+
/**
249+
* <p>
250+
* Contains additional user-defined properties stored with the geofence. An
251+
* array of key-value pairs.
252+
* </p>
253+
* <p>
254+
* Returns a reference to this object so that method calls can be chained
255+
* together.
256+
*
257+
* @param geofenceProperties <p>
258+
* Contains additional user-defined properties stored with the
259+
* geofence. An array of key-value pairs.
260+
* </p>
261+
* @return A reference to this updated object so that method calls can be
262+
* chained together.
263+
*/
264+
public GetGeofenceResult withGeofenceProperties(java.util.Map<String, String> geofenceProperties) {
265+
this.geofenceProperties = geofenceProperties;
266+
return this;
267+
}
268+
269+
/**
270+
* <p>
271+
* Contains additional user-defined properties stored with the geofence. An
272+
* array of key-value pairs.
273+
* </p>
274+
* <p>
275+
* The method adds a new key-value pair into GeofenceProperties parameter,
276+
* and returns a reference to this object so that method calls can be
277+
* chained together.
278+
*
279+
* @param key The key of the entry to be added into GeofenceProperties.
280+
* @param value The corresponding value of the entry to be added into
281+
* GeofenceProperties.
282+
* @return A reference to this updated object so that method calls can be
283+
* chained together.
284+
*/
285+
public GetGeofenceResult addGeofencePropertiesEntry(String key, String value) {
286+
if (null == this.geofenceProperties) {
287+
this.geofenceProperties = new java.util.HashMap<String, String>();
288+
}
289+
if (this.geofenceProperties.containsKey(key))
290+
throw new IllegalArgumentException("Duplicated keys (" + key.toString()
291+
+ ") are provided.");
292+
this.geofenceProperties.put(key, value);
293+
return this;
294+
}
295+
296+
/**
297+
* Removes all the entries added into GeofenceProperties.
298+
* <p>
299+
* Returns a reference to this object so that method calls can be chained
300+
* together.
301+
*/
302+
public GetGeofenceResult clearGeofencePropertiesEntries() {
303+
this.geofenceProperties = null;
304+
return this;
305+
}
306+
210307
/**
211308
* <p>
212309
* Contains the geofence geometry details describing a polygon or a circle.
@@ -564,6 +661,8 @@ public String toString() {
564661
sb.append("CreateTime: " + getCreateTime() + ",");
565662
if (getGeofenceId() != null)
566663
sb.append("GeofenceId: " + getGeofenceId() + ",");
664+
if (getGeofenceProperties() != null)
665+
sb.append("GeofenceProperties: " + getGeofenceProperties() + ",");
567666
if (getGeometry() != null)
568667
sb.append("Geometry: " + getGeometry() + ",");
569668
if (getStatus() != null)
@@ -581,6 +680,8 @@ public int hashCode() {
581680

582681
hashCode = prime * hashCode + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
583682
hashCode = prime * hashCode + ((getGeofenceId() == null) ? 0 : getGeofenceId().hashCode());
683+
hashCode = prime * hashCode
684+
+ ((getGeofenceProperties() == null) ? 0 : getGeofenceProperties().hashCode());
584685
hashCode = prime * hashCode + ((getGeometry() == null) ? 0 : getGeometry().hashCode());
585686
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
586687
hashCode = prime * hashCode + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
@@ -608,6 +709,11 @@ public boolean equals(Object obj) {
608709
if (other.getGeofenceId() != null
609710
&& other.getGeofenceId().equals(this.getGeofenceId()) == false)
610711
return false;
712+
if (other.getGeofenceProperties() == null ^ this.getGeofenceProperties() == null)
713+
return false;
714+
if (other.getGeofenceProperties() != null
715+
&& other.getGeofenceProperties().equals(this.getGeofenceProperties()) == false)
716+
return false;
611717
if (other.getGeometry() == null ^ this.getGeometry() == null)
612718
return false;
613719
if (other.getGeometry() != null && other.getGeometry().equals(this.getGeometry()) == false)

0 commit comments

Comments
 (0)