Skip to content

Commit 88f12a7

Browse files
author
awstools
committed
feat(client-rekognition): Added support for ContentType to content moderation detections.
1 parent bbd68ba commit 88f12a7

File tree

4 files changed

+44
-20
lines changed

4 files changed

+44
-20
lines changed

clients/client-rekognition/src/commands/GetContentModerationCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ export interface GetContentModerationCommandOutput extends GetContentModerationR
9393
* // StartTimestampMillis: Number("long"),
9494
* // EndTimestampMillis: Number("long"),
9595
* // DurationMillis: Number("long"),
96+
* // ContentTypes: [ // ContentTypes
97+
* // { // ContentType
98+
* // Confidence: Number("float"),
99+
* // Name: "STRING_VALUE",
100+
* // },
101+
* // ],
96102
* // },
97103
* // ],
98104
* // NextToken: "STRING_VALUE",

clients/client-rekognition/src/models/models_0.ts

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,6 +1945,24 @@ export const ContentModerationAggregateBy = {
19451945
export type ContentModerationAggregateBy =
19461946
(typeof ContentModerationAggregateBy)[keyof typeof ContentModerationAggregateBy];
19471947

1948+
/**
1949+
* <p>Contains information regarding the confidence and name of a detected content type.</p>
1950+
* @public
1951+
*/
1952+
export interface ContentType {
1953+
/**
1954+
* <p>The confidence level of the label given</p>
1955+
* @public
1956+
*/
1957+
Confidence?: number;
1958+
1959+
/**
1960+
* <p>The name of the label</p>
1961+
* @public
1962+
*/
1963+
Name?: string;
1964+
}
1965+
19481966
/**
19491967
* <p>Provides information about a single type of inappropriate, unwanted, or
19501968
* offensive content found in an image or video. Each type of moderated content has a label
@@ -2021,6 +2039,13 @@ export interface ContentModerationDetection {
20212039
* @public
20222040
*/
20232041
DurationMillis?: number;
2042+
2043+
/**
2044+
* <p>A list of predicted results for the type of content an image contains. For example,
2045+
* the image content might be from animation, sports, or a video game.</p>
2046+
* @public
2047+
*/
2048+
ContentTypes?: ContentType[];
20242049
}
20252050

20262051
/**
@@ -2037,24 +2062,6 @@ export const ContentModerationSortBy = {
20372062
*/
20382063
export type ContentModerationSortBy = (typeof ContentModerationSortBy)[keyof typeof ContentModerationSortBy];
20392064

2040-
/**
2041-
* <p>Contains information regarding the confidence and name of a detected content type.</p>
2042-
* @public
2043-
*/
2044-
export interface ContentType {
2045-
/**
2046-
* <p>The confidence level of the label given</p>
2047-
* @public
2048-
*/
2049-
Confidence?: number;
2050-
2051-
/**
2052-
* <p>The name of the label</p>
2053-
* @public
2054-
*/
2055-
Name?: string;
2056-
}
2057-
20582065
/**
20592066
* <p>The S3 bucket and folder location where training output is placed.</p>
20602067
* @public
@@ -2458,7 +2465,11 @@ export interface CreateFaceLivenessSessionRequest {
24582465
*/
24592466
export interface CreateFaceLivenessSessionResponse {
24602467
/**
2461-
* <p>A unique 128-bit UUID identifying a Face Liveness session.</p>
2468+
* <p>A unique 128-bit UUID identifying a Face Liveness session.
2469+
* A new sessionID must be used for every Face Liveness check. If a given sessionID is used for subsequent
2470+
* Face Liveness checks, the checks will fail. Additionally, a SessionId expires 3 minutes after it's sent,
2471+
* making all Liveness data associated with the session (e.g., sessionID, reference image, audit images, etc.) unavailable.
2472+
* </p>
24622473
* @public
24632474
*/
24642475
SessionId: string | undefined;

clients/client-rekognition/src/protocols/Aws_json1_1.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4416,6 +4416,7 @@ const de_ConnectedHomeSettings = (output: any, context: __SerdeContext): Connect
44164416
*/
44174417
const de_ContentModerationDetection = (output: any, context: __SerdeContext): ContentModerationDetection => {
44184418
return take(output, {
4419+
ContentTypes: (_: any) => de_ContentTypes(_, context),
44194420
DurationMillis: __expectLong,
44204421
EndTimestampMillis: __expectLong,
44214422
ModerationLabel: (_: any) => de_ModerationLabel(_, context),

codegen/sdk-codegen/aws-models/rekognition.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,12 @@
11461146
"traits": {
11471147
"smithy.api#documentation": "<p> The time duration of a segment in milliseconds, I.e. time elapsed from\n StartTimestampMillis to EndTimestampMillis. </p>"
11481148
}
1149+
},
1150+
"ContentTypes": {
1151+
"target": "com.amazonaws.rekognition#ContentTypes",
1152+
"traits": {
1153+
"smithy.api#documentation": "<p>A list of predicted results for the type of content an image contains. For example, \n the image content might be from animation, sports, or a video game.</p>"
1154+
}
11491155
}
11501156
},
11511157
"traits": {
@@ -1642,7 +1648,7 @@
16421648
"SessionId": {
16431649
"target": "com.amazonaws.rekognition#LivenessSessionId",
16441650
"traits": {
1645-
"smithy.api#documentation": "<p>A unique 128-bit UUID identifying a Face Liveness session.</p>",
1651+
"smithy.api#documentation": "<p>A unique 128-bit UUID identifying a Face Liveness session. \n A new sessionID must be used for every Face Liveness check. If a given sessionID is used for subsequent \n Face Liveness checks, the checks will fail. Additionally, a SessionId expires 3 minutes after it's sent, \n making all Liveness data associated with the session (e.g., sessionID, reference image, audit images, etc.) unavailable.\n </p>",
16461652
"smithy.api#required": {}
16471653
}
16481654
}

0 commit comments

Comments
 (0)