
software.amazon.awssdk.services.securityhub.model.AwsDynamoDbTableDetails Maven / Gradle / Ivy
/*
* Copyright 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 software.amazon.awssdk.services.securityhub.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Provides details about a DynamoDB table.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class AwsDynamoDbTableDetails implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField> ATTRIBUTE_DEFINITIONS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("AttributeDefinitions")
.getter(getter(AwsDynamoDbTableDetails::attributeDefinitions))
.setter(setter(Builder::attributeDefinitions))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AttributeDefinitions").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(AwsDynamoDbTableAttributeDefinition::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField BILLING_MODE_SUMMARY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("BillingModeSummary")
.getter(getter(AwsDynamoDbTableDetails::billingModeSummary)).setter(setter(Builder::billingModeSummary))
.constructor(AwsDynamoDbTableBillingModeSummary::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BillingModeSummary").build())
.build();
private static final SdkField CREATION_DATE_TIME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CreationDateTime").getter(getter(AwsDynamoDbTableDetails::creationDateTime))
.setter(setter(Builder::creationDateTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationDateTime").build()).build();
private static final SdkField> GLOBAL_SECONDARY_INDEXES_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("GlobalSecondaryIndexes")
.getter(getter(AwsDynamoDbTableDetails::globalSecondaryIndexes))
.setter(setter(Builder::globalSecondaryIndexes))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GlobalSecondaryIndexes").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(AwsDynamoDbTableGlobalSecondaryIndex::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField GLOBAL_TABLE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("GlobalTableVersion").getter(getter(AwsDynamoDbTableDetails::globalTableVersion))
.setter(setter(Builder::globalTableVersion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GlobalTableVersion").build())
.build();
private static final SdkField ITEM_COUNT_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("ItemCount").getter(getter(AwsDynamoDbTableDetails::itemCount)).setter(setter(Builder::itemCount))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ItemCount").build()).build();
private static final SdkField> KEY_SCHEMA_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("KeySchema")
.getter(getter(AwsDynamoDbTableDetails::keySchema))
.setter(setter(Builder::keySchema))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KeySchema").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(AwsDynamoDbTableKeySchema::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField LATEST_STREAM_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("LatestStreamArn").getter(getter(AwsDynamoDbTableDetails::latestStreamArn))
.setter(setter(Builder::latestStreamArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LatestStreamArn").build()).build();
private static final SdkField LATEST_STREAM_LABEL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("LatestStreamLabel").getter(getter(AwsDynamoDbTableDetails::latestStreamLabel))
.setter(setter(Builder::latestStreamLabel))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LatestStreamLabel").build()).build();
private static final SdkField> LOCAL_SECONDARY_INDEXES_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("LocalSecondaryIndexes")
.getter(getter(AwsDynamoDbTableDetails::localSecondaryIndexes))
.setter(setter(Builder::localSecondaryIndexes))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LocalSecondaryIndexes").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(AwsDynamoDbTableLocalSecondaryIndex::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField PROVISIONED_THROUGHPUT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ProvisionedThroughput")
.getter(getter(AwsDynamoDbTableDetails::provisionedThroughput)).setter(setter(Builder::provisionedThroughput))
.constructor(AwsDynamoDbTableProvisionedThroughput::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProvisionedThroughput").build())
.build();
private static final SdkField> REPLICAS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Replicas")
.getter(getter(AwsDynamoDbTableDetails::replicas))
.setter(setter(Builder::replicas))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Replicas").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(AwsDynamoDbTableReplica::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField RESTORE_SUMMARY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RestoreSummary")
.getter(getter(AwsDynamoDbTableDetails::restoreSummary)).setter(setter(Builder::restoreSummary))
.constructor(AwsDynamoDbTableRestoreSummary::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RestoreSummary").build()).build();
private static final SdkField SSE_DESCRIPTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("SseDescription")
.getter(getter(AwsDynamoDbTableDetails::sseDescription)).setter(setter(Builder::sseDescription))
.constructor(AwsDynamoDbTableSseDescription::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SseDescription").build()).build();
private static final SdkField STREAM_SPECIFICATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("StreamSpecification")
.getter(getter(AwsDynamoDbTableDetails::streamSpecification)).setter(setter(Builder::streamSpecification))
.constructor(AwsDynamoDbTableStreamSpecification::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StreamSpecification").build())
.build();
private static final SdkField TABLE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TableId").getter(getter(AwsDynamoDbTableDetails::tableId)).setter(setter(Builder::tableId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TableId").build()).build();
private static final SdkField TABLE_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TableName").getter(getter(AwsDynamoDbTableDetails::tableName)).setter(setter(Builder::tableName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TableName").build()).build();
private static final SdkField TABLE_SIZE_BYTES_FIELD = SdkField. builder(MarshallingType.LONG)
.memberName("TableSizeBytes").getter(getter(AwsDynamoDbTableDetails::tableSizeBytes))
.setter(setter(Builder::tableSizeBytes))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TableSizeBytes").build()).build();
private static final SdkField TABLE_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TableStatus").getter(getter(AwsDynamoDbTableDetails::tableStatus)).setter(setter(Builder::tableStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TableStatus").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ATTRIBUTE_DEFINITIONS_FIELD,
BILLING_MODE_SUMMARY_FIELD, CREATION_DATE_TIME_FIELD, GLOBAL_SECONDARY_INDEXES_FIELD, GLOBAL_TABLE_VERSION_FIELD,
ITEM_COUNT_FIELD, KEY_SCHEMA_FIELD, LATEST_STREAM_ARN_FIELD, LATEST_STREAM_LABEL_FIELD,
LOCAL_SECONDARY_INDEXES_FIELD, PROVISIONED_THROUGHPUT_FIELD, REPLICAS_FIELD, RESTORE_SUMMARY_FIELD,
SSE_DESCRIPTION_FIELD, STREAM_SPECIFICATION_FIELD, TABLE_ID_FIELD, TABLE_NAME_FIELD, TABLE_SIZE_BYTES_FIELD,
TABLE_STATUS_FIELD));
private static final long serialVersionUID = 1L;
private final List attributeDefinitions;
private final AwsDynamoDbTableBillingModeSummary billingModeSummary;
private final String creationDateTime;
private final List globalSecondaryIndexes;
private final String globalTableVersion;
private final Integer itemCount;
private final List keySchema;
private final String latestStreamArn;
private final String latestStreamLabel;
private final List localSecondaryIndexes;
private final AwsDynamoDbTableProvisionedThroughput provisionedThroughput;
private final List replicas;
private final AwsDynamoDbTableRestoreSummary restoreSummary;
private final AwsDynamoDbTableSseDescription sseDescription;
private final AwsDynamoDbTableStreamSpecification streamSpecification;
private final String tableId;
private final String tableName;
private final Long tableSizeBytes;
private final String tableStatus;
private AwsDynamoDbTableDetails(BuilderImpl builder) {
this.attributeDefinitions = builder.attributeDefinitions;
this.billingModeSummary = builder.billingModeSummary;
this.creationDateTime = builder.creationDateTime;
this.globalSecondaryIndexes = builder.globalSecondaryIndexes;
this.globalTableVersion = builder.globalTableVersion;
this.itemCount = builder.itemCount;
this.keySchema = builder.keySchema;
this.latestStreamArn = builder.latestStreamArn;
this.latestStreamLabel = builder.latestStreamLabel;
this.localSecondaryIndexes = builder.localSecondaryIndexes;
this.provisionedThroughput = builder.provisionedThroughput;
this.replicas = builder.replicas;
this.restoreSummary = builder.restoreSummary;
this.sseDescription = builder.sseDescription;
this.streamSpecification = builder.streamSpecification;
this.tableId = builder.tableId;
this.tableName = builder.tableName;
this.tableSizeBytes = builder.tableSizeBytes;
this.tableStatus = builder.tableStatus;
}
/**
* Returns true if the AttributeDefinitions property was specified by the sender (it may be empty), or false if the
* sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS
* service.
*/
public final boolean hasAttributeDefinitions() {
return attributeDefinitions != null && !(attributeDefinitions instanceof SdkAutoConstructList);
}
/**
*
* A list of attribute definitions for the table.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasAttributeDefinitions()} to see if a value was sent in this field.
*
*
* @return A list of attribute definitions for the table.
*/
public final List attributeDefinitions() {
return attributeDefinitions;
}
/**
*
* Information about the billing for read/write capacity on the table.
*
*
* @return Information about the billing for read/write capacity on the table.
*/
public final AwsDynamoDbTableBillingModeSummary billingModeSummary() {
return billingModeSummary;
}
/**
*
* Indicates when the table was created.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example,
* 2020-03-22T13:22:13.933Z
.
*
*
* @return Indicates when the table was created.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z
.
*/
public final String creationDateTime() {
return creationDateTime;
}
/**
* Returns true if the GlobalSecondaryIndexes property was specified by the sender (it may be empty), or false if
* the sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS
* service.
*/
public final boolean hasGlobalSecondaryIndexes() {
return globalSecondaryIndexes != null && !(globalSecondaryIndexes instanceof SdkAutoConstructList);
}
/**
*
* List of global secondary indexes for the table.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasGlobalSecondaryIndexes()} to see if a value was sent in this field.
*
*
* @return List of global secondary indexes for the table.
*/
public final List globalSecondaryIndexes() {
return globalSecondaryIndexes;
}
/**
*
* The version of global tables being used.
*
*
* @return The version of global tables being used.
*/
public final String globalTableVersion() {
return globalTableVersion;
}
/**
*
* The number of items in the table.
*
*
* @return The number of items in the table.
*/
public final Integer itemCount() {
return itemCount;
}
/**
* Returns true if the KeySchema property was specified by the sender (it may be empty), or false if the sender did
* not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public final boolean hasKeySchema() {
return keySchema != null && !(keySchema instanceof SdkAutoConstructList);
}
/**
*
* The primary key structure for the table.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasKeySchema()} to see if a value was sent in this field.
*
*
* @return The primary key structure for the table.
*/
public final List keySchema() {
return keySchema;
}
/**
*
* The ARN of the latest stream for the table.
*
*
* @return The ARN of the latest stream for the table.
*/
public final String latestStreamArn() {
return latestStreamArn;
}
/**
*
* The label of the latest stream. The label is not a unique identifier.
*
*
* @return The label of the latest stream. The label is not a unique identifier.
*/
public final String latestStreamLabel() {
return latestStreamLabel;
}
/**
* Returns true if the LocalSecondaryIndexes property was specified by the sender (it may be empty), or false if the
* sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS
* service.
*/
public final boolean hasLocalSecondaryIndexes() {
return localSecondaryIndexes != null && !(localSecondaryIndexes instanceof SdkAutoConstructList);
}
/**
*
* The list of local secondary indexes for the table.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasLocalSecondaryIndexes()} to see if a value was sent in this field.
*
*
* @return The list of local secondary indexes for the table.
*/
public final List localSecondaryIndexes() {
return localSecondaryIndexes;
}
/**
*
* Information about the provisioned throughput for the table.
*
*
* @return Information about the provisioned throughput for the table.
*/
public final AwsDynamoDbTableProvisionedThroughput provisionedThroughput() {
return provisionedThroughput;
}
/**
* Returns true if the Replicas property was specified by the sender (it may be empty), or false if the sender did
* not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public final boolean hasReplicas() {
return replicas != null && !(replicas instanceof SdkAutoConstructList);
}
/**
*
* The list of replicas of this table.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasReplicas()} to see if a value was sent in this field.
*
*
* @return The list of replicas of this table.
*/
public final List replicas() {
return replicas;
}
/**
*
* Information about the restore for the table.
*
*
* @return Information about the restore for the table.
*/
public final AwsDynamoDbTableRestoreSummary restoreSummary() {
return restoreSummary;
}
/**
*
* Information about the server-side encryption for the table.
*
*
* @return Information about the server-side encryption for the table.
*/
public final AwsDynamoDbTableSseDescription sseDescription() {
return sseDescription;
}
/**
*
* The current DynamoDB Streams configuration for the table.
*
*
* @return The current DynamoDB Streams configuration for the table.
*/
public final AwsDynamoDbTableStreamSpecification streamSpecification() {
return streamSpecification;
}
/**
*
* The identifier of the table.
*
*
* @return The identifier of the table.
*/
public final String tableId() {
return tableId;
}
/**
*
* The name of the table.
*
*
* @return The name of the table.
*/
public final String tableName() {
return tableName;
}
/**
*
* The total size of the table in bytes.
*
*
* @return The total size of the table in bytes.
*/
public final Long tableSizeBytes() {
return tableSizeBytes;
}
/**
*
* The current status of the table.
*
*
* @return The current status of the table.
*/
public final String tableStatus() {
return tableStatus;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(hasAttributeDefinitions() ? attributeDefinitions() : null);
hashCode = 31 * hashCode + Objects.hashCode(billingModeSummary());
hashCode = 31 * hashCode + Objects.hashCode(creationDateTime());
hashCode = 31 * hashCode + Objects.hashCode(hasGlobalSecondaryIndexes() ? globalSecondaryIndexes() : null);
hashCode = 31 * hashCode + Objects.hashCode(globalTableVersion());
hashCode = 31 * hashCode + Objects.hashCode(itemCount());
hashCode = 31 * hashCode + Objects.hashCode(hasKeySchema() ? keySchema() : null);
hashCode = 31 * hashCode + Objects.hashCode(latestStreamArn());
hashCode = 31 * hashCode + Objects.hashCode(latestStreamLabel());
hashCode = 31 * hashCode + Objects.hashCode(hasLocalSecondaryIndexes() ? localSecondaryIndexes() : null);
hashCode = 31 * hashCode + Objects.hashCode(provisionedThroughput());
hashCode = 31 * hashCode + Objects.hashCode(hasReplicas() ? replicas() : null);
hashCode = 31 * hashCode + Objects.hashCode(restoreSummary());
hashCode = 31 * hashCode + Objects.hashCode(sseDescription());
hashCode = 31 * hashCode + Objects.hashCode(streamSpecification());
hashCode = 31 * hashCode + Objects.hashCode(tableId());
hashCode = 31 * hashCode + Objects.hashCode(tableName());
hashCode = 31 * hashCode + Objects.hashCode(tableSizeBytes());
hashCode = 31 * hashCode + Objects.hashCode(tableStatus());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof AwsDynamoDbTableDetails)) {
return false;
}
AwsDynamoDbTableDetails other = (AwsDynamoDbTableDetails) obj;
return hasAttributeDefinitions() == other.hasAttributeDefinitions()
&& Objects.equals(attributeDefinitions(), other.attributeDefinitions())
&& Objects.equals(billingModeSummary(), other.billingModeSummary())
&& Objects.equals(creationDateTime(), other.creationDateTime())
&& hasGlobalSecondaryIndexes() == other.hasGlobalSecondaryIndexes()
&& Objects.equals(globalSecondaryIndexes(), other.globalSecondaryIndexes())
&& Objects.equals(globalTableVersion(), other.globalTableVersion())
&& Objects.equals(itemCount(), other.itemCount()) && hasKeySchema() == other.hasKeySchema()
&& Objects.equals(keySchema(), other.keySchema()) && Objects.equals(latestStreamArn(), other.latestStreamArn())
&& Objects.equals(latestStreamLabel(), other.latestStreamLabel())
&& hasLocalSecondaryIndexes() == other.hasLocalSecondaryIndexes()
&& Objects.equals(localSecondaryIndexes(), other.localSecondaryIndexes())
&& Objects.equals(provisionedThroughput(), other.provisionedThroughput()) && hasReplicas() == other.hasReplicas()
&& Objects.equals(replicas(), other.replicas()) && Objects.equals(restoreSummary(), other.restoreSummary())
&& Objects.equals(sseDescription(), other.sseDescription())
&& Objects.equals(streamSpecification(), other.streamSpecification())
&& Objects.equals(tableId(), other.tableId()) && Objects.equals(tableName(), other.tableName())
&& Objects.equals(tableSizeBytes(), other.tableSizeBytes()) && Objects.equals(tableStatus(), other.tableStatus());
}
/**
* 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.
*/
@Override
public final String toString() {
return ToString.builder("AwsDynamoDbTableDetails")
.add("AttributeDefinitions", hasAttributeDefinitions() ? attributeDefinitions() : null)
.add("BillingModeSummary", billingModeSummary()).add("CreationDateTime", creationDateTime())
.add("GlobalSecondaryIndexes", hasGlobalSecondaryIndexes() ? globalSecondaryIndexes() : null)
.add("GlobalTableVersion", globalTableVersion()).add("ItemCount", itemCount())
.add("KeySchema", hasKeySchema() ? keySchema() : null).add("LatestStreamArn", latestStreamArn())
.add("LatestStreamLabel", latestStreamLabel())
.add("LocalSecondaryIndexes", hasLocalSecondaryIndexes() ? localSecondaryIndexes() : null)
.add("ProvisionedThroughput", provisionedThroughput()).add("Replicas", hasReplicas() ? replicas() : null)
.add("RestoreSummary", restoreSummary()).add("SseDescription", sseDescription())
.add("StreamSpecification", streamSpecification()).add("TableId", tableId()).add("TableName", tableName())
.add("TableSizeBytes", tableSizeBytes()).add("TableStatus", tableStatus()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "AttributeDefinitions":
return Optional.ofNullable(clazz.cast(attributeDefinitions()));
case "BillingModeSummary":
return Optional.ofNullable(clazz.cast(billingModeSummary()));
case "CreationDateTime":
return Optional.ofNullable(clazz.cast(creationDateTime()));
case "GlobalSecondaryIndexes":
return Optional.ofNullable(clazz.cast(globalSecondaryIndexes()));
case "GlobalTableVersion":
return Optional.ofNullable(clazz.cast(globalTableVersion()));
case "ItemCount":
return Optional.ofNullable(clazz.cast(itemCount()));
case "KeySchema":
return Optional.ofNullable(clazz.cast(keySchema()));
case "LatestStreamArn":
return Optional.ofNullable(clazz.cast(latestStreamArn()));
case "LatestStreamLabel":
return Optional.ofNullable(clazz.cast(latestStreamLabel()));
case "LocalSecondaryIndexes":
return Optional.ofNullable(clazz.cast(localSecondaryIndexes()));
case "ProvisionedThroughput":
return Optional.ofNullable(clazz.cast(provisionedThroughput()));
case "Replicas":
return Optional.ofNullable(clazz.cast(replicas()));
case "RestoreSummary":
return Optional.ofNullable(clazz.cast(restoreSummary()));
case "SseDescription":
return Optional.ofNullable(clazz.cast(sseDescription()));
case "StreamSpecification":
return Optional.ofNullable(clazz.cast(streamSpecification()));
case "TableId":
return Optional.ofNullable(clazz.cast(tableId()));
case "TableName":
return Optional.ofNullable(clazz.cast(tableName()));
case "TableSizeBytes":
return Optional.ofNullable(clazz.cast(tableSizeBytes()));
case "TableStatus":
return Optional.ofNullable(clazz.cast(tableStatus()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function