software.amazon.awssdk.services.rds.model.DBSnapshot Maven / Gradle / Ivy
Show all versions of rds Show documentation
/*
* 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.rds.model;
import java.io.Serializable;
import java.time.Instant;
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;
/**
*
* Contains the details of an Amazon RDS DB snapshot.
*
*
* This data type is used as a response element in the DescribeDBSnapshots
action.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class DBSnapshot implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField DB_SNAPSHOT_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DBSnapshotIdentifier").getter(getter(DBSnapshot::dbSnapshotIdentifier))
.setter(setter(Builder::dbSnapshotIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBSnapshotIdentifier").build())
.build();
private static final SdkField DB_INSTANCE_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DBInstanceIdentifier").getter(getter(DBSnapshot::dbInstanceIdentifier))
.setter(setter(Builder::dbInstanceIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBInstanceIdentifier").build())
.build();
private static final SdkField SNAPSHOT_CREATE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("SnapshotCreateTime").getter(getter(DBSnapshot::snapshotCreateTime))
.setter(setter(Builder::snapshotCreateTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnapshotCreateTime").build())
.build();
private static final SdkField ENGINE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Engine")
.getter(getter(DBSnapshot::engine)).setter(setter(Builder::engine))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Engine").build()).build();
private static final SdkField ALLOCATED_STORAGE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("AllocatedStorage").getter(getter(DBSnapshot::allocatedStorage))
.setter(setter(Builder::allocatedStorage))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AllocatedStorage").build()).build();
private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Status")
.getter(getter(DBSnapshot::status)).setter(setter(Builder::status))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build();
private static final SdkField PORT_FIELD = SdkField. builder(MarshallingType.INTEGER).memberName("Port")
.getter(getter(DBSnapshot::port)).setter(setter(Builder::port))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Port").build()).build();
private static final SdkField AVAILABILITY_ZONE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AvailabilityZone").getter(getter(DBSnapshot::availabilityZone))
.setter(setter(Builder::availabilityZone))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AvailabilityZone").build()).build();
private static final SdkField VPC_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("VpcId")
.getter(getter(DBSnapshot::vpcId)).setter(setter(Builder::vpcId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcId").build()).build();
private static final SdkField INSTANCE_CREATE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("InstanceCreateTime").getter(getter(DBSnapshot::instanceCreateTime))
.setter(setter(Builder::instanceCreateTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceCreateTime").build())
.build();
private static final SdkField MASTER_USERNAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("MasterUsername").getter(getter(DBSnapshot::masterUsername)).setter(setter(Builder::masterUsername))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MasterUsername").build()).build();
private static final SdkField ENGINE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("EngineVersion").getter(getter(DBSnapshot::engineVersion)).setter(setter(Builder::engineVersion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineVersion").build()).build();
private static final SdkField LICENSE_MODEL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("LicenseModel").getter(getter(DBSnapshot::licenseModel)).setter(setter(Builder::licenseModel))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LicenseModel").build()).build();
private static final SdkField SNAPSHOT_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("SnapshotType").getter(getter(DBSnapshot::snapshotType)).setter(setter(Builder::snapshotType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnapshotType").build()).build();
private static final SdkField IOPS_FIELD = SdkField. builder(MarshallingType.INTEGER).memberName("Iops")
.getter(getter(DBSnapshot::iops)).setter(setter(Builder::iops))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Iops").build()).build();
private static final SdkField OPTION_GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("OptionGroupName").getter(getter(DBSnapshot::optionGroupName)).setter(setter(Builder::optionGroupName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OptionGroupName").build()).build();
private static final SdkField PERCENT_PROGRESS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("PercentProgress").getter(getter(DBSnapshot::percentProgress)).setter(setter(Builder::percentProgress))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PercentProgress").build()).build();
private static final SdkField SOURCE_REGION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("SourceRegion").getter(getter(DBSnapshot::sourceRegion)).setter(setter(Builder::sourceRegion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceRegion").build()).build();
private static final SdkField SOURCE_DB_SNAPSHOT_IDENTIFIER_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("SourceDBSnapshotIdentifier")
.getter(getter(DBSnapshot::sourceDBSnapshotIdentifier))
.setter(setter(Builder::sourceDBSnapshotIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceDBSnapshotIdentifier").build())
.build();
private static final SdkField STORAGE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("StorageType").getter(getter(DBSnapshot::storageType)).setter(setter(Builder::storageType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StorageType").build()).build();
private static final SdkField TDE_CREDENTIAL_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TdeCredentialArn").getter(getter(DBSnapshot::tdeCredentialArn))
.setter(setter(Builder::tdeCredentialArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TdeCredentialArn").build()).build();
private static final SdkField ENCRYPTED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("Encrypted").getter(getter(DBSnapshot::encrypted)).setter(setter(Builder::encrypted))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Encrypted").build()).build();
private static final SdkField KMS_KEY_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("KmsKeyId").getter(getter(DBSnapshot::kmsKeyId)).setter(setter(Builder::kmsKeyId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KmsKeyId").build()).build();
private static final SdkField DB_SNAPSHOT_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DBSnapshotArn").getter(getter(DBSnapshot::dbSnapshotArn)).setter(setter(Builder::dbSnapshotArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBSnapshotArn").build()).build();
private static final SdkField TIMEZONE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Timezone").getter(getter(DBSnapshot::timezone)).setter(setter(Builder::timezone))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Timezone").build()).build();
private static final SdkField IAM_DATABASE_AUTHENTICATION_ENABLED_FIELD = SdkField
. builder(MarshallingType.BOOLEAN)
.memberName("IAMDatabaseAuthenticationEnabled")
.getter(getter(DBSnapshot::iamDatabaseAuthenticationEnabled))
.setter(setter(Builder::iamDatabaseAuthenticationEnabled))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IAMDatabaseAuthenticationEnabled")
.build()).build();
private static final SdkField> PROCESSOR_FEATURES_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("ProcessorFeatures")
.getter(getter(DBSnapshot::processorFeatures))
.setter(setter(Builder::processorFeatures))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessorFeatures").build(),
ListTrait
.builder()
.memberLocationName("ProcessorFeature")
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(ProcessorFeature::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("ProcessorFeature").build()).build()).build()).build();
private static final SdkField DBI_RESOURCE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DbiResourceId").getter(getter(DBSnapshot::dbiResourceId)).setter(setter(Builder::dbiResourceId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DbiResourceId").build()).build();
private static final SdkField> TAG_LIST_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("TagList")
.getter(getter(DBSnapshot::tagList))
.setter(setter(Builder::tagList))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TagList").build(),
ListTrait
.builder()
.memberLocationName("Tag")
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(Tag::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("Tag").build()).build()).build()).build();
private static final SdkField ORIGINAL_SNAPSHOT_CREATE_TIME_FIELD = SdkField
. builder(MarshallingType.INSTANT)
.memberName("OriginalSnapshotCreateTime")
.getter(getter(DBSnapshot::originalSnapshotCreateTime))
.setter(setter(Builder::originalSnapshotCreateTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OriginalSnapshotCreateTime").build())
.build();
private static final SdkField SNAPSHOT_DATABASE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("SnapshotDatabaseTime").getter(getter(DBSnapshot::snapshotDatabaseTime))
.setter(setter(Builder::snapshotDatabaseTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnapshotDatabaseTime").build())
.build();
private static final SdkField SNAPSHOT_TARGET_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("SnapshotTarget").getter(getter(DBSnapshot::snapshotTarget)).setter(setter(Builder::snapshotTarget))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnapshotTarget").build()).build();
private static final SdkField STORAGE_THROUGHPUT_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("StorageThroughput").getter(getter(DBSnapshot::storageThroughput))
.setter(setter(Builder::storageThroughput))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StorageThroughput").build()).build();
private static final SdkField DB_SYSTEM_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DBSystemId").getter(getter(DBSnapshot::dbSystemId)).setter(setter(Builder::dbSystemId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBSystemId").build()).build();
private static final SdkField DEDICATED_LOG_VOLUME_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("DedicatedLogVolume").getter(getter(DBSnapshot::dedicatedLogVolume))
.setter(setter(Builder::dedicatedLogVolume))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DedicatedLogVolume").build())
.build();
private static final SdkField MULTI_TENANT_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("MultiTenant").getter(getter(DBSnapshot::multiTenant)).setter(setter(Builder::multiTenant))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MultiTenant").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DB_SNAPSHOT_IDENTIFIER_FIELD,
DB_INSTANCE_IDENTIFIER_FIELD, SNAPSHOT_CREATE_TIME_FIELD, ENGINE_FIELD, ALLOCATED_STORAGE_FIELD, STATUS_FIELD,
PORT_FIELD, AVAILABILITY_ZONE_FIELD, VPC_ID_FIELD, INSTANCE_CREATE_TIME_FIELD, MASTER_USERNAME_FIELD,
ENGINE_VERSION_FIELD, LICENSE_MODEL_FIELD, SNAPSHOT_TYPE_FIELD, IOPS_FIELD, OPTION_GROUP_NAME_FIELD,
PERCENT_PROGRESS_FIELD, SOURCE_REGION_FIELD, SOURCE_DB_SNAPSHOT_IDENTIFIER_FIELD, STORAGE_TYPE_FIELD,
TDE_CREDENTIAL_ARN_FIELD, ENCRYPTED_FIELD, KMS_KEY_ID_FIELD, DB_SNAPSHOT_ARN_FIELD, TIMEZONE_FIELD,
IAM_DATABASE_AUTHENTICATION_ENABLED_FIELD, PROCESSOR_FEATURES_FIELD, DBI_RESOURCE_ID_FIELD, TAG_LIST_FIELD,
ORIGINAL_SNAPSHOT_CREATE_TIME_FIELD, SNAPSHOT_DATABASE_TIME_FIELD, SNAPSHOT_TARGET_FIELD, STORAGE_THROUGHPUT_FIELD,
DB_SYSTEM_ID_FIELD, DEDICATED_LOG_VOLUME_FIELD, MULTI_TENANT_FIELD));
private static final long serialVersionUID = 1L;
private final String dbSnapshotIdentifier;
private final String dbInstanceIdentifier;
private final Instant snapshotCreateTime;
private final String engine;
private final Integer allocatedStorage;
private final String status;
private final Integer port;
private final String availabilityZone;
private final String vpcId;
private final Instant instanceCreateTime;
private final String masterUsername;
private final String engineVersion;
private final String licenseModel;
private final String snapshotType;
private final Integer iops;
private final String optionGroupName;
private final Integer percentProgress;
private final String sourceRegion;
private final String sourceDBSnapshotIdentifier;
private final String storageType;
private final String tdeCredentialArn;
private final Boolean encrypted;
private final String kmsKeyId;
private final String dbSnapshotArn;
private final String timezone;
private final Boolean iamDatabaseAuthenticationEnabled;
private final List processorFeatures;
private final String dbiResourceId;
private final List tagList;
private final Instant originalSnapshotCreateTime;
private final Instant snapshotDatabaseTime;
private final String snapshotTarget;
private final Integer storageThroughput;
private final String dbSystemId;
private final Boolean dedicatedLogVolume;
private final Boolean multiTenant;
private DBSnapshot(BuilderImpl builder) {
this.dbSnapshotIdentifier = builder.dbSnapshotIdentifier;
this.dbInstanceIdentifier = builder.dbInstanceIdentifier;
this.snapshotCreateTime = builder.snapshotCreateTime;
this.engine = builder.engine;
this.allocatedStorage = builder.allocatedStorage;
this.status = builder.status;
this.port = builder.port;
this.availabilityZone = builder.availabilityZone;
this.vpcId = builder.vpcId;
this.instanceCreateTime = builder.instanceCreateTime;
this.masterUsername = builder.masterUsername;
this.engineVersion = builder.engineVersion;
this.licenseModel = builder.licenseModel;
this.snapshotType = builder.snapshotType;
this.iops = builder.iops;
this.optionGroupName = builder.optionGroupName;
this.percentProgress = builder.percentProgress;
this.sourceRegion = builder.sourceRegion;
this.sourceDBSnapshotIdentifier = builder.sourceDBSnapshotIdentifier;
this.storageType = builder.storageType;
this.tdeCredentialArn = builder.tdeCredentialArn;
this.encrypted = builder.encrypted;
this.kmsKeyId = builder.kmsKeyId;
this.dbSnapshotArn = builder.dbSnapshotArn;
this.timezone = builder.timezone;
this.iamDatabaseAuthenticationEnabled = builder.iamDatabaseAuthenticationEnabled;
this.processorFeatures = builder.processorFeatures;
this.dbiResourceId = builder.dbiResourceId;
this.tagList = builder.tagList;
this.originalSnapshotCreateTime = builder.originalSnapshotCreateTime;
this.snapshotDatabaseTime = builder.snapshotDatabaseTime;
this.snapshotTarget = builder.snapshotTarget;
this.storageThroughput = builder.storageThroughput;
this.dbSystemId = builder.dbSystemId;
this.dedicatedLogVolume = builder.dedicatedLogVolume;
this.multiTenant = builder.multiTenant;
}
/**
*
* Specifies the identifier for the DB snapshot.
*
*
* @return Specifies the identifier for the DB snapshot.
*/
public final String dbSnapshotIdentifier() {
return dbSnapshotIdentifier;
}
/**
*
* Specifies the DB instance identifier of the DB instance this DB snapshot was created from.
*
*
* @return Specifies the DB instance identifier of the DB instance this DB snapshot was created from.
*/
public final String dbInstanceIdentifier() {
return dbInstanceIdentifier;
}
/**
*
* Specifies when the snapshot was taken in Coordinated Universal Time (UTC). Changes for the copy when the snapshot
* is copied.
*
*
* @return Specifies when the snapshot was taken in Coordinated Universal Time (UTC). Changes for the copy when the
* snapshot is copied.
*/
public final Instant snapshotCreateTime() {
return snapshotCreateTime;
}
/**
*
* Specifies the name of the database engine.
*
*
* @return Specifies the name of the database engine.
*/
public final String engine() {
return engine;
}
/**
*
* Specifies the allocated storage size in gibibytes (GiB).
*
*
* @return Specifies the allocated storage size in gibibytes (GiB).
*/
public final Integer allocatedStorage() {
return allocatedStorage;
}
/**
*
* Specifies the status of this DB snapshot.
*
*
* @return Specifies the status of this DB snapshot.
*/
public final String status() {
return status;
}
/**
*
* Specifies the port that the database engine was listening on at the time of the snapshot.
*
*
* @return Specifies the port that the database engine was listening on at the time of the snapshot.
*/
public final Integer port() {
return port;
}
/**
*
* Specifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot.
*
*
* @return Specifies the name of the Availability Zone the DB instance was located in at the time of the DB
* snapshot.
*/
public final String availabilityZone() {
return availabilityZone;
}
/**
*
* Provides the VPC ID associated with the DB snapshot.
*
*
* @return Provides the VPC ID associated with the DB snapshot.
*/
public final String vpcId() {
return vpcId;
}
/**
*
* Specifies the time in Coordinated Universal Time (UTC) when the DB instance, from which the snapshot was taken,
* was created.
*
*
* @return Specifies the time in Coordinated Universal Time (UTC) when the DB instance, from which the snapshot was
* taken, was created.
*/
public final Instant instanceCreateTime() {
return instanceCreateTime;
}
/**
*
* Provides the master username for the DB snapshot.
*
*
* @return Provides the master username for the DB snapshot.
*/
public final String masterUsername() {
return masterUsername;
}
/**
*
* Specifies the version of the database engine.
*
*
* @return Specifies the version of the database engine.
*/
public final String engineVersion() {
return engineVersion;
}
/**
*
* License model information for the restored DB instance.
*
*
* @return License model information for the restored DB instance.
*/
public final String licenseModel() {
return licenseModel;
}
/**
*
* Provides the type of the DB snapshot.
*
*
* @return Provides the type of the DB snapshot.
*/
public final String snapshotType() {
return snapshotType;
}
/**
*
* Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot.
*
*
* @return Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the
* snapshot.
*/
public final Integer iops() {
return iops;
}
/**
*
* Provides the option group name for the DB snapshot.
*
*
* @return Provides the option group name for the DB snapshot.
*/
public final String optionGroupName() {
return optionGroupName;
}
/**
*
* The percentage of the estimated data that has been transferred.
*
*
* @return The percentage of the estimated data that has been transferred.
*/
public final Integer percentProgress() {
return percentProgress;
}
/**
*
* The Amazon Web Services Region that the DB snapshot was created in or copied from.
*
*
* @return The Amazon Web Services Region that the DB snapshot was created in or copied from.
*/
public final String sourceRegion() {
return sourceRegion;
}
/**
*
* The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied from. It only has a value in the case
* of a cross-account or cross-Region copy.
*
*
* @return The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied from. It only has a value in
* the case of a cross-account or cross-Region copy.
*/
public final String sourceDBSnapshotIdentifier() {
return sourceDBSnapshotIdentifier;
}
/**
*
* Specifies the storage type associated with DB snapshot.
*
*
* @return Specifies the storage type associated with DB snapshot.
*/
public final String storageType() {
return storageType;
}
/**
*
* The ARN from the key store with which to associate the instance for TDE encryption.
*
*
* @return The ARN from the key store with which to associate the instance for TDE encryption.
*/
public final String tdeCredentialArn() {
return tdeCredentialArn;
}
/**
*
* Indicates whether the DB snapshot is encrypted.
*
*
* @return Indicates whether the DB snapshot is encrypted.
*/
public final Boolean encrypted() {
return encrypted;
}
/**
*
* If Encrypted
is true, the Amazon Web Services KMS key identifier for the encrypted DB snapshot.
*
*
* The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.
*
*
* @return If Encrypted
is true, the Amazon Web Services KMS key identifier for the encrypted DB
* snapshot.
*
* The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS
* key.
*/
public final String kmsKeyId() {
return kmsKeyId;
}
/**
*
* The Amazon Resource Name (ARN) for the DB snapshot.
*
*
* @return The Amazon Resource Name (ARN) for the DB snapshot.
*/
public final String dbSnapshotArn() {
return dbSnapshotArn;
}
/**
*
* The time zone of the DB snapshot. In most cases, the Timezone
element is empty.
* Timezone
content appears only for snapshots taken from Microsoft SQL Server DB instances that were
* created with a time zone specified.
*
*
* @return The time zone of the DB snapshot. In most cases, the Timezone
element is empty.
* Timezone
content appears only for snapshots taken from Microsoft SQL Server DB instances
* that were created with a time zone specified.
*/
public final String timezone() {
return timezone;
}
/**
*
* Indicates whether mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database
* accounts is enabled.
*
*
* @return Indicates whether mapping of Amazon Web Services Identity and Access Management (IAM) accounts to
* database accounts is enabled.
*/
public final Boolean iamDatabaseAuthenticationEnabled() {
return iamDatabaseAuthenticationEnabled;
}
/**
* For responses, this returns true if the service returned a value for the ProcessorFeatures property. This DOES
* NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasProcessorFeatures() {
return processorFeatures != null && !(processorFeatures instanceof SdkAutoConstructList);
}
/**
*
* The number of CPU cores and the number of threads per core for the DB instance class of the DB instance when the
* DB snapshot was created.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasProcessorFeatures} method.
*
*
* @return The number of CPU cores and the number of threads per core for the DB instance class of the DB instance
* when the DB snapshot was created.
*/
public final List processorFeatures() {
return processorFeatures;
}
/**
*
* The identifier for the source DB instance, which can't be changed and which is unique to an Amazon Web Services
* Region.
*
*
* @return The identifier for the source DB instance, which can't be changed and which is unique to an Amazon Web
* Services Region.
*/
public final String dbiResourceId() {
return dbiResourceId;
}
/**
* For responses, this returns true if the service returned a value for the TagList property. This DOES NOT check
* that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is
* useful because the SDK will never return a null collection or map, but you may need to differentiate between the
* service returning nothing (or null) and the service returning an empty collection or map. For requests, this
* returns true if a value for the property was specified in the request builder, and false if a value was not
* specified.
*/
public final boolean hasTagList() {
return tagList != null && !(tagList instanceof SdkAutoConstructList);
}
/**
* Returns the value of the TagList property for this object.
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasTagList} method.
*
*
* @return The value of the TagList property for this object.
*/
public final List tagList() {
return tagList;
}
/**
*
* Specifies the time of the CreateDBSnapshot operation in Coordinated Universal Time (UTC). Doesn't change when the
* snapshot is copied.
*
*
* @return Specifies the time of the CreateDBSnapshot operation in Coordinated Universal Time (UTC). Doesn't change
* when the snapshot is copied.
*/
public final Instant originalSnapshotCreateTime() {
return originalSnapshotCreateTime;
}
/**
*
* The timestamp of the most recent transaction applied to the database that you're backing up. Thus, if you restore
* a snapshot, SnapshotDatabaseTime is the most recent transaction in the restored DB instance. In contrast,
* originalSnapshotCreateTime specifies the system time that the snapshot completed.
*
*
* If you back up a read replica, you can determine the replica lag by comparing SnapshotDatabaseTime with
* originalSnapshotCreateTime. For example, if originalSnapshotCreateTime is two hours later than
* SnapshotDatabaseTime, then the replica lag is two hours.
*
*
* @return The timestamp of the most recent transaction applied to the database that you're backing up. Thus, if you
* restore a snapshot, SnapshotDatabaseTime is the most recent transaction in the restored DB instance. In
* contrast, originalSnapshotCreateTime specifies the system time that the snapshot completed.
*
* If you back up a read replica, you can determine the replica lag by comparing SnapshotDatabaseTime with
* originalSnapshotCreateTime. For example, if originalSnapshotCreateTime is two hours later than
* SnapshotDatabaseTime, then the replica lag is two hours.
*/
public final Instant snapshotDatabaseTime() {
return snapshotDatabaseTime;
}
/**
*
* Specifies where manual snapshots are stored: Amazon Web Services Outposts or the Amazon Web Services Region.
*
*
* @return Specifies where manual snapshots are stored: Amazon Web Services Outposts or the Amazon Web Services
* Region.
*/
public final String snapshotTarget() {
return snapshotTarget;
}
/**
*
* Specifies the storage throughput for the DB snapshot.
*
*
* @return Specifies the storage throughput for the DB snapshot.
*/
public final Integer storageThroughput() {
return storageThroughput;
}
/**
*
* The Oracle system identifier (SID), which is the name of the Oracle database instance that manages your database
* files. The Oracle SID is also the name of your CDB.
*
*
* @return The Oracle system identifier (SID), which is the name of the Oracle database instance that manages your
* database files. The Oracle SID is also the name of your CDB.
*/
public final String dbSystemId() {
return dbSystemId;
}
/**
*
* Indicates whether the DB instance has a dedicated log volume (DLV) enabled.
*
*
* @return Indicates whether the DB instance has a dedicated log volume (DLV) enabled.
*/
public final Boolean dedicatedLogVolume() {
return dedicatedLogVolume;
}
/**
*
* Indicates whether the snapshot is of a DB instance using the multi-tenant configuration (TRUE) or the
* single-tenant configuration (FALSE).
*
*
* @return Indicates whether the snapshot is of a DB instance using the multi-tenant configuration (TRUE) or the
* single-tenant configuration (FALSE).
*/
public final Boolean multiTenant() {
return multiTenant;
}
@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(dbSnapshotIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(dbInstanceIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(snapshotCreateTime());
hashCode = 31 * hashCode + Objects.hashCode(engine());
hashCode = 31 * hashCode + Objects.hashCode(allocatedStorage());
hashCode = 31 * hashCode + Objects.hashCode(status());
hashCode = 31 * hashCode + Objects.hashCode(port());
hashCode = 31 * hashCode + Objects.hashCode(availabilityZone());
hashCode = 31 * hashCode + Objects.hashCode(vpcId());
hashCode = 31 * hashCode + Objects.hashCode(instanceCreateTime());
hashCode = 31 * hashCode + Objects.hashCode(masterUsername());
hashCode = 31 * hashCode + Objects.hashCode(engineVersion());
hashCode = 31 * hashCode + Objects.hashCode(licenseModel());
hashCode = 31 * hashCode + Objects.hashCode(snapshotType());
hashCode = 31 * hashCode + Objects.hashCode(iops());
hashCode = 31 * hashCode + Objects.hashCode(optionGroupName());
hashCode = 31 * hashCode + Objects.hashCode(percentProgress());
hashCode = 31 * hashCode + Objects.hashCode(sourceRegion());
hashCode = 31 * hashCode + Objects.hashCode(sourceDBSnapshotIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(storageType());
hashCode = 31 * hashCode + Objects.hashCode(tdeCredentialArn());
hashCode = 31 * hashCode + Objects.hashCode(encrypted());
hashCode = 31 * hashCode + Objects.hashCode(kmsKeyId());
hashCode = 31 * hashCode + Objects.hashCode(dbSnapshotArn());
hashCode = 31 * hashCode + Objects.hashCode(timezone());
hashCode = 31 * hashCode + Objects.hashCode(iamDatabaseAuthenticationEnabled());
hashCode = 31 * hashCode + Objects.hashCode(hasProcessorFeatures() ? processorFeatures() : null);
hashCode = 31 * hashCode + Objects.hashCode(dbiResourceId());
hashCode = 31 * hashCode + Objects.hashCode(hasTagList() ? tagList() : null);
hashCode = 31 * hashCode + Objects.hashCode(originalSnapshotCreateTime());
hashCode = 31 * hashCode + Objects.hashCode(snapshotDatabaseTime());
hashCode = 31 * hashCode + Objects.hashCode(snapshotTarget());
hashCode = 31 * hashCode + Objects.hashCode(storageThroughput());
hashCode = 31 * hashCode + Objects.hashCode(dbSystemId());
hashCode = 31 * hashCode + Objects.hashCode(dedicatedLogVolume());
hashCode = 31 * hashCode + Objects.hashCode(multiTenant());
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 DBSnapshot)) {
return false;
}
DBSnapshot other = (DBSnapshot) obj;
return Objects.equals(dbSnapshotIdentifier(), other.dbSnapshotIdentifier())
&& Objects.equals(dbInstanceIdentifier(), other.dbInstanceIdentifier())
&& Objects.equals(snapshotCreateTime(), other.snapshotCreateTime()) && Objects.equals(engine(), other.engine())
&& Objects.equals(allocatedStorage(), other.allocatedStorage()) && Objects.equals(status(), other.status())
&& Objects.equals(port(), other.port()) && Objects.equals(availabilityZone(), other.availabilityZone())
&& Objects.equals(vpcId(), other.vpcId()) && Objects.equals(instanceCreateTime(), other.instanceCreateTime())
&& Objects.equals(masterUsername(), other.masterUsername())
&& Objects.equals(engineVersion(), other.engineVersion()) && Objects.equals(licenseModel(), other.licenseModel())
&& Objects.equals(snapshotType(), other.snapshotType()) && Objects.equals(iops(), other.iops())
&& Objects.equals(optionGroupName(), other.optionGroupName())
&& Objects.equals(percentProgress(), other.percentProgress())
&& Objects.equals(sourceRegion(), other.sourceRegion())
&& Objects.equals(sourceDBSnapshotIdentifier(), other.sourceDBSnapshotIdentifier())
&& Objects.equals(storageType(), other.storageType())
&& Objects.equals(tdeCredentialArn(), other.tdeCredentialArn()) && Objects.equals(encrypted(), other.encrypted())
&& Objects.equals(kmsKeyId(), other.kmsKeyId()) && Objects.equals(dbSnapshotArn(), other.dbSnapshotArn())
&& Objects.equals(timezone(), other.timezone())
&& Objects.equals(iamDatabaseAuthenticationEnabled(), other.iamDatabaseAuthenticationEnabled())
&& hasProcessorFeatures() == other.hasProcessorFeatures()
&& Objects.equals(processorFeatures(), other.processorFeatures())
&& Objects.equals(dbiResourceId(), other.dbiResourceId()) && hasTagList() == other.hasTagList()
&& Objects.equals(tagList(), other.tagList())
&& Objects.equals(originalSnapshotCreateTime(), other.originalSnapshotCreateTime())
&& Objects.equals(snapshotDatabaseTime(), other.snapshotDatabaseTime())
&& Objects.equals(snapshotTarget(), other.snapshotTarget())
&& Objects.equals(storageThroughput(), other.storageThroughput())
&& Objects.equals(dbSystemId(), other.dbSystemId())
&& Objects.equals(dedicatedLogVolume(), other.dedicatedLogVolume())
&& Objects.equals(multiTenant(), other.multiTenant());
}
/**
* 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("DBSnapshot").add("DBSnapshotIdentifier", dbSnapshotIdentifier())
.add("DBInstanceIdentifier", dbInstanceIdentifier()).add("SnapshotCreateTime", snapshotCreateTime())
.add("Engine", engine()).add("AllocatedStorage", allocatedStorage()).add("Status", status()).add("Port", port())
.add("AvailabilityZone", availabilityZone()).add("VpcId", vpcId())
.add("InstanceCreateTime", instanceCreateTime()).add("MasterUsername", masterUsername())
.add("EngineVersion", engineVersion()).add("LicenseModel", licenseModel()).add("SnapshotType", snapshotType())
.add("Iops", iops()).add("OptionGroupName", optionGroupName()).add("PercentProgress", percentProgress())
.add("SourceRegion", sourceRegion()).add("SourceDBSnapshotIdentifier", sourceDBSnapshotIdentifier())
.add("StorageType", storageType()).add("TdeCredentialArn", tdeCredentialArn()).add("Encrypted", encrypted())
.add("KmsKeyId", kmsKeyId()).add("DBSnapshotArn", dbSnapshotArn()).add("Timezone", timezone())
.add("IAMDatabaseAuthenticationEnabled", iamDatabaseAuthenticationEnabled())
.add("ProcessorFeatures", hasProcessorFeatures() ? processorFeatures() : null)
.add("DbiResourceId", dbiResourceId()).add("TagList", hasTagList() ? tagList() : null)
.add("OriginalSnapshotCreateTime", originalSnapshotCreateTime())
.add("SnapshotDatabaseTime", snapshotDatabaseTime()).add("SnapshotTarget", snapshotTarget())
.add("StorageThroughput", storageThroughput()).add("DBSystemId", dbSystemId())
.add("DedicatedLogVolume", dedicatedLogVolume()).add("MultiTenant", multiTenant()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "DBSnapshotIdentifier":
return Optional.ofNullable(clazz.cast(dbSnapshotIdentifier()));
case "DBInstanceIdentifier":
return Optional.ofNullable(clazz.cast(dbInstanceIdentifier()));
case "SnapshotCreateTime":
return Optional.ofNullable(clazz.cast(snapshotCreateTime()));
case "Engine":
return Optional.ofNullable(clazz.cast(engine()));
case "AllocatedStorage":
return Optional.ofNullable(clazz.cast(allocatedStorage()));
case "Status":
return Optional.ofNullable(clazz.cast(status()));
case "Port":
return Optional.ofNullable(clazz.cast(port()));
case "AvailabilityZone":
return Optional.ofNullable(clazz.cast(availabilityZone()));
case "VpcId":
return Optional.ofNullable(clazz.cast(vpcId()));
case "InstanceCreateTime":
return Optional.ofNullable(clazz.cast(instanceCreateTime()));
case "MasterUsername":
return Optional.ofNullable(clazz.cast(masterUsername()));
case "EngineVersion":
return Optional.ofNullable(clazz.cast(engineVersion()));
case "LicenseModel":
return Optional.ofNullable(clazz.cast(licenseModel()));
case "SnapshotType":
return Optional.ofNullable(clazz.cast(snapshotType()));
case "Iops":
return Optional.ofNullable(clazz.cast(iops()));
case "OptionGroupName":
return Optional.ofNullable(clazz.cast(optionGroupName()));
case "PercentProgress":
return Optional.ofNullable(clazz.cast(percentProgress()));
case "SourceRegion":
return Optional.ofNullable(clazz.cast(sourceRegion()));
case "SourceDBSnapshotIdentifier":
return Optional.ofNullable(clazz.cast(sourceDBSnapshotIdentifier()));
case "StorageType":
return Optional.ofNullable(clazz.cast(storageType()));
case "TdeCredentialArn":
return Optional.ofNullable(clazz.cast(tdeCredentialArn()));
case "Encrypted":
return Optional.ofNullable(clazz.cast(encrypted()));
case "KmsKeyId":
return Optional.ofNullable(clazz.cast(kmsKeyId()));
case "DBSnapshotArn":
return Optional.ofNullable(clazz.cast(dbSnapshotArn()));
case "Timezone":
return Optional.ofNullable(clazz.cast(timezone()));
case "IAMDatabaseAuthenticationEnabled":
return Optional.ofNullable(clazz.cast(iamDatabaseAuthenticationEnabled()));
case "ProcessorFeatures":
return Optional.ofNullable(clazz.cast(processorFeatures()));
case "DbiResourceId":
return Optional.ofNullable(clazz.cast(dbiResourceId()));
case "TagList":
return Optional.ofNullable(clazz.cast(tagList()));
case "OriginalSnapshotCreateTime":
return Optional.ofNullable(clazz.cast(originalSnapshotCreateTime()));
case "SnapshotDatabaseTime":
return Optional.ofNullable(clazz.cast(snapshotDatabaseTime()));
case "SnapshotTarget":
return Optional.ofNullable(clazz.cast(snapshotTarget()));
case "StorageThroughput":
return Optional.ofNullable(clazz.cast(storageThroughput()));
case "DBSystemId":
return Optional.ofNullable(clazz.cast(dbSystemId()));
case "DedicatedLogVolume":
return Optional.ofNullable(clazz.cast(dedicatedLogVolume()));
case "MultiTenant":
return Optional.ofNullable(clazz.cast(multiTenant()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function