Skip to content

Commit 10d091b

Browse files
authored
feat(aws-android-sdk-chimesdkmessaging): update models to latest (#2749)
1 parent bbed9de commit 10d091b

File tree

4 files changed

+255
-45
lines changed

4 files changed

+255
-45
lines changed

aws-android-sdk-chimesdkmessaging/src/main/java/com/amazonaws/services/chimesdkmessaging/model/ChannelMessageCallback.java

Lines changed: 178 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,22 @@ public class ChannelMessageCallback implements Serializable {
5656
*/
5757
private String metadata;
5858

59+
/**
60+
* <p>
61+
* The push notification configuration of the message.
62+
* </p>
63+
*/
64+
private PushNotificationConfiguration pushNotification;
65+
66+
/**
67+
* <p>
68+
* The attributes for the message, used for message filtering along with a
69+
* <code>FilterRule</code> defined in the
70+
* <code>PushNotificationPreferences</code>.
71+
* </p>
72+
*/
73+
private java.util.Map<String, MessageAttributeValue> messageAttributes;
74+
5975
/**
6076
* <p>
6177
* The message ID.
@@ -227,6 +243,149 @@ public ChannelMessageCallback withMetadata(String metadata) {
227243
return this;
228244
}
229245

246+
/**
247+
* <p>
248+
* The push notification configuration of the message.
249+
* </p>
250+
*
251+
* @return <p>
252+
* The push notification configuration of the message.
253+
* </p>
254+
*/
255+
public PushNotificationConfiguration getPushNotification() {
256+
return pushNotification;
257+
}
258+
259+
/**
260+
* <p>
261+
* The push notification configuration of the message.
262+
* </p>
263+
*
264+
* @param pushNotification <p>
265+
* The push notification configuration of the message.
266+
* </p>
267+
*/
268+
public void setPushNotification(PushNotificationConfiguration pushNotification) {
269+
this.pushNotification = pushNotification;
270+
}
271+
272+
/**
273+
* <p>
274+
* The push notification configuration of the message.
275+
* </p>
276+
* <p>
277+
* Returns a reference to this object so that method calls can be chained
278+
* together.
279+
*
280+
* @param pushNotification <p>
281+
* The push notification configuration of the message.
282+
* </p>
283+
* @return A reference to this updated object so that method calls can be
284+
* chained together.
285+
*/
286+
public ChannelMessageCallback withPushNotification(
287+
PushNotificationConfiguration pushNotification) {
288+
this.pushNotification = pushNotification;
289+
return this;
290+
}
291+
292+
/**
293+
* <p>
294+
* The attributes for the message, used for message filtering along with a
295+
* <code>FilterRule</code> defined in the
296+
* <code>PushNotificationPreferences</code>.
297+
* </p>
298+
*
299+
* @return <p>
300+
* The attributes for the message, used for message filtering along
301+
* with a <code>FilterRule</code> defined in the
302+
* <code>PushNotificationPreferences</code>.
303+
* </p>
304+
*/
305+
public java.util.Map<String, MessageAttributeValue> getMessageAttributes() {
306+
return messageAttributes;
307+
}
308+
309+
/**
310+
* <p>
311+
* The attributes for the message, used for message filtering along with a
312+
* <code>FilterRule</code> defined in the
313+
* <code>PushNotificationPreferences</code>.
314+
* </p>
315+
*
316+
* @param messageAttributes <p>
317+
* The attributes for the message, used for message filtering
318+
* along with a <code>FilterRule</code> defined in the
319+
* <code>PushNotificationPreferences</code>.
320+
* </p>
321+
*/
322+
public void setMessageAttributes(java.util.Map<String, MessageAttributeValue> messageAttributes) {
323+
this.messageAttributes = messageAttributes;
324+
}
325+
326+
/**
327+
* <p>
328+
* The attributes for the message, used for message filtering along with a
329+
* <code>FilterRule</code> defined in the
330+
* <code>PushNotificationPreferences</code>.
331+
* </p>
332+
* <p>
333+
* Returns a reference to this object so that method calls can be chained
334+
* together.
335+
*
336+
* @param messageAttributes <p>
337+
* The attributes for the message, used for message filtering
338+
* along with a <code>FilterRule</code> defined in the
339+
* <code>PushNotificationPreferences</code>.
340+
* </p>
341+
* @return A reference to this updated object so that method calls can be
342+
* chained together.
343+
*/
344+
public ChannelMessageCallback withMessageAttributes(
345+
java.util.Map<String, MessageAttributeValue> messageAttributes) {
346+
this.messageAttributes = messageAttributes;
347+
return this;
348+
}
349+
350+
/**
351+
* <p>
352+
* The attributes for the message, used for message filtering along with a
353+
* <code>FilterRule</code> defined in the
354+
* <code>PushNotificationPreferences</code>.
355+
* </p>
356+
* <p>
357+
* The method adds a new key-value pair into MessageAttributes parameter,
358+
* and returns a reference to this object so that method calls can be
359+
* chained together.
360+
*
361+
* @param key The key of the entry to be added into MessageAttributes.
362+
* @param value The corresponding value of the entry to be added into
363+
* MessageAttributes.
364+
* @return A reference to this updated object so that method calls can be
365+
* chained together.
366+
*/
367+
public ChannelMessageCallback addMessageAttributesEntry(String key, MessageAttributeValue value) {
368+
if (null == this.messageAttributes) {
369+
this.messageAttributes = new java.util.HashMap<String, MessageAttributeValue>();
370+
}
371+
if (this.messageAttributes.containsKey(key))
372+
throw new IllegalArgumentException("Duplicated keys (" + key.toString()
373+
+ ") are provided.");
374+
this.messageAttributes.put(key, value);
375+
return this;
376+
}
377+
378+
/**
379+
* Removes all the entries added into MessageAttributes.
380+
* <p>
381+
* Returns a reference to this object so that method calls can be chained
382+
* together.
383+
*/
384+
public ChannelMessageCallback clearMessageAttributesEntries() {
385+
this.messageAttributes = null;
386+
return this;
387+
}
388+
230389
/**
231390
* Returns a string representation of this object; useful for testing and
232391
* debugging.
@@ -243,7 +402,11 @@ public String toString() {
243402
if (getContent() != null)
244403
sb.append("Content: " + getContent() + ",");
245404
if (getMetadata() != null)
246-
sb.append("Metadata: " + getMetadata());
405+
sb.append("Metadata: " + getMetadata() + ",");
406+
if (getPushNotification() != null)
407+
sb.append("PushNotification: " + getPushNotification() + ",");
408+
if (getMessageAttributes() != null)
409+
sb.append("MessageAttributes: " + getMessageAttributes());
247410
sb.append("}");
248411
return sb.toString();
249412
}
@@ -256,6 +419,10 @@ public int hashCode() {
256419
hashCode = prime * hashCode + ((getMessageId() == null) ? 0 : getMessageId().hashCode());
257420
hashCode = prime * hashCode + ((getContent() == null) ? 0 : getContent().hashCode());
258421
hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode());
422+
hashCode = prime * hashCode
423+
+ ((getPushNotification() == null) ? 0 : getPushNotification().hashCode());
424+
hashCode = prime * hashCode
425+
+ ((getMessageAttributes() == null) ? 0 : getMessageAttributes().hashCode());
259426
return hashCode;
260427
}
261428

@@ -283,6 +450,16 @@ public boolean equals(Object obj) {
283450
return false;
284451
if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == false)
285452
return false;
453+
if (other.getPushNotification() == null ^ this.getPushNotification() == null)
454+
return false;
455+
if (other.getPushNotification() != null
456+
&& other.getPushNotification().equals(this.getPushNotification()) == false)
457+
return false;
458+
if (other.getMessageAttributes() == null ^ this.getMessageAttributes() == null)
459+
return false;
460+
if (other.getMessageAttributes() != null
461+
&& other.getMessageAttributes().equals(this.getMessageAttributes()) == false)
462+
return false;
286463
return true;
287464
}
288465
}

aws-android-sdk-chimesdkmessaging/src/main/java/com/amazonaws/services/chimesdkmessaging/model/ListChannelMembershipsRequest.java

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ public class ListChannelMembershipsRequest extends AmazonWebServiceRequest imple
5454
/**
5555
* <p>
5656
* The membership type of a user, <code>DEFAULT</code> or
57-
* <code>HIDDEN</code>. Default members are always returned as part of
58-
* <code>ListChannelMemberships</code>. Hidden members are only returned if
59-
* the type filter in <code>ListChannelMemberships</code> equals
60-
* <code>HIDDEN</code>. Otherwise hidden members are not returned.
57+
* <code>HIDDEN</code>. Default members are returned as part of
58+
* <code>ListChannelMemberships</code> if no type is specified. Hidden
59+
* members are only returned if the type filter in
60+
* <code>ListChannelMemberships</code> equals <code>HIDDEN</code>.
6161
* </p>
6262
* <p>
6363
* <b>Constraints:</b><br/>
@@ -168,22 +168,21 @@ public ListChannelMembershipsRequest withChannelArn(String channelArn) {
168168
/**
169169
* <p>
170170
* The membership type of a user, <code>DEFAULT</code> or
171-
* <code>HIDDEN</code>. Default members are always returned as part of
172-
* <code>ListChannelMemberships</code>. Hidden members are only returned if
173-
* the type filter in <code>ListChannelMemberships</code> equals
174-
* <code>HIDDEN</code>. Otherwise hidden members are not returned.
171+
* <code>HIDDEN</code>. Default members are returned as part of
172+
* <code>ListChannelMemberships</code> if no type is specified. Hidden
173+
* members are only returned if the type filter in
174+
* <code>ListChannelMemberships</code> equals <code>HIDDEN</code>.
175175
* </p>
176176
* <p>
177177
* <b>Constraints:</b><br/>
178178
* <b>Allowed Values: </b>DEFAULT, HIDDEN
179179
*
180180
* @return <p>
181181
* The membership type of a user, <code>DEFAULT</code> or
182-
* <code>HIDDEN</code>. Default members are always returned as part
183-
* of <code>ListChannelMemberships</code>. Hidden members are only
184-
* returned if the type filter in
182+
* <code>HIDDEN</code>. Default members are returned as part of
183+
* <code>ListChannelMemberships</code> if no type is specified.
184+
* Hidden members are only returned if the type filter in
185185
* <code>ListChannelMemberships</code> equals <code>HIDDEN</code>.
186-
* Otherwise hidden members are not returned.
187186
* </p>
188187
* @see ChannelMembershipType
189188
*/
@@ -194,22 +193,22 @@ public String getType() {
194193
/**
195194
* <p>
196195
* The membership type of a user, <code>DEFAULT</code> or
197-
* <code>HIDDEN</code>. Default members are always returned as part of
198-
* <code>ListChannelMemberships</code>. Hidden members are only returned if
199-
* the type filter in <code>ListChannelMemberships</code> equals
200-
* <code>HIDDEN</code>. Otherwise hidden members are not returned.
196+
* <code>HIDDEN</code>. Default members are returned as part of
197+
* <code>ListChannelMemberships</code> if no type is specified. Hidden
198+
* members are only returned if the type filter in
199+
* <code>ListChannelMemberships</code> equals <code>HIDDEN</code>.
201200
* </p>
202201
* <p>
203202
* <b>Constraints:</b><br/>
204203
* <b>Allowed Values: </b>DEFAULT, HIDDEN
205204
*
206205
* @param type <p>
207206
* The membership type of a user, <code>DEFAULT</code> or
208-
* <code>HIDDEN</code>. Default members are always returned as
209-
* part of <code>ListChannelMemberships</code>. Hidden members
210-
* are only returned if the type filter in
207+
* <code>HIDDEN</code>. Default members are returned as part of
208+
* <code>ListChannelMemberships</code> if no type is specified.
209+
* Hidden members are only returned if the type filter in
211210
* <code>ListChannelMemberships</code> equals <code>HIDDEN</code>
212-
* . Otherwise hidden members are not returned.
211+
* .
213212
* </p>
214213
* @see ChannelMembershipType
215214
*/
@@ -220,10 +219,10 @@ public void setType(String type) {
220219
/**
221220
* <p>
222221
* The membership type of a user, <code>DEFAULT</code> or
223-
* <code>HIDDEN</code>. Default members are always returned as part of
224-
* <code>ListChannelMemberships</code>. Hidden members are only returned if
225-
* the type filter in <code>ListChannelMemberships</code> equals
226-
* <code>HIDDEN</code>. Otherwise hidden members are not returned.
222+
* <code>HIDDEN</code>. Default members are returned as part of
223+
* <code>ListChannelMemberships</code> if no type is specified. Hidden
224+
* members are only returned if the type filter in
225+
* <code>ListChannelMemberships</code> equals <code>HIDDEN</code>.
227226
* </p>
228227
* <p>
229228
* Returns a reference to this object so that method calls can be chained
@@ -234,11 +233,11 @@ public void setType(String type) {
234233
*
235234
* @param type <p>
236235
* The membership type of a user, <code>DEFAULT</code> or
237-
* <code>HIDDEN</code>. Default members are always returned as
238-
* part of <code>ListChannelMemberships</code>. Hidden members
239-
* are only returned if the type filter in
236+
* <code>HIDDEN</code>. Default members are returned as part of
237+
* <code>ListChannelMemberships</code> if no type is specified.
238+
* Hidden members are only returned if the type filter in
240239
* <code>ListChannelMemberships</code> equals <code>HIDDEN</code>
241-
* . Otherwise hidden members are not returned.
240+
* .
242241
* </p>
243242
* @return A reference to this updated object so that method calls can be
244243
* chained together.
@@ -252,22 +251,22 @@ public ListChannelMembershipsRequest withType(String type) {
252251
/**
253252
* <p>
254253
* The membership type of a user, <code>DEFAULT</code> or
255-
* <code>HIDDEN</code>. Default members are always returned as part of
256-
* <code>ListChannelMemberships</code>. Hidden members are only returned if
257-
* the type filter in <code>ListChannelMemberships</code> equals
258-
* <code>HIDDEN</code>. Otherwise hidden members are not returned.
254+
* <code>HIDDEN</code>. Default members are returned as part of
255+
* <code>ListChannelMemberships</code> if no type is specified. Hidden
256+
* members are only returned if the type filter in
257+
* <code>ListChannelMemberships</code> equals <code>HIDDEN</code>.
259258
* </p>
260259
* <p>
261260
* <b>Constraints:</b><br/>
262261
* <b>Allowed Values: </b>DEFAULT, HIDDEN
263262
*
264263
* @param type <p>
265264
* The membership type of a user, <code>DEFAULT</code> or
266-
* <code>HIDDEN</code>. Default members are always returned as
267-
* part of <code>ListChannelMemberships</code>. Hidden members
268-
* are only returned if the type filter in
265+
* <code>HIDDEN</code>. Default members are returned as part of
266+
* <code>ListChannelMemberships</code> if no type is specified.
267+
* Hidden members are only returned if the type filter in
269268
* <code>ListChannelMemberships</code> equals <code>HIDDEN</code>
270-
* . Otherwise hidden members are not returned.
269+
* .
271270
* </p>
272271
* @see ChannelMembershipType
273272
*/
@@ -278,10 +277,10 @@ public void setType(ChannelMembershipType type) {
278277
/**
279278
* <p>
280279
* The membership type of a user, <code>DEFAULT</code> or
281-
* <code>HIDDEN</code>. Default members are always returned as part of
282-
* <code>ListChannelMemberships</code>. Hidden members are only returned if
283-
* the type filter in <code>ListChannelMemberships</code> equals
284-
* <code>HIDDEN</code>. Otherwise hidden members are not returned.
280+
* <code>HIDDEN</code>. Default members are returned as part of
281+
* <code>ListChannelMemberships</code> if no type is specified. Hidden
282+
* members are only returned if the type filter in
283+
* <code>ListChannelMemberships</code> equals <code>HIDDEN</code>.
285284
* </p>
286285
* <p>
287286
* Returns a reference to this object so that method calls can be chained
@@ -292,11 +291,11 @@ public void setType(ChannelMembershipType type) {
292291
*
293292
* @param type <p>
294293
* The membership type of a user, <code>DEFAULT</code> or
295-
* <code>HIDDEN</code>. Default members are always returned as
296-
* part of <code>ListChannelMemberships</code>. Hidden members
297-
* are only returned if the type filter in
294+
* <code>HIDDEN</code>. Default members are returned as part of
295+
* <code>ListChannelMemberships</code> if no type is specified.
296+
* Hidden members are only returned if the type filter in
298297
* <code>ListChannelMemberships</code> equals <code>HIDDEN</code>
299-
* . Otherwise hidden members are not returned.
298+
* .
300299
* </p>
301300
* @return A reference to this updated object so that method calls can be
302301
* chained together.

0 commit comments

Comments
 (0)