claimsToAddOrOverride;
+ /**
+ * A list that contains claims to be suppressed from the identity token.
+ */
+ private String[] claimsToSuppress;
+ /**
+ * The output object containing the current group configuration.
+ */
+ private GroupConfiguration groupOverrideDetails;
+ }
+}
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/CognitoUserPoolPreTokenGenerationEventV2.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/CognitoUserPoolPreTokenGenerationEventV2.java
new file mode 100644
index 000000000..9faeb9704
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/CognitoUserPoolPreTokenGenerationEventV2.java
@@ -0,0 +1,134 @@
+/* Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. */
+
+package com.amazonaws.services.lambda.runtime.events;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.ToString;
+
+import java.util.Map;
+
+/**
+ * Represent the class for the Cognito User Pool Pre Token Generation Lambda Trigger V2
+ *
+ * See Pre Token Generation Lambda Trigger
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@ToString(callSuper = true)
+public class CognitoUserPoolPreTokenGenerationEventV2 extends CognitoUserPoolEvent {
+ /**
+ * The request from the Amazon Cognito service.
+ */
+ private Request request;
+
+ /**
+ * The response from your Lambda trigger.
+ */
+ private Response response;
+
+ @Builder(setterPrefix = "with")
+ public CognitoUserPoolPreTokenGenerationEventV2(
+ String version,
+ String triggerSource,
+ String region,
+ String userPoolId,
+ String userName,
+ CallerContext callerContext,
+ Request request,
+ Response response) {
+ super(version, triggerSource, region, userPoolId, userName, callerContext);
+ this.request = request;
+ this.response = response;
+ }
+
+ @Data
+ @EqualsAndHashCode(callSuper = true)
+ @NoArgsConstructor
+ @ToString(callSuper = true)
+ public static class Request extends CognitoUserPoolEvent.Request {
+
+ private String[] scopes;
+ private GroupConfiguration groupConfiguration;
+ private Map clientMetadata;
+
+ @Builder(setterPrefix = "with")
+ public Request(Map userAttributes, String[] scopes, GroupConfiguration groupConfiguration, Map clientMetadata) {
+ super(userAttributes);
+ this.scopes = scopes;
+ this.groupConfiguration = groupConfiguration;
+ this.clientMetadata = clientMetadata;
+ }
+ }
+
+ @Data
+ @AllArgsConstructor
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ public static class GroupConfiguration {
+ /**
+ * A list of the group names that are associated with the user that the identity token is issued for.
+ */
+ private String[] groupsToOverride;
+ /**
+ * A list of the current IAM roles associated with these groups.
+ */
+ private String[] iamRolesToOverride;
+ /**
+ * Indicates the preferred IAM role.
+ */
+ private String preferredRole;
+ }
+
+ @Data
+ @AllArgsConstructor
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ public static class Response {
+ private ClaimsAndScopeOverrideDetails claimsAndScopeOverrideDetails;
+ }
+
+ @Data
+ @AllArgsConstructor
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ public static class ClaimsAndScopeOverrideDetails {
+ private IdTokenGeneration idTokenGeneration;
+ private AccessTokenGeneration accessTokenGeneration;
+ private GroupOverrideDetails groupOverrideDetails;
+ }
+
+ @Data
+ @AllArgsConstructor
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ public static class IdTokenGeneration {
+ private Map claimsToAddOrOverride;
+ private String[] claimsToSuppress;
+ }
+
+ @Data
+ @AllArgsConstructor
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ public static class AccessTokenGeneration {
+ private Map claimsToAddOrOverride;
+ private String[] claimsToSuppress;
+ private String[] scopesToAdd;
+ private String[] scopesToSuppress;
+ }
+
+ @Data
+ @AllArgsConstructor
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ public static class GroupOverrideDetails {
+ private String[] groupsToOverride;
+ private String[] iamRolesToOverride;
+ private String preferredRole;
+ }
+}
\ No newline at end of file
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/CognitoUserPoolVerifyAuthChallengeResponseEvent.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/CognitoUserPoolVerifyAuthChallengeResponseEvent.java
new file mode 100644
index 000000000..982ff72fd
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/CognitoUserPoolVerifyAuthChallengeResponseEvent.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+package com.amazonaws.services.lambda.runtime.events;
+
+import lombok.*;
+
+import java.util.Map;
+
+/**
+ * Represent the class for the Cognito User Pool Verify Auth Challenge Response Lambda Trigger
+ *
+ * See Verify Auth Challenge Response Lambda Trigger
+ *
+ * @author jvdl
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@ToString(callSuper = true)
+public class CognitoUserPoolVerifyAuthChallengeResponseEvent extends CognitoUserPoolEvent {
+ /**
+ * The request from the Amazon Cognito service.
+ */
+ private Request request;
+
+ /**
+ * The response from your Lambda trigger.
+ */
+ private Response response;
+
+ @Builder(setterPrefix = "with")
+ public CognitoUserPoolVerifyAuthChallengeResponseEvent(
+ String version,
+ String triggerSource,
+ String region,
+ String userPoolId,
+ String userName,
+ CallerContext callerContext,
+ Request request,
+ Response response) {
+ super(version, triggerSource, region, userPoolId, userName, callerContext);
+ this.request = request;
+ this.response = response;
+ }
+
+ @Data
+ @EqualsAndHashCode(callSuper = true)
+ @NoArgsConstructor
+ @ToString(callSuper = true)
+ public static class Request extends CognitoUserPoolEvent.Request {
+ /**
+ * One or more key-value pairs that you can provide as custom input to the Lambda function that you specify for the verify auth challenge trigger.
+ */
+ private Map clientMetadata;
+ /**
+ * This parameter comes from the Create Auth Challenge trigger, and is compared against a user's challengeAnswer to determine whether the user passed the challenge.
+ */
+ private Map privateChallengeParameters;
+ /**
+ * The answer from the user's response to the challenge.
+ */
+ private String challengeAnswer;
+ /**
+ * This boolean is populated when PreventUserExistenceErrors is set to ENABLED for your User Pool client
+ */
+ private boolean userNotFound;
+
+ @Builder(setterPrefix = "with")
+ public Request(Map userAttributes,
+ Map clientMetadata,
+ String challengeAnswer,
+ Map privateChallengeParameters,
+ boolean userNotFound) {
+ super(userAttributes);
+ this.clientMetadata = clientMetadata;
+ this.userNotFound = userNotFound;
+ this.challengeAnswer = challengeAnswer;
+ this.privateChallengeParameters = privateChallengeParameters;
+ }
+ }
+
+ @AllArgsConstructor
+ @Builder(setterPrefix = "with")
+ @Data
+ @NoArgsConstructor
+ public static class Response {
+ /**
+ * Set to true if the user has successfully completed the challenge, or false otherwise.
+ */
+ private boolean answerCorrect;
+ }
+}
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/ConnectEvent.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/ConnectEvent.java
new file mode 100644
index 000000000..e94875614
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/ConnectEvent.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+package com.amazonaws.services.lambda.runtime.events;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * Class to represent an Amazon Connect contact flow event.
+ *
+ * @see parameters;
+ }
+
+ @Data
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ @AllArgsConstructor
+ public static class ContactData implements Serializable, Cloneable {
+ private Map attributes;
+ private String channel;
+ private String contactId;
+ private CustomerEndpoint customerEndpoint;
+ private String initialContactId;
+ private String initiationMethod;
+ private String instanceArn;
+ private String previousContactId;
+ private Queue queue;
+ private SystemEndpoint systemEndpoint;
+ }
+
+ @Data
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ @AllArgsConstructor
+ public static class CustomerEndpoint implements Serializable, Cloneable {
+ private String address;
+ private String type;
+ }
+
+ @Data
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ @AllArgsConstructor
+ public static class SystemEndpoint implements Serializable, Cloneable {
+ private String address;
+ private String type;
+ }
+ @Data
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ @AllArgsConstructor
+ public static class Queue implements Serializable, Cloneable {
+ private String name;
+ private String ARN;
+ }
+
+}
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/DynamodbEvent.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/DynamodbEvent.java
index 6853e381d..353f587f0 100644
--- a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/DynamodbEvent.java
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/DynamodbEvent.java
@@ -1,9 +1,17 @@
-/* Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. */
-
+/*
+ * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
package com.amazonaws.services.lambda.runtime.events;
-import com.amazonaws.services.dynamodbv2.model.Record;
-
import java.io.Serializable;
import java.util.List;
@@ -19,7 +27,7 @@ public class DynamodbEvent implements Serializable, Cloneable {
/**
* The unit of data of an Amazon DynamoDB event
*/
- public static class DynamodbStreamRecord extends Record {
+ public static class DynamodbStreamRecord extends com.amazonaws.services.lambda.runtime.events.models.dynamodb.Record {
private static final long serialVersionUID = 3638381544604354963L;
@@ -52,7 +60,7 @@ public void setEventSourceARN(String eventSourceARN) {
*
* @return A string representation of this object.
*
- * @see java.lang.Object#toString()
+ * @see Object#toString()
*/
@Override
public String toString() {
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/DynamodbTimeWindowEvent.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/DynamodbTimeWindowEvent.java
new file mode 100644
index 000000000..64ed9fb29
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/DynamodbTimeWindowEvent.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+package com.amazonaws.services.lambda.runtime.events;
+
+import com.amazonaws.services.lambda.runtime.events.models.TimeWindow;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Represents an Amazon Dynamodb event when using time windows.
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class DynamodbTimeWindowEvent extends DynamodbEvent implements Serializable, Cloneable {
+
+ private static final long serialVersionUID = -5449871161108629510L;
+
+ /**
+ * Time window for the records in the event.
+ */
+ private TimeWindow window;
+
+ /**
+ * State being built up to this invoke in the time window.
+ */
+ private Map state;
+
+ /**
+ * Shard id of the records
+ */
+ private String shardId;
+
+ /**
+ * Dynamodb stream arn.
+ */
+ private String eventSourceArn;
+
+ /**
+ * Set to true for the last invoke of the time window. Subsequent invoke will start a new time window along with a fresh state.
+ */
+ private Boolean isFinalInvokeForWindow;
+
+ /**
+ * Set to true if window is terminated prematurely. Subsequent invoke will continue the same window with a fresh state.
+ */
+ private Boolean isWindowTerminatedEarly;
+
+ @Builder(setterPrefix = "with")
+ public DynamodbTimeWindowEvent(
+ final List records,
+ final TimeWindow window,
+ final Map state,
+ final String shardId,
+ final String eventSourceArn,
+ final Boolean isFinalInvokeForWindow,
+ final Boolean isWindowTerminatedEarly) {
+ this.setRecords(records);
+ this.window = window;
+ this.state = state;
+ this.shardId = shardId;
+ this.eventSourceArn = eventSourceArn;
+ this.isFinalInvokeForWindow = isFinalInvokeForWindow;
+ this.isWindowTerminatedEarly = isWindowTerminatedEarly;
+ }
+}
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/IamPolicyResponse.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/IamPolicyResponse.java
new file mode 100644
index 000000000..e8d3b13d9
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/IamPolicyResponse.java
@@ -0,0 +1,92 @@
+package com.amazonaws.services.lambda.runtime.events;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The IAM Policy Response required for API Gateway HTTP APIs
+ *
+ * https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html
+ *
+ */
+
+@Data
+@Builder(setterPrefix = "with")
+@NoArgsConstructor
+@AllArgsConstructor
+public class IamPolicyResponse implements Serializable, Cloneable {
+
+ public static final String EXECUTE_API_INVOKE = "execute-api:Invoke";
+ public static final String VERSION_2012_10_17 = "2012-10-17";
+ public static final String ALLOW = "Allow";
+ public static final String DENY = "Deny";
+
+ private String principalId;
+ private PolicyDocument policyDocument;
+ private Map context;
+
+ public Map getPolicyDocument() {
+ Map serializablePolicy = new HashMap<>();
+ serializablePolicy.put("Version", policyDocument.getVersion());
+
+ int numberOfStatements = policyDocument.getStatement().size();
+ Map[] serializableStatementArray = new Map[numberOfStatements];
+ for (int i = 0; i < numberOfStatements; i++) {
+ Statement statement = policyDocument.getStatement().get(i);
+ Map serializableStatement = new HashMap<>();
+ serializableStatement.put("Effect", statement.getEffect());
+ serializableStatement.put("Action", statement.getAction());
+ serializableStatement.put("Resource", statement.getResource().toArray(new String[0]));
+ serializableStatement.put("Condition", statement.getCondition());
+ serializableStatementArray[i] = serializableStatement;
+ }
+ serializablePolicy.put("Statement", serializableStatementArray);
+ return serializablePolicy;
+ }
+
+ public static Statement allowStatement(String resource) {
+ return Statement.builder()
+ .withEffect(ALLOW)
+ .withResource(Collections.singletonList(resource))
+ .withAction(EXECUTE_API_INVOKE)
+ .build();
+ }
+
+ public static Statement denyStatement(String resource) {
+ return Statement.builder()
+ .withEffect(DENY)
+ .withResource(Collections.singletonList(resource))
+ .withAction(EXECUTE_API_INVOKE)
+ .build();
+ }
+
+ @Data
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ @AllArgsConstructor
+ public static class PolicyDocument implements Serializable, Cloneable {
+
+ private String version;
+ private List statement;
+ }
+
+ @Data
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ @AllArgsConstructor
+ public static class Statement implements Serializable, Cloneable {
+
+ private String action;
+ private String effect;
+ private List resource;
+ private Map> condition;
+ }
+}
\ No newline at end of file
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/IamPolicyResponseV1.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/IamPolicyResponseV1.java
new file mode 100644
index 000000000..a4316536f
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/IamPolicyResponseV1.java
@@ -0,0 +1,93 @@
+package com.amazonaws.services.lambda.runtime.events;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The IAM Policy Response required for API Gateway REST APIs
+ *
+ * https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html
+ *
+ */
+
+@Data
+@Builder(setterPrefix = "with")
+@NoArgsConstructor
+@AllArgsConstructor
+public class IamPolicyResponseV1 implements Serializable, Cloneable {
+
+ public static final String EXECUTE_API_INVOKE = "execute-api:Invoke";
+ public static final String VERSION_2012_10_17 = "2012-10-17";
+ public static final String ALLOW = "Allow";
+ public static final String DENY = "Deny";
+
+ private String principalId;
+ private PolicyDocument policyDocument;
+ private Map context;
+ private String usageIdentifierKey;
+
+ public Map getPolicyDocument() {
+ Map serializablePolicy = new HashMap<>();
+ serializablePolicy.put("Version", policyDocument.getVersion());
+
+ int numberOfStatements = policyDocument.getStatement().size();
+ Map[] serializableStatementArray = new Map[numberOfStatements];
+ for (int i = 0; i < numberOfStatements; i++) {
+ Statement statement = policyDocument.getStatement().get(i);
+ Map serializableStatement = new HashMap<>();
+ serializableStatement.put("Effect", statement.getEffect());
+ serializableStatement.put("Action", statement.getAction());
+ serializableStatement.put("Resource", statement.getResource().toArray(new String[0]));
+ serializableStatement.put("Condition", statement.getCondition());
+ serializableStatementArray[i] = serializableStatement;
+ }
+ serializablePolicy.put("Statement", serializableStatementArray);
+ return serializablePolicy;
+ }
+
+ public static Statement allowStatement(String resource) {
+ return Statement.builder()
+ .withEffect(ALLOW)
+ .withResource(Collections.singletonList(resource))
+ .withAction(EXECUTE_API_INVOKE)
+ .build();
+ }
+
+ public static Statement denyStatement(String resource) {
+ return Statement.builder()
+ .withEffect(DENY)
+ .withResource(Collections.singletonList(resource))
+ .withAction(EXECUTE_API_INVOKE)
+ .build();
+ }
+
+ @Data
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ @AllArgsConstructor
+ public static class PolicyDocument implements Serializable, Cloneable {
+
+ private String version;
+ private List statement;
+ }
+
+ @Data
+ @Builder(setterPrefix = "with")
+ @NoArgsConstructor
+ @AllArgsConstructor
+ public static class Statement implements Serializable, Cloneable {
+
+ private String action;
+ private String effect;
+ private List resource;
+ private Map> condition;
+ }
+}
\ No newline at end of file
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/KafkaEvent.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/KafkaEvent.java
new file mode 100644
index 000000000..aa6c00de3
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/KafkaEvent.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+package com.amazonaws.services.lambda.runtime.events;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import java.util.List;
+import java.util.Map;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder(setterPrefix = "with")
+/** Represents a Kafka Event. **/
+public class KafkaEvent {
+ private Map> records;
+ private String eventSource;
+ private String eventSourceArn;
+ private String bootstrapServers;
+
+ @Data
+ @NoArgsConstructor
+ @AllArgsConstructor
+ @Builder(setterPrefix = "with")
+ public static class KafkaEventRecord {
+ private String topic;
+ private int partition;
+ private long offset;
+ private long timestamp;
+ private String timestampType;
+ private String key;
+ private String value;
+ private List
+ *
+ * "S": "Hello"
+ */
+ public AttributeValue(String s) {
+ setS(s);
+ }
+
+ /**
+ * Constructs a new DynamodbAttributeValue object. Callers should use the setter or fluent setter (with...) methods to
+ * initialize any additional object members.
+ *
+ * @param sS
+ * An attribute of type String Set. For example:
+ *
+ * "SS": ["Giraffe", "Hippo" ,"Zebra"]
+ */
+ public AttributeValue(java.util.List sS) {
+ setSS(sS);
+ }
+
+ /**
+ *
+ * An attribute of type String. For example:
+ *
+ *
+ * "S": "Hello"
+ *
+ *
+ * @param s
+ * An attribute of type String. For example:
+ *
+ * "S": "Hello"
+ */
+
+ public void setS(String s) {
+ this.s = s;
+ }
+
+ /**
+ *
+ * An attribute of type String. For example:
+ *
+ *
+ * "S": "Hello"
+ *
+ *
+ * @return An attribute of type String. For example:
+ *
+ * "S": "Hello"
+ */
+
+ public String getS() {
+ return this.s;
+ }
+
+ /**
+ *
+ * An attribute of type String. For example:
+ *
+ *
+ * "S": "Hello"
+ *
+ *
+ * @param s
+ * An attribute of type String. For example:
+ *
+ * "S": "Hello"
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withS(String s) {
+ setS(s);
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type Number. For example:
+ *
+ *
+ * "N": "123.45"
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ *
+ *
+ * @param n
+ * An attribute of type Number. For example:
+ *
+ * "N": "123.45"
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ */
+
+ public void setN(String n) {
+ this.n = n;
+ }
+
+ /**
+ *
+ * An attribute of type Number. For example:
+ *
+ *
+ * "N": "123.45"
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ *
+ *
+ * @return An attribute of type Number. For example:
+ *
+ * "N": "123.45"
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages
+ * and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ */
+
+ public String getN() {
+ return this.n;
+ }
+
+ /**
+ *
+ * An attribute of type Number. For example:
+ *
+ *
+ * "N": "123.45"
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ *
+ *
+ * @param n
+ * An attribute of type Number. For example:
+ *
+ * "N": "123.45"
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withN(String n) {
+ setN(n);
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type Binary. For example:
+ *
+ *
+ * "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
+ *
+ *
+ * The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service.
+ * Users of the SDK should not perform Base64 encoding on this field.
+ *
+ *
+ * Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will
+ * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or
+ * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future
+ * major version of the SDK.
+ *
+ *
+ * @param b
+ * An attribute of type Binary. For example:
+ *
+ * "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
+ */
+
+ public void setB(java.nio.ByteBuffer b) {
+ this.b = b;
+ }
+
+ /**
+ *
+ * An attribute of type Binary. For example:
+ *
+ *
+ * "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
+ *
+ *
+ * {@code ByteBuffer}s are stateful. Calling their {@code get} methods changes their {@code position}. We recommend
+ * using {@link java.nio.ByteBuffer#asReadOnlyBuffer()} to create a read-only view of the buffer with an independent
+ * {@code position}, and calling {@code get} methods on this rather than directly on the returned {@code ByteBuffer}.
+ * Doing so will ensure that anyone else using the {@code ByteBuffer} will not be affected by changes to the
+ * {@code position}.
+ *
+ *
+ * @return An attribute of type Binary. For example:
+ *
+ * "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
+ */
+
+ public java.nio.ByteBuffer getB() {
+ return this.b;
+ }
+
+ /**
+ *
+ * An attribute of type Binary. For example:
+ *
+ *
+ * "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
+ *
+ *
+ * The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service.
+ * Users of the SDK should not perform Base64 encoding on this field.
+ *
+ *
+ * Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will
+ * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or
+ * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future
+ * major version of the SDK.
+ *
+ *
+ * @param b
+ * An attribute of type Binary. For example:
+ *
+ * "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withB(java.nio.ByteBuffer b) {
+ setB(b);
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type String Set. For example:
+ *
+ *
+ * "SS": ["Giraffe", "Hippo" ,"Zebra"]
+ *
+ *
+ * @return An attribute of type String Set. For example:
+ *
+ * "SS": ["Giraffe", "Hippo" ,"Zebra"]
+ */
+
+ public java.util.List getSS() {
+ return sS;
+ }
+
+ /**
+ *
+ * An attribute of type String Set. For example:
+ *
+ *
+ * "SS": ["Giraffe", "Hippo" ,"Zebra"]
+ *
+ *
+ * @param sS
+ * An attribute of type String Set. For example:
+ *
+ * "SS": ["Giraffe", "Hippo" ,"Zebra"]
+ */
+
+ public void setSS(java.util.Collection sS) {
+ if (sS == null) {
+ this.sS = null;
+ return;
+ }
+
+ this.sS = new java.util.ArrayList(sS);
+ }
+
+ /**
+ *
+ * An attribute of type String Set. For example:
+ *
+ *
+ * "SS": ["Giraffe", "Hippo" ,"Zebra"]
+ *
+ *
+ * NOTE: This method appends the values to the existing list (if any). Use
+ * {@link #setSS(java.util.Collection)} or {@link #withSS(java.util.Collection)} if you want to override the
+ * existing values.
+ *
+ *
+ * @param sS
+ * An attribute of type String Set. For example:
+ *
+ * "SS": ["Giraffe", "Hippo" ,"Zebra"]
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withSS(String... sS) {
+ if (this.sS == null) {
+ setSS(new java.util.ArrayList(sS.length));
+ }
+ for (String ele : sS) {
+ this.sS.add(ele);
+ }
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type String Set. For example:
+ *
+ *
+ * "SS": ["Giraffe", "Hippo" ,"Zebra"]
+ *
+ *
+ * @param sS
+ * An attribute of type String Set. For example:
+ *
+ * "SS": ["Giraffe", "Hippo" ,"Zebra"]
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withSS(java.util.Collection sS) {
+ setSS(sS);
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type Number Set. For example:
+ *
+ *
+ * "NS": ["42.2", "-19", "7.5", "3.14"]
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ *
+ *
+ * @return An attribute of type Number Set. For example:
+ *
+ * "NS": ["42.2", "-19", "7.5", "3.14"]
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages
+ * and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ */
+
+ public java.util.List getNS() {
+ return nS;
+ }
+
+ /**
+ *
+ * An attribute of type Number Set. For example:
+ *
+ *
+ * "NS": ["42.2", "-19", "7.5", "3.14"]
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ *
+ *
+ * @param nS
+ * An attribute of type Number Set. For example:
+ *
+ * "NS": ["42.2", "-19", "7.5", "3.14"]
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ */
+
+ public void setNS(java.util.Collection nS) {
+ if (nS == null) {
+ this.nS = null;
+ return;
+ }
+
+ this.nS = new java.util.ArrayList(nS);
+ }
+
+ /**
+ *
+ * An attribute of type Number Set. For example:
+ *
+ *
+ * "NS": ["42.2", "-19", "7.5", "3.14"]
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ *
+ *
+ * NOTE: This method appends the values to the existing list (if any). Use
+ * {@link #setNS(java.util.Collection)} or {@link #withNS(java.util.Collection)} if you want to override the
+ * existing values.
+ *
+ *
+ * @param nS
+ * An attribute of type Number Set. For example:
+ *
+ * "NS": ["42.2", "-19", "7.5", "3.14"]
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withNS(String... nS) {
+ if (this.nS == null) {
+ setNS(new java.util.ArrayList(nS.length));
+ }
+ for (String ele : nS) {
+ this.nS.add(ele);
+ }
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type Number Set. For example:
+ *
+ *
+ * "NS": ["42.2", "-19", "7.5", "3.14"]
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ *
+ *
+ * @param nS
+ * An attribute of type Number Set. For example:
+ *
+ * "NS": ["42.2", "-19", "7.5", "3.14"]
+ *
+ *
+ * Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and
+ * libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withNS(java.util.Collection nS) {
+ setNS(nS);
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type Binary Set. For example:
+ *
+ *
+ * "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
+ *
+ *
+ * @return An attribute of type Binary Set. For example:
+ *
+ * "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
+ */
+
+ public java.util.List getBS() {
+ return bS;
+ }
+
+ /**
+ *
+ * An attribute of type Binary Set. For example:
+ *
+ *
+ * "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
+ *
+ *
+ * @param bS
+ * An attribute of type Binary Set. For example:
+ *
+ * "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
+ */
+
+ public void setBS(java.util.Collection bS) {
+ if (bS == null) {
+ this.bS = null;
+ return;
+ }
+
+ this.bS = new java.util.ArrayList(bS);
+ }
+
+ /**
+ *
+ * An attribute of type Binary Set. For example:
+ *
+ *
+ * "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
+ *
+ *
+ * NOTE: This method appends the values to the existing list (if any). Use
+ * {@link #setBS(java.util.Collection)} or {@link #withBS(java.util.Collection)} if you want to override the
+ * existing values.
+ *
+ *
+ * @param bS
+ * An attribute of type Binary Set. For example:
+ *
+ * "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withBS(java.nio.ByteBuffer... bS) {
+ if (this.bS == null) {
+ setBS(new java.util.ArrayList(bS.length));
+ }
+ for (java.nio.ByteBuffer ele : bS) {
+ this.bS.add(ele);
+ }
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type Binary Set. For example:
+ *
+ *
+ * "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
+ *
+ *
+ * @param bS
+ * An attribute of type Binary Set. For example:
+ *
+ * "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withBS(java.util.Collection bS) {
+ setBS(bS);
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type Map. For example:
+ *
+ *
+ * "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
+ *
+ *
+ * @return An attribute of type Map. For example:
+ *
+ * "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
+ */
+
+ public java.util.Map getM() {
+ return m;
+ }
+
+ /**
+ *
+ * An attribute of type Map. For example:
+ *
+ *
+ * "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
+ *
+ *
+ * @param m
+ * An attribute of type Map. For example:
+ *
+ * "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
+ */
+
+ public void setM(java.util.Map m) {
+ this.m = m;
+ }
+
+ /**
+ *
+ * An attribute of type Map. For example:
+ *
+ *
+ * "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
+ *
+ *
+ * @param m
+ * An attribute of type Map. For example:
+ *
+ * "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withM(java.util.Map m) {
+ setM(m);
+ return this;
+ }
+
+ public AttributeValue addMEntry(String key, AttributeValue value) {
+ if (null == this.m) {
+ this.m = new java.util.HashMap();
+ }
+ if (this.m.containsKey(key))
+ throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
+ this.m.put(key, value);
+ return this;
+ }
+
+ /**
+ * Removes all the entries added into M.
+ *
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue clearMEntries() {
+ this.m = null;
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type List. For example:
+ *
+ *
+ * "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
+ *
+ *
+ * @return An attribute of type List. For example:
+ *
+ * "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
+ */
+
+ public java.util.List getL() {
+ return l;
+ }
+
+ /**
+ *
+ * An attribute of type List. For example:
+ *
+ *
+ * "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
+ *
+ *
+ * @param l
+ * An attribute of type List. For example:
+ *
+ * "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
+ */
+
+ public void setL(java.util.Collection l) {
+ if (l == null) {
+ this.l = null;
+ return;
+ }
+
+ this.l = new java.util.ArrayList(l);
+ }
+
+ /**
+ *
+ * An attribute of type List. For example:
+ *
+ *
+ * "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
+ *
+ *
+ * NOTE: This method appends the values to the existing list (if any). Use
+ * {@link #setL(java.util.Collection)} or {@link #withL(java.util.Collection)} if you want to override the existing
+ * values.
+ *
+ *
+ * @param l
+ * An attribute of type List. For example:
+ *
+ * "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withL(AttributeValue... l) {
+ if (this.l == null) {
+ setL(new java.util.ArrayList(l.length));
+ }
+ for (AttributeValue ele : l) {
+ this.l.add(ele);
+ }
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type List. For example:
+ *
+ *
+ * "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
+ *
+ *
+ * @param l
+ * An attribute of type List. For example:
+ *
+ * "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withL(java.util.Collection l) {
+ setL(l);
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type Null. For example:
+ *
+ *
+ * "NULL": true
+ *
+ *
+ * @param nULLValue
+ * An attribute of type Null. For example:
+ *
+ * "NULL": true
+ */
+
+ public void setNULL(Boolean nULLValue) {
+ this.nULLValue = nULLValue;
+ }
+
+ /**
+ *
+ * An attribute of type Null. For example:
+ *
+ *
+ * "NULL": true
+ *
+ *
+ * @return An attribute of type Null. For example:
+ *
+ * "NULL": true
+ */
+
+ public Boolean getNULL() {
+ return this.nULLValue;
+ }
+
+ /**
+ *
+ * An attribute of type Null. For example:
+ *
+ *
+ * "NULL": true
+ *
+ *
+ * @param nULLValue
+ * An attribute of type Null. For example:
+ *
+ * "NULL": true
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withNULL(Boolean nULLValue) {
+ setNULL(nULLValue);
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type Null. For example:
+ *
+ *
+ * "NULL": true
+ *
+ *
+ * @return An attribute of type Null. For example:
+ *
+ * "NULL": true
+ */
+
+ public Boolean isNULL() {
+ return this.nULLValue;
+ }
+
+ /**
+ *
+ * An attribute of type Boolean. For example:
+ *
+ *
+ * "BOOL": true
+ *
+ *
+ * @param bOOL
+ * An attribute of type Boolean. For example:
+ *
+ * "BOOL": true
+ */
+
+ public void setBOOL(Boolean bOOL) {
+ this.bOOL = bOOL;
+ }
+
+ /**
+ *
+ * An attribute of type Boolean. For example:
+ *
+ *
+ * "BOOL": true
+ *
+ *
+ * @return An attribute of type Boolean. For example:
+ *
+ * "BOOL": true
+ */
+
+ public Boolean getBOOL() {
+ return this.bOOL;
+ }
+
+ /**
+ *
+ * An attribute of type Boolean. For example:
+ *
+ *
+ * "BOOL": true
+ *
+ *
+ * @param bOOL
+ * An attribute of type Boolean. For example:
+ *
+ * "BOOL": true
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+
+ public AttributeValue withBOOL(Boolean bOOL) {
+ setBOOL(bOOL);
+ return this;
+ }
+
+ /**
+ *
+ * An attribute of type Boolean. For example:
+ *
+ *
+ * "BOOL": true
+ *
+ *
+ * @return An attribute of type Boolean. For example:
+ *
+ * "BOOL": true
+ */
+
+ public Boolean isBOOL() {
+ return this.bOOL;
+ }
+
+ /**
+ * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
+ * redacted from this string using a placeholder value.
+ *
+ * @return A string representation of this object.
+ *
+ * @see Object#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("{");
+ if (getS() != null)
+ sb.append("S: ").append(getS()).append(",");
+ if (getN() != null)
+ sb.append("N: ").append(getN()).append(",");
+ if (getB() != null)
+ sb.append("B: ").append(getB()).append(",");
+ if (getSS() != null)
+ sb.append("SS: ").append(getSS()).append(",");
+ if (getNS() != null)
+ sb.append("NS: ").append(getNS()).append(",");
+ if (getBS() != null)
+ sb.append("BS: ").append(getBS()).append(",");
+ if (getM() != null)
+ sb.append("M: ").append(getM()).append(",");
+ if (getL() != null)
+ sb.append("L: ").append(getL()).append(",");
+ if (getNULL() != null)
+ sb.append("NULL: ").append(getNULL()).append(",");
+ if (getBOOL() != null)
+ sb.append("BOOL: ").append(getBOOL());
+ sb.append("}");
+ return sb.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+
+ if (obj instanceof AttributeValue == false)
+ return false;
+ AttributeValue other = (AttributeValue) obj;
+ if (other.getS() == null ^ this.getS() == null)
+ return false;
+ if (other.getS() != null && other.getS().equals(this.getS()) == false)
+ return false;
+ if (other.getN() == null ^ this.getN() == null)
+ return false;
+ if (other.getN() != null && other.getN().equals(this.getN()) == false)
+ return false;
+ if (other.getB() == null ^ this.getB() == null)
+ return false;
+ if (other.getB() != null && other.getB().equals(this.getB()) == false)
+ return false;
+ if (other.getSS() == null ^ this.getSS() == null)
+ return false;
+ if (other.getSS() != null && other.getSS().equals(this.getSS()) == false)
+ return false;
+ if (other.getNS() == null ^ this.getNS() == null)
+ return false;
+ if (other.getNS() != null && other.getNS().equals(this.getNS()) == false)
+ return false;
+ if (other.getBS() == null ^ this.getBS() == null)
+ return false;
+ if (other.getBS() != null && other.getBS().equals(this.getBS()) == false)
+ return false;
+ if (other.getM() == null ^ this.getM() == null)
+ return false;
+ if (other.getM() != null && other.getM().equals(this.getM()) == false)
+ return false;
+ if (other.getL() == null ^ this.getL() == null)
+ return false;
+ if (other.getL() != null && other.getL().equals(this.getL()) == false)
+ return false;
+ if (other.getNULL() == null ^ this.getNULL() == null)
+ return false;
+ if (other.getNULL() != null && other.getNULL().equals(this.getNULL()) == false)
+ return false;
+ if (other.getBOOL() == null ^ this.getBOOL() == null)
+ return false;
+ if (other.getBOOL() != null && other.getBOOL().equals(this.getBOOL()) == false)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int hashCode = 1;
+
+ hashCode = prime * hashCode + ((getS() == null) ? 0 : getS().hashCode());
+ hashCode = prime * hashCode + ((getN() == null) ? 0 : getN().hashCode());
+ hashCode = prime * hashCode + ((getB() == null) ? 0 : getB().hashCode());
+ hashCode = prime * hashCode + ((getSS() == null) ? 0 : getSS().hashCode());
+ hashCode = prime * hashCode + ((getNS() == null) ? 0 : getNS().hashCode());
+ hashCode = prime * hashCode + ((getBS() == null) ? 0 : getBS().hashCode());
+ hashCode = prime * hashCode + ((getM() == null) ? 0 : getM().hashCode());
+ hashCode = prime * hashCode + ((getL() == null) ? 0 : getL().hashCode());
+ hashCode = prime * hashCode + ((getNULL() == null) ? 0 : getNULL().hashCode());
+ hashCode = prime * hashCode + ((getBOOL() == null) ? 0 : getBOOL().hashCode());
+ return hashCode;
+ }
+
+ @Override
+ public AttributeValue clone() {
+ try {
+ return (AttributeValue) super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() even though we're Cloneable!", e);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/Identity.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/Identity.java
new file mode 100644
index 000000000..12b2fbba1
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/Identity.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+package com.amazonaws.services.lambda.runtime.events.models.dynamodb;
+
+import java.io.Serializable;
+
+/**
+ *
+ * Contains details about the type of identity that made the request.
+ *
+ *
+ * @see AWS API
+ * Documentation
+ */
+public class Identity implements Serializable, Cloneable {
+
+ /**
+ *
+ * A unique identifier for the entity that made the call. For Time To Live, the principalId is
+ * "dynamodb.amazonaws.com".
+ *
+ */
+ private String principalId;
+
+ /**
+ *
+ * The type of the identity. For Time To Live, the type is "Service".
+ *
+ */
+ private String type;
+
+ /**
+ *
+ * A unique identifier for the entity that made the call. For Time To Live, the principalId is
+ * "dynamodb.amazonaws.com".
+ *
+ *
+ * @param principalId
+ * A unique identifier for the entity that made the call. For Time To Live, the principalId is
+ * "dynamodb.amazonaws.com".
+ */
+ public void setPrincipalId(String principalId) {
+ this.principalId = principalId;
+ }
+
+ /**
+ *
+ * A unique identifier for the entity that made the call. For Time To Live, the principalId is
+ * "dynamodb.amazonaws.com".
+ *
+ *
+ * @return A unique identifier for the entity that made the call. For Time To Live, the principalId is
+ * "dynamodb.amazonaws.com".
+ */
+ public String getPrincipalId() {
+ return this.principalId;
+ }
+
+ /**
+ *
+ * A unique identifier for the entity that made the call. For Time To Live, the principalId is
+ * "dynamodb.amazonaws.com".
+ *
+ *
+ * @param principalId
+ * A unique identifier for the entity that made the call. For Time To Live, the principalId is
+ * "dynamodb.amazonaws.com".
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Identity withPrincipalId(String principalId) {
+ setPrincipalId(principalId);
+ return this;
+ }
+
+ /**
+ *
+ * The type of the identity. For Time To Live, the type is "Service".
+ *
+ *
+ * @param type
+ * The type of the identity. For Time To Live, the type is "Service".
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * The type of the identity. For Time To Live, the type is "Service".
+ *
+ *
+ * @return The type of the identity. For Time To Live, the type is "Service".
+ */
+ public String getType() {
+ return this.type;
+ }
+
+ /**
+ *
+ * The type of the identity. For Time To Live, the type is "Service".
+ *
+ *
+ * @param type
+ * The type of the identity. For Time To Live, the type is "Service".
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Identity withType(String type) {
+ setType(type);
+ return this;
+ }
+
+ /**
+ * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
+ * redacted from this string using a placeholder value.
+ *
+ * @return A string representation of this object.
+ *
+ * @see Object#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("{");
+ if (getPrincipalId() != null)
+ sb.append("PrincipalId: ").append(getPrincipalId()).append(",");
+ if (getType() != null)
+ sb.append("Type: ").append(getType());
+ sb.append("}");
+ return sb.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+
+ if (obj instanceof Identity == false)
+ return false;
+ Identity other = (Identity) obj;
+ if (other.getPrincipalId() == null ^ this.getPrincipalId() == null)
+ return false;
+ if (other.getPrincipalId() != null && other.getPrincipalId().equals(this.getPrincipalId()) == false)
+ return false;
+ if (other.getType() == null ^ this.getType() == null)
+ return false;
+ if (other.getType() != null && other.getType().equals(this.getType()) == false)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int hashCode = 1;
+
+ hashCode = prime * hashCode + ((getPrincipalId() == null) ? 0 : getPrincipalId().hashCode());
+ hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
+ return hashCode;
+ }
+
+ @Override
+ public Identity clone() {
+ try {
+ return (Identity) super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
+ }
+ }
+
+}
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/OperationType.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/OperationType.java
new file mode 100644
index 000000000..8d5574ee1
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/OperationType.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+package com.amazonaws.services.lambda.runtime.events.models.dynamodb;
+
+public enum OperationType {
+
+ INSERT("INSERT"),
+ MODIFY("MODIFY"),
+ REMOVE("REMOVE");
+
+ private String value;
+
+ private OperationType(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ /**
+ * Use this in place of valueOf.
+ *
+ * @param value
+ * real value
+ * @return OperationType corresponding to the value
+ *
+ * @throws IllegalArgumentException
+ * If the specified value does not map to one of the known values in this enum.
+ */
+ public static OperationType fromValue(String value) {
+ if (value == null || "".equals(value)) {
+ throw new IllegalArgumentException("Value cannot be null or empty!");
+ }
+
+ for (OperationType enumEntry : OperationType.values()) {
+ if (enumEntry.toString().equals(value)) {
+ return enumEntry;
+ }
+ }
+ throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
+ }
+}
\ No newline at end of file
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/Record.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/Record.java
new file mode 100644
index 000000000..81065811f
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/Record.java
@@ -0,0 +1,801 @@
+/*
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+package com.amazonaws.services.lambda.runtime.events.models.dynamodb;
+
+import java.io.Serializable;
+
+/**
+ *
+ * A description of a unique event within a stream.
+ *
+ *
+ * @see AWS API
+ * Documentation
+ */
+public class Record implements Serializable, Cloneable {
+
+ /**
+ *
+ * A globally unique identifier for the event that was recorded in this stream record.
+ *
+ */
+ private String eventID;
+ /**
+ *
+ * The type of data modification that was performed on the DynamoDB table:
+ *
+ *
+ * -
+ *
+ * INSERT - a new item was added to the table.
+ *
+ *
+ * -
+ *
+ * MODIFY - one or more of an existing item's attributes were modified.
+ *
+ *
+ * -
+ *
+ * REMOVE - the item was deleted from the table
+ *
+ *
+ *
+ */
+ private String eventName;
+ /**
+ *
+ * The version number of the stream record format. This number is updated whenever the structure of
+ * Record is modified.
+ *
+ *
+ * Client applications must not assume that eventVersion will remain at a particular value, as this
+ * number is subject to change at any time. In general, eventVersion will only increase as the
+ * low-level DynamoDB Streams API evolves.
+ *
+ */
+ private String eventVersion;
+ /**
+ *
+ * The AWS service from which the stream record originated. For DynamoDB Streams, this is aws:dynamodb.
+ *
+ */
+ private String eventSource;
+ /**
+ *
+ * The region in which the GetRecords request was received.
+ *
+ */
+ private String awsRegion;
+ /**
+ *
+ * The main body of the stream record, containing all of the DynamoDB-specific fields.
+ *
+ */
+ private StreamRecord dynamodb;
+ /**
+ *
+ * Items that are deleted by the Time to Live process after expiration have the following fields:
+ *
+ *
+ * -
+ *
+ * Records[].userIdentity.type
+ *
+ *
+ * "Service"
+ *
+ *
+ * -
+ *
+ * Records[].userIdentity.principalId
+ *
+ *
+ * "dynamodb.amazonaws.com"
+ *
+ *
+ *
+ */
+ private Identity userIdentity;
+
+ /**
+ *
+ * A globally unique identifier for the event that was recorded in this stream record.
+ *
+ *
+ * @param eventID
+ * A globally unique identifier for the event that was recorded in this stream record.
+ */
+ public void setEventID(String eventID) {
+ this.eventID = eventID;
+ }
+
+ /**
+ *
+ * A globally unique identifier for the event that was recorded in this stream record.
+ *
+ *
+ * @return A globally unique identifier for the event that was recorded in this stream record.
+ */
+ public String getEventID() {
+ return this.eventID;
+ }
+
+ /**
+ *
+ * A globally unique identifier for the event that was recorded in this stream record.
+ *
+ *
+ * @param eventID
+ * A globally unique identifier for the event that was recorded in this stream record.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Record withEventID(String eventID) {
+ setEventID(eventID);
+ return this;
+ }
+
+ /**
+ *
+ * The type of data modification that was performed on the DynamoDB table:
+ *
+ *
+ * -
+ *
+ * INSERT - a new item was added to the table.
+ *
+ *
+ * -
+ *
+ * MODIFY - one or more of an existing item's attributes were modified.
+ *
+ *
+ * -
+ *
+ * REMOVE - the item was deleted from the table
+ *
+ *
+ *
+ *
+ * @param eventName
+ * The type of data modification that was performed on the DynamoDB table:
+ *
+ * -
+ *
+ * INSERT - a new item was added to the table.
+ *
+ *
+ * -
+ *
+ * MODIFY - one or more of an existing item's attributes were modified.
+ *
+ *
+ * -
+ *
+ * REMOVE - the item was deleted from the table
+ *
+ *
+ * @see OperationType
+ */
+ public void setEventName(String eventName) {
+ this.eventName = eventName;
+ }
+
+ /**
+ *
+ * The type of data modification that was performed on the DynamoDB table:
+ *
+ *
+ * -
+ *
+ * INSERT - a new item was added to the table.
+ *
+ *
+ * -
+ *
+ * MODIFY - one or more of an existing item's attributes were modified.
+ *
+ *
+ * -
+ *
+ * REMOVE - the item was deleted from the table
+ *
+ *
+ *
+ *
+ * @return The type of data modification that was performed on the DynamoDB table:
+ *
+ * -
+ *
+ * INSERT - a new item was added to the table.
+ *
+ *
+ * -
+ *
+ * MODIFY - one or more of an existing item's attributes were modified.
+ *
+ *
+ * -
+ *
+ * REMOVE - the item was deleted from the table
+ *
+ *
+ * @see OperationType
+ */
+ public String getEventName() {
+ return this.eventName;
+ }
+
+ /**
+ *
+ * The type of data modification that was performed on the DynamoDB table:
+ *
+ *
+ * -
+ *
+ * INSERT - a new item was added to the table.
+ *
+ *
+ * -
+ *
+ * MODIFY - one or more of an existing item's attributes were modified.
+ *
+ *
+ * -
+ *
+ * REMOVE - the item was deleted from the table
+ *
+ *
+ *
+ *
+ * @param eventName
+ * The type of data modification that was performed on the DynamoDB table:
+ *
+ * -
+ *
+ * INSERT - a new item was added to the table.
+ *
+ *
+ * -
+ *
+ * MODIFY - one or more of an existing item's attributes were modified.
+ *
+ *
+ * -
+ *
+ * REMOVE - the item was deleted from the table
+ *
+ *
+ * @return Returns a reference to this object so that method calls can be chained together.
+ * @see OperationType
+ */
+ public Record withEventName(String eventName) {
+ setEventName(eventName);
+ return this;
+ }
+
+ /**
+ *
+ * The type of data modification that was performed on the DynamoDB table:
+ *
+ *
+ * -
+ *
+ * INSERT - a new item was added to the table.
+ *
+ *
+ * -
+ *
+ * MODIFY - one or more of an existing item's attributes were modified.
+ *
+ *
+ * -
+ *
+ * REMOVE - the item was deleted from the table
+ *
+ *
+ *
+ *
+ * @param eventName
+ * The type of data modification that was performed on the DynamoDB table:
+ *
+ * -
+ *
+ * INSERT - a new item was added to the table.
+ *
+ *
+ * -
+ *
+ * MODIFY - one or more of an existing item's attributes were modified.
+ *
+ *
+ * -
+ *
+ * REMOVE - the item was deleted from the table
+ *
+ *
+ * @see OperationType
+ */
+ public void setEventName(OperationType eventName) {
+ this.eventName = eventName.toString();
+ }
+
+ /**
+ *
+ * The type of data modification that was performed on the DynamoDB table:
+ *
+ *
+ * -
+ *
+ * INSERT - a new item was added to the table.
+ *
+ *
+ * -
+ *
+ * MODIFY - one or more of an existing item's attributes were modified.
+ *
+ *
+ * -
+ *
+ * REMOVE - the item was deleted from the table
+ *
+ *
+ *
+ *
+ * @param eventName
+ * The type of data modification that was performed on the DynamoDB table:
+ *
+ * -
+ *
+ * INSERT - a new item was added to the table.
+ *
+ *
+ * -
+ *
+ * MODIFY - one or more of an existing item's attributes were modified.
+ *
+ *
+ * -
+ *
+ * REMOVE - the item was deleted from the table
+ *
+ *
+ * @return Returns a reference to this object so that method calls can be chained together.
+ * @see OperationType
+ */
+ public Record withEventName(OperationType eventName) {
+ setEventName(eventName);
+ return this;
+ }
+
+ /**
+ *
+ * The version number of the stream record format. This number is updated whenever the structure of
+ * Record is modified.
+ *
+ *
+ * Client applications must not assume that eventVersion will remain at a particular value, as this
+ * number is subject to change at any time. In general, eventVersion will only increase as the
+ * low-level DynamoDB Streams API evolves.
+ *
+ *
+ * @param eventVersion
+ * The version number of the stream record format. This number is updated whenever the structure of
+ * Record is modified.
+ *
+ * Client applications must not assume that eventVersion will remain at a particular value, as
+ * this number is subject to change at any time. In general, eventVersion will only increase as
+ * the low-level DynamoDB Streams API evolves.
+ */
+ public void setEventVersion(String eventVersion) {
+ this.eventVersion = eventVersion;
+ }
+
+ /**
+ *
+ * The version number of the stream record format. This number is updated whenever the structure of
+ * Record is modified.
+ *
+ *
+ * Client applications must not assume that eventVersion will remain at a particular value, as this
+ * number is subject to change at any time. In general, eventVersion will only increase as the
+ * low-level DynamoDB Streams API evolves.
+ *
+ *
+ * @return The version number of the stream record format. This number is updated whenever the structure of
+ * Record is modified.
+ *
+ * Client applications must not assume that eventVersion will remain at a particular value, as
+ * this number is subject to change at any time. In general, eventVersion will only increase as
+ * the low-level DynamoDB Streams API evolves.
+ */
+ public String getEventVersion() {
+ return this.eventVersion;
+ }
+
+ /**
+ *
+ * The version number of the stream record format. This number is updated whenever the structure of
+ * Record is modified.
+ *
+ *
+ * Client applications must not assume that eventVersion will remain at a particular value, as this
+ * number is subject to change at any time. In general, eventVersion will only increase as the
+ * low-level DynamoDB Streams API evolves.
+ *
+ *
+ * @param eventVersion
+ * The version number of the stream record format. This number is updated whenever the structure of
+ * Record is modified.
+ *
+ * Client applications must not assume that eventVersion will remain at a particular value, as
+ * this number is subject to change at any time. In general, eventVersion will only increase as
+ * the low-level DynamoDB Streams API evolves.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Record withEventVersion(String eventVersion) {
+ setEventVersion(eventVersion);
+ return this;
+ }
+
+ /**
+ *
+ * The AWS service from which the stream record originated. For DynamoDB Streams, this is aws:dynamodb.
+ *
+ *
+ * @param eventSource
+ * The AWS service from which the stream record originated. For DynamoDB Streams, this is
+ * aws:dynamodb.
+ */
+ public void setEventSource(String eventSource) {
+ this.eventSource = eventSource;
+ }
+
+ /**
+ *
+ * The AWS service from which the stream record originated. For DynamoDB Streams, this is aws:dynamodb.
+ *
+ *
+ * @return The AWS service from which the stream record originated. For DynamoDB Streams, this is
+ * aws:dynamodb.
+ */
+ public String getEventSource() {
+ return this.eventSource;
+ }
+
+ /**
+ *
+ * The AWS service from which the stream record originated. For DynamoDB Streams, this is aws:dynamodb.
+ *
+ *
+ * @param eventSource
+ * The AWS service from which the stream record originated. For DynamoDB Streams, this is
+ * aws:dynamodb.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Record withEventSource(String eventSource) {
+ setEventSource(eventSource);
+ return this;
+ }
+
+ /**
+ *
+ * The region in which the GetRecords request was received.
+ *
+ *
+ * @param awsRegion
+ * The region in which the GetRecords request was received.
+ */
+ public void setAwsRegion(String awsRegion) {
+ this.awsRegion = awsRegion;
+ }
+
+ /**
+ *
+ * The region in which the GetRecords request was received.
+ *
+ *
+ * @return The region in which the GetRecords request was received.
+ */
+ public String getAwsRegion() {
+ return this.awsRegion;
+ }
+
+ /**
+ *
+ * The region in which the GetRecords request was received.
+ *
+ *
+ * @param awsRegion
+ * The region in which the GetRecords request was received.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Record withAwsRegion(String awsRegion) {
+ setAwsRegion(awsRegion);
+ return this;
+ }
+
+ /**
+ *
+ * The main body of the stream record, containing all of the DynamoDB-specific fields.
+ *
+ *
+ * @param dynamodb
+ * The main body of the stream record, containing all of the DynamoDB-specific fields.
+ */
+ public void setDynamodb(StreamRecord dynamodb) {
+ this.dynamodb = dynamodb;
+ }
+
+ /**
+ *
+ * The main body of the stream record, containing all of the DynamoDB-specific fields.
+ *
+ *
+ * @return The main body of the stream record, containing all of the DynamoDB-specific fields.
+ */
+ public StreamRecord getDynamodb() {
+ return this.dynamodb;
+ }
+
+ /**
+ *
+ * The main body of the stream record, containing all of the DynamoDB-specific fields.
+ *
+ *
+ * @param dynamodb
+ * The main body of the stream record, containing all of the DynamoDB-specific fields.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Record withDynamodb(StreamRecord dynamodb) {
+ setDynamodb(dynamodb);
+ return this;
+ }
+
+ /**
+ *
+ * Items that are deleted by the Time to Live process after expiration have the following fields:
+ *
+ *
+ * -
+ *
+ * Records[].userIdentity.type
+ *
+ *
+ * "Service"
+ *
+ *
+ * -
+ *
+ * Records[].userIdentity.principalId
+ *
+ *
+ * "dynamodb.amazonaws.com"
+ *
+ *
+ *
+ *
+ * @param userIdentity
+ * Items that are deleted by the Time to Live process after expiration have the following fields:
+ *
+ * -
+ *
+ * Records[].userIdentity.type
+ *
+ *
+ * "Service"
+ *
+ *
+ * -
+ *
+ * Records[].userIdentity.principalId
+ *
+ *
+ * "dynamodb.amazonaws.com"
+ *
+ *
+ */
+ public void setUserIdentity(Identity userIdentity) {
+ this.userIdentity = userIdentity;
+ }
+
+ /**
+ *
+ * Items that are deleted by the Time to Live process after expiration have the following fields:
+ *
+ *
+ * -
+ *
+ * Records[].userIdentity.type
+ *
+ *
+ * "Service"
+ *
+ *
+ * -
+ *
+ * Records[].userIdentity.principalId
+ *
+ *
+ * "dynamodb.amazonaws.com"
+ *
+ *
+ *
+ *
+ * @return Items that are deleted by the Time to Live process after expiration have the following fields:
+ *
+ * -
+ *
+ * Records[].userIdentity.type
+ *
+ *
+ * "Service"
+ *
+ *
+ * -
+ *
+ * Records[].userIdentity.principalId
+ *
+ *
+ * "dynamodb.amazonaws.com"
+ *
+ *
+ */
+ public Identity getUserIdentity() {
+ return this.userIdentity;
+ }
+
+ /**
+ *
+ * Items that are deleted by the Time to Live process after expiration have the following fields:
+ *
+ *
+ * -
+ *
+ * Records[].userIdentity.type
+ *
+ *
+ * "Service"
+ *
+ *
+ * -
+ *
+ * Records[].userIdentity.principalId
+ *
+ *
+ * "dynamodb.amazonaws.com"
+ *
+ *
+ *
+ *
+ * @param userIdentity
+ * Items that are deleted by the Time to Live process after expiration have the following fields:
+ *
+ * -
+ *
+ * Records[].userIdentity.type
+ *
+ *
+ * "Service"
+ *
+ *
+ * -
+ *
+ * Records[].userIdentity.principalId
+ *
+ *
+ * "dynamodb.amazonaws.com"
+ *
+ *
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Record withUserIdentity(Identity userIdentity) {
+ setUserIdentity(userIdentity);
+ return this;
+ }
+
+ /**
+ * Returns a string representation of this object; useful for testing and debugging.
+ *
+ * @return A string representation of this object.
+ *
+ * @see Object#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("{");
+ if (getEventID() != null)
+ sb.append("EventID: ").append(getEventID()).append(",");
+ if (getEventName() != null)
+ sb.append("EventName: ").append(getEventName()).append(",");
+ if (getEventVersion() != null)
+ sb.append("EventVersion: ").append(getEventVersion()).append(",");
+ if (getEventSource() != null)
+ sb.append("EventSource: ").append(getEventSource()).append(",");
+ if (getAwsRegion() != null)
+ sb.append("AwsRegion: ").append(getAwsRegion()).append(",");
+ if (getDynamodb() != null)
+ sb.append("Dynamodb: ").append(getDynamodb()).append(",");
+ if (getUserIdentity() != null)
+ sb.append("UserIdentity: ").append(getUserIdentity());
+ sb.append("}");
+ return sb.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+
+ if (obj instanceof Record == false)
+ return false;
+ Record other = (Record) obj;
+ if (other.getEventID() == null ^ this.getEventID() == null)
+ return false;
+ if (other.getEventID() != null && other.getEventID().equals(this.getEventID()) == false)
+ return false;
+ if (other.getEventName() == null ^ this.getEventName() == null)
+ return false;
+ if (other.getEventName() != null && other.getEventName().equals(this.getEventName()) == false)
+ return false;
+ if (other.getEventVersion() == null ^ this.getEventVersion() == null)
+ return false;
+ if (other.getEventVersion() != null && other.getEventVersion().equals(this.getEventVersion()) == false)
+ return false;
+ if (other.getEventSource() == null ^ this.getEventSource() == null)
+ return false;
+ if (other.getEventSource() != null && other.getEventSource().equals(this.getEventSource()) == false)
+ return false;
+ if (other.getAwsRegion() == null ^ this.getAwsRegion() == null)
+ return false;
+ if (other.getAwsRegion() != null && other.getAwsRegion().equals(this.getAwsRegion()) == false)
+ return false;
+ if (other.getDynamodb() == null ^ this.getDynamodb() == null)
+ return false;
+ if (other.getDynamodb() != null && other.getDynamodb().equals(this.getDynamodb()) == false)
+ return false;
+ if (other.getUserIdentity() == null ^ this.getUserIdentity() == null)
+ return false;
+ if (other.getUserIdentity() != null && other.getUserIdentity().equals(this.getUserIdentity()) == false)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int hashCode = 1;
+
+ hashCode = prime * hashCode + ((getEventID() == null) ? 0 : getEventID().hashCode());
+ hashCode = prime * hashCode + ((getEventName() == null) ? 0 : getEventName().hashCode());
+ hashCode = prime * hashCode + ((getEventVersion() == null) ? 0 : getEventVersion().hashCode());
+ hashCode = prime * hashCode + ((getEventSource() == null) ? 0 : getEventSource().hashCode());
+ hashCode = prime * hashCode + ((getAwsRegion() == null) ? 0 : getAwsRegion().hashCode());
+ hashCode = prime * hashCode + ((getDynamodb() == null) ? 0 : getDynamodb().hashCode());
+ hashCode = prime * hashCode + ((getUserIdentity() == null) ? 0 : getUserIdentity().hashCode());
+ return hashCode;
+ }
+
+ @Override
+ public Record clone() {
+ try {
+ return (Record) super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/StreamRecord.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/StreamRecord.java
new file mode 100644
index 000000000..0e41c0de3
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/StreamRecord.java
@@ -0,0 +1,645 @@
+/*
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+package com.amazonaws.services.lambda.runtime.events.models.dynamodb;
+
+import java.io.Serializable;
+
+/**
+ *
+ * A description of a single data modification that was performed on an item in a DynamoDB table.
+ *
+ *
+ * @see AWS API
+ * Documentation
+ */
+public class StreamRecord implements Serializable, Cloneable {
+
+ /**
+ *
+ * The approximate date and time when the stream record was created, in UNIX epoch time format.
+ *
+ */
+ private java.util.Date approximateCreationDateTime;
+ /**
+ *
+ * The primary key attribute(s) for the DynamoDB item that was modified.
+ *
+ */
+ private java.util.Map keys;
+ /**
+ *
+ * The item in the DynamoDB table as it appeared after it was modified.
+ *
+ */
+ private java.util.Map newImage;
+ /**
+ *
+ * The item in the DynamoDB table as it appeared before it was modified.
+ *
+ */
+ private java.util.Map oldImage;
+ /**
+ *
+ * The sequence number of the stream record.
+ *
+ */
+ private String sequenceNumber;
+ /**
+ *
+ * The size of the stream record, in bytes.
+ *
+ */
+ private Long sizeBytes;
+ /**
+ *
+ * The type of data from the modified DynamoDB item that was captured in this stream record:
+ *
+ *
+ * -
+ *
+ * KEYS_ONLY - only the key attributes of the modified item.
+ *
+ *
+ * -
+ *
+ * NEW_IMAGE - the entire item, as it appeared after it was modified.
+ *
+ *
+ * -
+ *
+ * OLD_IMAGE - the entire item, as it appeared before it was modified.
+ *
+ *
+ * -
+ *
+ * NEW_AND_OLD_IMAGES - both the new and the old item images of the item.
+ *
+ *
+ *
+ */
+ private String streamViewType;
+
+ /**
+ *
+ * The approximate date and time when the stream record was created, in UNIX epoch time format.
+ *
+ *
+ * @param approximateCreationDateTime
+ * The approximate date and time when the stream record was created, in UNIX epoch time format.
+ */
+ public void setApproximateCreationDateTime(java.util.Date approximateCreationDateTime) {
+ this.approximateCreationDateTime = approximateCreationDateTime;
+ }
+
+ /**
+ *
+ * The approximate date and time when the stream record was created, in UNIX epoch time format.
+ *
+ *
+ * @return The approximate date and time when the stream record was created, in UNIX epoch time format.
+ */
+ public java.util.Date getApproximateCreationDateTime() {
+ return this.approximateCreationDateTime;
+ }
+
+ /**
+ *
+ * The approximate date and time when the stream record was created, in UNIX epoch time format.
+ *
+ *
+ * @param approximateCreationDateTime
+ * The approximate date and time when the stream record was created, in UNIX epoch time format.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public StreamRecord withApproximateCreationDateTime(java.util.Date approximateCreationDateTime) {
+ setApproximateCreationDateTime(approximateCreationDateTime);
+ return this;
+ }
+
+ /**
+ *
+ * The primary key attribute(s) for the DynamoDB item that was modified.
+ *
+ *
+ * @return The primary key attribute(s) for the DynamoDB item that was modified.
+ */
+ public java.util.Map getKeys() {
+ return keys;
+ }
+
+ /**
+ *
+ * The primary key attribute(s) for the DynamoDB item that was modified.
+ *
+ *
+ * @param keys
+ * The primary key attribute(s) for the DynamoDB item that was modified.
+ */
+ public void setKeys(java.util.Map keys) {
+ this.keys = keys;
+ }
+
+ /**
+ *
+ * The primary key attribute(s) for the DynamoDB item that was modified.
+ *
+ *
+ * @param keys
+ * The primary key attribute(s) for the DynamoDB item that was modified.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public StreamRecord withKeys(java.util.Map keys) {
+ setKeys(keys);
+ return this;
+ }
+
+ public StreamRecord addKeysEntry(String key, AttributeValue value) {
+ if (null == this.keys) {
+ this.keys = new java.util.HashMap();
+ }
+ if (this.keys.containsKey(key))
+ throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
+ this.keys.put(key, value);
+ return this;
+ }
+
+ /**
+ * Removes all the entries added into Keys.
+ *
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public StreamRecord clearKeysEntries() {
+ this.keys = null;
+ return this;
+ }
+
+ /**
+ *
+ * The item in the DynamoDB table as it appeared after it was modified.
+ *
+ *
+ * @return The item in the DynamoDB table as it appeared after it was modified.
+ */
+ public java.util.Map getNewImage() {
+ return newImage;
+ }
+
+ /**
+ *
+ * The item in the DynamoDB table as it appeared after it was modified.
+ *
+ *
+ * @param newImage
+ * The item in the DynamoDB table as it appeared after it was modified.
+ */
+ public void setNewImage(java.util.Map newImage) {
+ this.newImage = newImage;
+ }
+
+ /**
+ *
+ * The item in the DynamoDB table as it appeared after it was modified.
+ *
+ *
+ * @param newImage
+ * The item in the DynamoDB table as it appeared after it was modified.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public StreamRecord withNewImage(java.util.Map newImage) {
+ setNewImage(newImage);
+ return this;
+ }
+
+ public StreamRecord addNewImageEntry(String key, AttributeValue value) {
+ if (null == this.newImage) {
+ this.newImage = new java.util.HashMap();
+ }
+ if (this.newImage.containsKey(key))
+ throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
+ this.newImage.put(key, value);
+ return this;
+ }
+
+ /**
+ * Removes all the entries added into NewImage.
+ *
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public StreamRecord clearNewImageEntries() {
+ this.newImage = null;
+ return this;
+ }
+
+ /**
+ *
+ * The item in the DynamoDB table as it appeared before it was modified.
+ *
+ *
+ * @return The item in the DynamoDB table as it appeared before it was modified.
+ */
+ public java.util.Map getOldImage() {
+ return oldImage;
+ }
+
+ /**
+ *
+ * The item in the DynamoDB table as it appeared before it was modified.
+ *
+ *
+ * @param oldImage
+ * The item in the DynamoDB table as it appeared before it was modified.
+ */
+ public void setOldImage(java.util.Map oldImage) {
+ this.oldImage = oldImage;
+ }
+
+ /**
+ *
+ * The item in the DynamoDB table as it appeared before it was modified.
+ *
+ *
+ * @param oldImage
+ * The item in the DynamoDB table as it appeared before it was modified.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public StreamRecord withOldImage(java.util.Map oldImage) {
+ setOldImage(oldImage);
+ return this;
+ }
+
+ public StreamRecord addOldImageEntry(String key, AttributeValue value) {
+ if (null == this.oldImage) {
+ this.oldImage = new java.util.HashMap();
+ }
+ if (this.oldImage.containsKey(key))
+ throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
+ this.oldImage.put(key, value);
+ return this;
+ }
+
+ /**
+ * Removes all the entries added into OldImage.
+ *
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public StreamRecord clearOldImageEntries() {
+ this.oldImage = null;
+ return this;
+ }
+
+ /**
+ *
+ * The sequence number of the stream record.
+ *
+ *
+ * @param sequenceNumber
+ * The sequence number of the stream record.
+ */
+ public void setSequenceNumber(String sequenceNumber) {
+ this.sequenceNumber = sequenceNumber;
+ }
+
+ /**
+ *
+ * The sequence number of the stream record.
+ *
+ *
+ * @return The sequence number of the stream record.
+ */
+ public String getSequenceNumber() {
+ return this.sequenceNumber;
+ }
+
+ /**
+ *
+ * The sequence number of the stream record.
+ *
+ *
+ * @param sequenceNumber
+ * The sequence number of the stream record.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public StreamRecord withSequenceNumber(String sequenceNumber) {
+ setSequenceNumber(sequenceNumber);
+ return this;
+ }
+
+ /**
+ *
+ * The size of the stream record, in bytes.
+ *
+ *
+ * @param sizeBytes
+ * The size of the stream record, in bytes.
+ */
+ public void setSizeBytes(Long sizeBytes) {
+ this.sizeBytes = sizeBytes;
+ }
+
+ /**
+ *
+ * The size of the stream record, in bytes.
+ *
+ *
+ * @return The size of the stream record, in bytes.
+ */
+ public Long getSizeBytes() {
+ return this.sizeBytes;
+ }
+
+ /**
+ *
+ * The size of the stream record, in bytes.
+ *
+ *
+ * @param sizeBytes
+ * The size of the stream record, in bytes.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public StreamRecord withSizeBytes(Long sizeBytes) {
+ setSizeBytes(sizeBytes);
+ return this;
+ }
+
+ /**
+ *
+ * The type of data from the modified DynamoDB item that was captured in this stream record:
+ *
+ *
+ * -
+ *
+ * KEYS_ONLY - only the key attributes of the modified item.
+ *
+ *
+ * -
+ *
+ * NEW_IMAGE - the entire item, as it appeared after it was modified.
+ *
+ *
+ * -
+ *
+ * OLD_IMAGE - the entire item, as it appeared before it was modified.
+ *
+ *
+ * -
+ *
+ * NEW_AND_OLD_IMAGES - both the new and the old item images of the item.
+ *
+ *
+ *
+ *
+ * @return The type of data from the modified DynamoDB item that was captured in this stream record:
+ *
+ * -
+ *
+ * KEYS_ONLY - only the key attributes of the modified item.
+ *
+ *
+ * -
+ *
+ * NEW_IMAGE - the entire item, as it appeared after it was modified.
+ *
+ *
+ * -
+ *
+ * OLD_IMAGE - the entire item, as it appeared before it was modified.
+ *
+ *
+ * -
+ *
+ * NEW_AND_OLD_IMAGES - both the new and the old item images of the item.
+ *
+ *
+ * @see StreamViewType
+ */
+ public String getStreamViewType() {
+ return this.streamViewType;
+ }
+
+ /**
+ *
+ * The type of data from the modified DynamoDB item that was captured in this stream record:
+ *
+ *
+ * -
+ *
+ * KEYS_ONLY - only the key attributes of the modified item.
+ *
+ *
+ * -
+ *
+ * NEW_IMAGE - the entire item, as it appeared after it was modified.
+ *
+ *
+ * -
+ *
+ * OLD_IMAGE - the entire item, as it appeared before it was modified.
+ *
+ *
+ * -
+ *
+ * NEW_AND_OLD_IMAGES - both the new and the old item images of the item.
+ *
+ *
+ *
+ *
+ * @param streamViewType
+ * The type of data from the modified DynamoDB item that was captured in this stream record:
+ *
+ * -
+ *
+ * KEYS_ONLY - only the key attributes of the modified item.
+ *
+ *
+ * -
+ *
+ * NEW_IMAGE - the entire item, as it appeared after it was modified.
+ *
+ *
+ * -
+ *
+ * OLD_IMAGE - the entire item, as it appeared before it was modified.
+ *
+ *
+ * -
+ *
+ * NEW_AND_OLD_IMAGES - both the new and the old item images of the item.
+ *
+ *
+ * @see StreamViewType
+ */
+ public void setStreamViewType(StreamViewType streamViewType) {
+ withStreamViewType(streamViewType);
+ }
+
+ /**
+ *
+ * The type of data from the modified DynamoDB item that was captured in this stream record:
+ *
+ *
+ * -
+ *
+ * KEYS_ONLY - only the key attributes of the modified item.
+ *
+ *
+ * -
+ *
+ * NEW_IMAGE - the entire item, as it appeared after it was modified.
+ *
+ *
+ * -
+ *
+ * OLD_IMAGE - the entire item, as it appeared before it was modified.
+ *
+ *
+ * -
+ *
+ * NEW_AND_OLD_IMAGES - both the new and the old item images of the item.
+ *
+ *
+ *
+ *
+ * @param streamViewType
+ * The type of data from the modified DynamoDB item that was captured in this stream record:
+ *
+ * -
+ *
+ * KEYS_ONLY - only the key attributes of the modified item.
+ *
+ *
+ * -
+ *
+ * NEW_IMAGE - the entire item, as it appeared after it was modified.
+ *
+ *
+ * -
+ *
+ * OLD_IMAGE - the entire item, as it appeared before it was modified.
+ *
+ *
+ * -
+ *
+ * NEW_AND_OLD_IMAGES - both the new and the old item images of the item.
+ *
+ *
+ * @return Returns a reference to this object so that method calls can be chained together.
+ * @see StreamViewType
+ */
+ public StreamRecord withStreamViewType(StreamViewType streamViewType) {
+ this.streamViewType = streamViewType.toString();
+ return this;
+ }
+
+ /**
+ * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
+ * redacted from this string using a placeholder value.
+ *
+ * @return A string representation of this object.
+ *
+ * @see Object#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("{");
+ if (getApproximateCreationDateTime() != null)
+ sb.append("ApproximateCreationDateTime: ").append(getApproximateCreationDateTime()).append(",");
+ if (getKeys() != null)
+ sb.append("Keys: ").append(getKeys()).append(",");
+ if (getNewImage() != null)
+ sb.append("NewImage: ").append(getNewImage()).append(",");
+ if (getOldImage() != null)
+ sb.append("OldImage: ").append(getOldImage()).append(",");
+ if (getSequenceNumber() != null)
+ sb.append("SequenceNumber: ").append(getSequenceNumber()).append(",");
+ if (getSizeBytes() != null)
+ sb.append("SizeBytes: ").append(getSizeBytes()).append(",");
+ if (getStreamViewType() != null)
+ sb.append("StreamViewType: ").append(getStreamViewType());
+ sb.append("}");
+ return sb.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+
+ if (obj instanceof StreamRecord == false)
+ return false;
+ StreamRecord other = (StreamRecord) obj;
+ if (other.getApproximateCreationDateTime() == null ^ this.getApproximateCreationDateTime() == null)
+ return false;
+ if (other.getApproximateCreationDateTime() != null && other.getApproximateCreationDateTime().equals(this.getApproximateCreationDateTime()) == false)
+ return false;
+ if (other.getKeys() == null ^ this.getKeys() == null)
+ return false;
+ if (other.getKeys() != null && other.getKeys().equals(this.getKeys()) == false)
+ return false;
+ if (other.getNewImage() == null ^ this.getNewImage() == null)
+ return false;
+ if (other.getNewImage() != null && other.getNewImage().equals(this.getNewImage()) == false)
+ return false;
+ if (other.getOldImage() == null ^ this.getOldImage() == null)
+ return false;
+ if (other.getOldImage() != null && other.getOldImage().equals(this.getOldImage()) == false)
+ return false;
+ if (other.getSequenceNumber() == null ^ this.getSequenceNumber() == null)
+ return false;
+ if (other.getSequenceNumber() != null && other.getSequenceNumber().equals(this.getSequenceNumber()) == false)
+ return false;
+ if (other.getSizeBytes() == null ^ this.getSizeBytes() == null)
+ return false;
+ if (other.getSizeBytes() != null && other.getSizeBytes().equals(this.getSizeBytes()) == false)
+ return false;
+ if (other.getStreamViewType() == null ^ this.getStreamViewType() == null)
+ return false;
+ if (other.getStreamViewType() != null && other.getStreamViewType().equals(this.getStreamViewType()) == false)
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int hashCode = 1;
+
+ hashCode = prime * hashCode + ((getApproximateCreationDateTime() == null) ? 0 : getApproximateCreationDateTime().hashCode());
+ hashCode = prime * hashCode + ((getKeys() == null) ? 0 : getKeys().hashCode());
+ hashCode = prime * hashCode + ((getNewImage() == null) ? 0 : getNewImage().hashCode());
+ hashCode = prime * hashCode + ((getOldImage() == null) ? 0 : getOldImage().hashCode());
+ hashCode = prime * hashCode + ((getSequenceNumber() == null) ? 0 : getSequenceNumber().hashCode());
+ hashCode = prime * hashCode + ((getSizeBytes() == null) ? 0 : getSizeBytes().hashCode());
+ hashCode = prime * hashCode + ((getStreamViewType() == null) ? 0 : getStreamViewType().hashCode());
+ return hashCode;
+ }
+
+ @Override
+ public StreamRecord clone() {
+ try {
+ return (StreamRecord) super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/StreamViewType.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/StreamViewType.java
new file mode 100644
index 000000000..93cdbc8fc
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/StreamViewType.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+package com.amazonaws.services.lambda.runtime.events.models.dynamodb;
+
+public enum StreamViewType {
+
+ NEW_IMAGE("NEW_IMAGE"),
+ OLD_IMAGE("OLD_IMAGE"),
+ NEW_AND_OLD_IMAGES("NEW_AND_OLD_IMAGES"),
+ KEYS_ONLY("KEYS_ONLY");
+
+ private String value;
+
+ StreamViewType(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ /**
+ * Use this in place of valueOf.
+ *
+ * @param value real value
+ * @return StreamViewType corresponding to the value
+ *
+ * @throws IllegalArgumentException
+ * If the specified value does not map to one of the known values in this enum.
+ */
+ public static StreamViewType fromValue(String value) {
+ if (value == null || "".equals(value)) {
+ throw new IllegalArgumentException("Value cannot be null or empty!");
+ }
+
+ for (StreamViewType enumEntry : StreamViewType.values()) {
+ if (enumEntry.toString().equals(value)) {
+ return enumEntry;
+ }
+ }
+
+ throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
+ }
+}
\ No newline at end of file
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/kinesis/EncryptionType.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/kinesis/EncryptionType.java
new file mode 100644
index 000000000..8ffb3e149
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/kinesis/EncryptionType.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+package com.amazonaws.services.lambda.runtime.events.models.kinesis;
+
+public enum EncryptionType {
+
+ NONE("NONE"),
+ KMS("KMS");
+
+ private String value;
+
+ private EncryptionType(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ /**
+ * Use this in place of valueOf.
+ *
+ * @param value
+ * real value
+ * @return EncryptionType corresponding to the value
+ *
+ * @throws IllegalArgumentException
+ * If the specified value does not map to one of the known values in this enum.
+ */
+ public static EncryptionType fromValue(String value) {
+ if (value == null || "".equals(value)) {
+ throw new IllegalArgumentException("Value cannot be null or empty!");
+ }
+
+ for (EncryptionType enumEntry : EncryptionType.values()) {
+ if (enumEntry.toString().equals(value)) {
+ return enumEntry;
+ }
+ }
+
+ throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
+ }
+}
\ No newline at end of file
diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/kinesis/Record.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/kinesis/Record.java
new file mode 100644
index 000000000..085fe8e5a
--- /dev/null
+++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/kinesis/Record.java
@@ -0,0 +1,494 @@
+/*
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+package com.amazonaws.services.lambda.runtime.events.models.kinesis;
+
+import java.io.Serializable;
+
+/**
+ *
+ * The unit of data of the Kinesis data stream, which is composed of a sequence number, a partition key, and a data
+ * blob.
+ *
+ *
+ * @see AWS API
+ * Documentation
+ */
+public class Record implements Serializable, Cloneable {
+
+ /**
+ *
+ * The unique identifier of the record within its shard.
+ *
+ */
+ private String sequenceNumber;
+ /**
+ *
+ * The approximate time that the record was inserted into the stream.
+ *
+ */
+ private java.util.Date approximateArrivalTimestamp;
+ /**
+ *
+ * The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not inspect,
+ * interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is
+ * added to the partition key size, the total size must not exceed the maximum record size (1 MB).
+ *
+ */
+ private java.nio.ByteBuffer data;
+ /**
+ *
+ * Identifies which shard in the stream the data record is assigned to.
+ *
+ */
+ private String partitionKey;
+ /**
+ *
+ * The encryption type used on the record. This parameter can be one of the following values:
+ *
+ *
+ */
+ private String encryptionType;
+
+ /**
+ *
+ * The unique identifier of the record within its shard.
+ *
+ *
+ * @param sequenceNumber
+ * The unique identifier of the record within its shard.
+ */
+ public void setSequenceNumber(String sequenceNumber) {
+ this.sequenceNumber = sequenceNumber;
+ }
+
+ /**
+ *
+ * The unique identifier of the record within its shard.
+ *
+ *
+ * @return The unique identifier of the record within its shard.
+ */
+ public String getSequenceNumber() {
+ return this.sequenceNumber;
+ }
+
+ /**
+ *
+ * The unique identifier of the record within its shard.
+ *
+ *
+ * @param sequenceNumber
+ * The unique identifier of the record within its shard.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Record withSequenceNumber(String sequenceNumber) {
+ setSequenceNumber(sequenceNumber);
+ return this;
+ }
+
+ /**
+ *
+ * The approximate time that the record was inserted into the stream.
+ *
+ *
+ * @param approximateArrivalTimestamp
+ * The approximate time that the record was inserted into the stream.
+ */
+ public void setApproximateArrivalTimestamp(java.util.Date approximateArrivalTimestamp) {
+ this.approximateArrivalTimestamp = approximateArrivalTimestamp;
+ }
+
+ /**
+ *
+ * The approximate time that the record was inserted into the stream.
+ *
+ *
+ * @return The approximate time that the record was inserted into the stream.
+ */
+ public java.util.Date getApproximateArrivalTimestamp() {
+ return this.approximateArrivalTimestamp;
+ }
+
+ /**
+ *
+ * The approximate time that the record was inserted into the stream.
+ *
+ *
+ * @param approximateArrivalTimestamp
+ * The approximate time that the record was inserted into the stream.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Record withApproximateArrivalTimestamp(java.util.Date approximateArrivalTimestamp) {
+ setApproximateArrivalTimestamp(approximateArrivalTimestamp);
+ return this;
+ }
+
+ /**
+ *
+ * The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not inspect,
+ * interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is
+ * added to the partition key size, the total size must not exceed the maximum record size (1 MB).
+ *
+ *
+ * The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service.
+ * Users of the SDK should not perform Base64 encoding on this field.
+ *
+ *
+ * Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will
+ * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or
+ * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future
+ * major version of the SDK.
+ *
+ *
+ * @param data
+ * The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not
+ * inspect, interpret, or change the data in the blob in any way. When the data blob (the payload before
+ * base64-encoding) is added to the partition key size, the total size must not exceed the maximum record
+ * size (1 MB).
+ */
+ public void setData(java.nio.ByteBuffer data) {
+ this.data = data;
+ }
+
+ /**
+ *
+ * The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not inspect,
+ * interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is
+ * added to the partition key size, the total size must not exceed the maximum record size (1 MB).
+ *
+ *
+ * {@code ByteBuffer}s are stateful. Calling their {@code get} methods changes their {@code position}. We recommend
+ * using {@link java.nio.ByteBuffer#asReadOnlyBuffer()} to create a read-only view of the buffer with an independent
+ * {@code position}, and calling {@code get} methods on this rather than directly on the returned {@code ByteBuffer}.
+ * Doing so will ensure that anyone else using the {@code ByteBuffer} will not be affected by changes to the
+ * {@code position}.
+ *
+ *
+ * @return The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not
+ * inspect, interpret, or change the data in the blob in any way. When the data blob (the payload before
+ * base64-encoding) is added to the partition key size, the total size must not exceed the maximum record
+ * size (1 MB).
+ */
+ public java.nio.ByteBuffer getData() {
+ return this.data;
+ }
+
+ /**
+ *
+ * The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not inspect,
+ * interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is
+ * added to the partition key size, the total size must not exceed the maximum record size (1 MB).
+ *
+ *
+ * The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service.
+ * Users of the SDK should not perform Base64 encoding on this field.
+ *
+ *
+ * Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will
+ * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or
+ * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future
+ * major version of the SDK.
+ *
+ *
+ * @param data
+ * The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not
+ * inspect, interpret, or change the data in the blob in any way. When the data blob (the payload before
+ * base64-encoding) is added to the partition key size, the total size must not exceed the maximum record
+ * size (1 MB).
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Record withData(java.nio.ByteBuffer data) {
+ setData(data);
+ return this;
+ }
+
+ /**
+ *
+ * Identifies which shard in the stream the data record is assigned to.
+ *
+ *
+ * @param partitionKey
+ * Identifies which shard in the stream the data record is assigned to.
+ */
+ public void setPartitionKey(String partitionKey) {
+ this.partitionKey = partitionKey;
+ }
+
+ /**
+ *
+ * Identifies which shard in the stream the data record is assigned to.
+ *
+ *
+ * @return Identifies which shard in the stream the data record is assigned to.
+ */
+ public String getPartitionKey() {
+ return this.partitionKey;
+ }
+
+ /**
+ *
+ * Identifies which shard in the stream the data record is assigned to.
+ *
+ *
+ * @param partitionKey
+ * Identifies which shard in the stream the data record is assigned to.
+ * @return Returns a reference to this object so that method calls can be chained together.
+ */
+ public Record withPartitionKey(String partitionKey) {
+ setPartitionKey(partitionKey);
+ return this;
+ }
+
+ /**
+ *
+ * The encryption type used on the record. This parameter can be one of the following values:
+ *
+ *
+ *
+ * @param encryptionType
+ * The encryption type used on the record. This parameter can be one of the following values:
+ *
+ * -
+ *
+ * NONE: Do not encrypt the records in the stream.
+ *
+ *
+ * -
+ *
+ * KMS: Use server-side encryption on the records in the stream using a customer-managed AWS KMS
+ * key.
+ *
+ *
+ * @see EncryptionType
+ */
+ public void setEncryptionType(String encryptionType) {
+ this.encryptionType = encryptionType;
+ }
+
+ /**
+ *
+ * The encryption type used on the record. This parameter can be one of the following values:
+ *
+ *
+ *
+ * @return The encryption type used on the record. This parameter can be one of the following values:
+ *
+ * -
+ *
+ * NONE: Do not encrypt the records in the stream.
+ *
+ *
+ * -
+ *
+ * KMS: Use server-side encryption on the records in the stream using a customer-managed AWS
+ * KMS key.
+ *
+ *
+ * @see EncryptionType
+ */
+ public String getEncryptionType() {
+ return this.encryptionType;
+ }
+
+ /**
+ *
+ * The encryption type used on the record. This parameter can be one of the following values:
+ *
+ *
+ *
+ * @param encryptionType
+ * The encryption type used on the record. This parameter can be one of the following values:
+ *
+ * -
+ *
+ * NONE: Do not encrypt the records in the stream.
+ *
+ *
+ * -
+ *
+ * KMS: Use server-side encryption on the records in the stream using a customer-managed AWS KMS
+ * key.
+ *
+ *
+ * @return Returns a reference to this object so that method calls can be chained together.
+ * @see EncryptionType
+ */
+ public Record withEncryptionType(String encryptionType) {
+ setEncryptionType(encryptionType);
+ return this;
+ }
+
+ /**
+ *
+ * The encryption type used on the record. This parameter can be one of the following values:
+ *
+ *
+ *
+ * @param encryptionType
+ * The encryption type used on the record. This parameter can be one of the following values:
+ *