Skip to content

Commit beb43a5

Browse files
authored
feat(aws-android-sdk-rekognition): update models to latest (#3267)
1 parent 2e3a023 commit beb43a5

File tree

36 files changed

+3653
-74
lines changed

36 files changed

+3653
-74
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
package com.amazonaws.services.rekognition.model;
17+
18+
import java.util.HashMap;
19+
import java.util.Map;
20+
21+
/**
22+
* Content Moderation Aggregate By
23+
*/
24+
public enum ContentModerationAggregateBy {
25+
26+
TIMESTAMPS("TIMESTAMPS"),
27+
SEGMENTS("SEGMENTS");
28+
29+
private String value;
30+
31+
private ContentModerationAggregateBy(String value) {
32+
this.value = value;
33+
}
34+
35+
@Override
36+
public String toString() {
37+
return value;
38+
}
39+
40+
private static final Map<String, ContentModerationAggregateBy> enumMap;
41+
static {
42+
enumMap = new HashMap<String, ContentModerationAggregateBy>();
43+
enumMap.put("TIMESTAMPS", TIMESTAMPS);
44+
enumMap.put("SEGMENTS", SEGMENTS);
45+
}
46+
47+
/**
48+
* Use this in place of valueOf.
49+
*
50+
* @param value real value
51+
* @return ContentModerationAggregateBy corresponding to the value
52+
*/
53+
public static ContentModerationAggregateBy fromValue(String value) {
54+
if (value == null || value.isEmpty()) {
55+
throw new IllegalArgumentException("Value cannot be null or empty!");
56+
} else if (enumMap.containsKey(value)) {
57+
return enumMap.get(value);
58+
} else {
59+
throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
60+
}
61+
}
62+
}

aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/ContentModerationDetection.java

Lines changed: 241 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,39 @@ public class ContentModerationDetection implements Serializable {
4141
*/
4242
private ModerationLabel moderationLabel;
4343

44+
/**
45+
* <p>
46+
* The time in milliseconds defining the start of the timeline segment
47+
* containing a continuously detected moderation label.
48+
* </p>
49+
* <p>
50+
* <b>Constraints:</b><br/>
51+
* <b>Range: </b>0 - <br/>
52+
*/
53+
private Long startTimestampMillis;
54+
55+
/**
56+
* <p>
57+
* The time in milliseconds defining the end of the timeline segment
58+
* containing a continuously detected moderation label.
59+
* </p>
60+
* <p>
61+
* <b>Constraints:</b><br/>
62+
* <b>Range: </b>0 - <br/>
63+
*/
64+
private Long endTimestampMillis;
65+
66+
/**
67+
* <p>
68+
* The time duration of a segment in milliseconds, I.e. time elapsed from
69+
* StartTimestampMillis to EndTimestampMillis.
70+
* </p>
71+
* <p>
72+
* <b>Constraints:</b><br/>
73+
* <b>Range: </b>0 - <br/>
74+
*/
75+
private Long durationMillis;
76+
4477
/**
4578
* <p>
4679
* Time, in milliseconds from the beginning of the video, that the content
@@ -149,6 +182,186 @@ public ContentModerationDetection withModerationLabel(ModerationLabel moderation
149182
return this;
150183
}
151184

185+
/**
186+
* <p>
187+
* The time in milliseconds defining the start of the timeline segment
188+
* containing a continuously detected moderation label.
189+
* </p>
190+
* <p>
191+
* <b>Constraints:</b><br/>
192+
* <b>Range: </b>0 - <br/>
193+
*
194+
* @return <p>
195+
* The time in milliseconds defining the start of the timeline
196+
* segment containing a continuously detected moderation label.
197+
* </p>
198+
*/
199+
public Long getStartTimestampMillis() {
200+
return startTimestampMillis;
201+
}
202+
203+
/**
204+
* <p>
205+
* The time in milliseconds defining the start of the timeline segment
206+
* containing a continuously detected moderation label.
207+
* </p>
208+
* <p>
209+
* <b>Constraints:</b><br/>
210+
* <b>Range: </b>0 - <br/>
211+
*
212+
* @param startTimestampMillis <p>
213+
* The time in milliseconds defining the start of the timeline
214+
* segment containing a continuously detected moderation label.
215+
* </p>
216+
*/
217+
public void setStartTimestampMillis(Long startTimestampMillis) {
218+
this.startTimestampMillis = startTimestampMillis;
219+
}
220+
221+
/**
222+
* <p>
223+
* The time in milliseconds defining the start of the timeline segment
224+
* containing a continuously detected moderation label.
225+
* </p>
226+
* <p>
227+
* Returns a reference to this object so that method calls can be chained
228+
* together.
229+
* <p>
230+
* <b>Constraints:</b><br/>
231+
* <b>Range: </b>0 - <br/>
232+
*
233+
* @param startTimestampMillis <p>
234+
* The time in milliseconds defining the start of the timeline
235+
* segment containing a continuously detected moderation label.
236+
* </p>
237+
* @return A reference to this updated object so that method calls can be
238+
* chained together.
239+
*/
240+
public ContentModerationDetection withStartTimestampMillis(Long startTimestampMillis) {
241+
this.startTimestampMillis = startTimestampMillis;
242+
return this;
243+
}
244+
245+
/**
246+
* <p>
247+
* The time in milliseconds defining the end of the timeline segment
248+
* containing a continuously detected moderation label.
249+
* </p>
250+
* <p>
251+
* <b>Constraints:</b><br/>
252+
* <b>Range: </b>0 - <br/>
253+
*
254+
* @return <p>
255+
* The time in milliseconds defining the end of the timeline segment
256+
* containing a continuously detected moderation label.
257+
* </p>
258+
*/
259+
public Long getEndTimestampMillis() {
260+
return endTimestampMillis;
261+
}
262+
263+
/**
264+
* <p>
265+
* The time in milliseconds defining the end of the timeline segment
266+
* containing a continuously detected moderation label.
267+
* </p>
268+
* <p>
269+
* <b>Constraints:</b><br/>
270+
* <b>Range: </b>0 - <br/>
271+
*
272+
* @param endTimestampMillis <p>
273+
* The time in milliseconds defining the end of the timeline
274+
* segment containing a continuously detected moderation label.
275+
* </p>
276+
*/
277+
public void setEndTimestampMillis(Long endTimestampMillis) {
278+
this.endTimestampMillis = endTimestampMillis;
279+
}
280+
281+
/**
282+
* <p>
283+
* The time in milliseconds defining the end of the timeline segment
284+
* containing a continuously detected moderation label.
285+
* </p>
286+
* <p>
287+
* Returns a reference to this object so that method calls can be chained
288+
* together.
289+
* <p>
290+
* <b>Constraints:</b><br/>
291+
* <b>Range: </b>0 - <br/>
292+
*
293+
* @param endTimestampMillis <p>
294+
* The time in milliseconds defining the end of the timeline
295+
* segment containing a continuously detected moderation label.
296+
* </p>
297+
* @return A reference to this updated object so that method calls can be
298+
* chained together.
299+
*/
300+
public ContentModerationDetection withEndTimestampMillis(Long endTimestampMillis) {
301+
this.endTimestampMillis = endTimestampMillis;
302+
return this;
303+
}
304+
305+
/**
306+
* <p>
307+
* The time duration of a segment in milliseconds, I.e. time elapsed from
308+
* StartTimestampMillis to EndTimestampMillis.
309+
* </p>
310+
* <p>
311+
* <b>Constraints:</b><br/>
312+
* <b>Range: </b>0 - <br/>
313+
*
314+
* @return <p>
315+
* The time duration of a segment in milliseconds, I.e. time elapsed
316+
* from StartTimestampMillis to EndTimestampMillis.
317+
* </p>
318+
*/
319+
public Long getDurationMillis() {
320+
return durationMillis;
321+
}
322+
323+
/**
324+
* <p>
325+
* The time duration of a segment in milliseconds, I.e. time elapsed from
326+
* StartTimestampMillis to EndTimestampMillis.
327+
* </p>
328+
* <p>
329+
* <b>Constraints:</b><br/>
330+
* <b>Range: </b>0 - <br/>
331+
*
332+
* @param durationMillis <p>
333+
* The time duration of a segment in milliseconds, I.e. time
334+
* elapsed from StartTimestampMillis to EndTimestampMillis.
335+
* </p>
336+
*/
337+
public void setDurationMillis(Long durationMillis) {
338+
this.durationMillis = durationMillis;
339+
}
340+
341+
/**
342+
* <p>
343+
* The time duration of a segment in milliseconds, I.e. time elapsed from
344+
* StartTimestampMillis to EndTimestampMillis.
345+
* </p>
346+
* <p>
347+
* Returns a reference to this object so that method calls can be chained
348+
* together.
349+
* <p>
350+
* <b>Constraints:</b><br/>
351+
* <b>Range: </b>0 - <br/>
352+
*
353+
* @param durationMillis <p>
354+
* The time duration of a segment in milliseconds, I.e. time
355+
* elapsed from StartTimestampMillis to EndTimestampMillis.
356+
* </p>
357+
* @return A reference to this updated object so that method calls can be
358+
* chained together.
359+
*/
360+
public ContentModerationDetection withDurationMillis(Long durationMillis) {
361+
this.durationMillis = durationMillis;
362+
return this;
363+
}
364+
152365
/**
153366
* Returns a string representation of this object; useful for testing and
154367
* debugging.
@@ -163,7 +376,13 @@ public String toString() {
163376
if (getTimestamp() != null)
164377
sb.append("Timestamp: " + getTimestamp() + ",");
165378
if (getModerationLabel() != null)
166-
sb.append("ModerationLabel: " + getModerationLabel());
379+
sb.append("ModerationLabel: " + getModerationLabel() + ",");
380+
if (getStartTimestampMillis() != null)
381+
sb.append("StartTimestampMillis: " + getStartTimestampMillis() + ",");
382+
if (getEndTimestampMillis() != null)
383+
sb.append("EndTimestampMillis: " + getEndTimestampMillis() + ",");
384+
if (getDurationMillis() != null)
385+
sb.append("DurationMillis: " + getDurationMillis());
167386
sb.append("}");
168387
return sb.toString();
169388
}
@@ -176,6 +395,12 @@ public int hashCode() {
176395
hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode());
177396
hashCode = prime * hashCode
178397
+ ((getModerationLabel() == null) ? 0 : getModerationLabel().hashCode());
398+
hashCode = prime * hashCode
399+
+ ((getStartTimestampMillis() == null) ? 0 : getStartTimestampMillis().hashCode());
400+
hashCode = prime * hashCode
401+
+ ((getEndTimestampMillis() == null) ? 0 : getEndTimestampMillis().hashCode());
402+
hashCode = prime * hashCode
403+
+ ((getDurationMillis() == null) ? 0 : getDurationMillis().hashCode());
179404
return hashCode;
180405
}
181406

@@ -200,6 +425,21 @@ public boolean equals(Object obj) {
200425
if (other.getModerationLabel() != null
201426
&& other.getModerationLabel().equals(this.getModerationLabel()) == false)
202427
return false;
428+
if (other.getStartTimestampMillis() == null ^ this.getStartTimestampMillis() == null)
429+
return false;
430+
if (other.getStartTimestampMillis() != null
431+
&& other.getStartTimestampMillis().equals(this.getStartTimestampMillis()) == false)
432+
return false;
433+
if (other.getEndTimestampMillis() == null ^ this.getEndTimestampMillis() == null)
434+
return false;
435+
if (other.getEndTimestampMillis() != null
436+
&& other.getEndTimestampMillis().equals(this.getEndTimestampMillis()) == false)
437+
return false;
438+
if (other.getDurationMillis() == null ^ this.getDurationMillis() == null)
439+
return false;
440+
if (other.getDurationMillis() != null
441+
&& other.getDurationMillis().equals(this.getDurationMillis()) == false)
442+
return false;
203443
return true;
204444
}
205445
}

0 commit comments

Comments
 (0)