software.amazon.awssdk.services.neptune.model.DBInstance Maven / Gradle / Ivy
Show all versions of neptune 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.neptune.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 Neptune DB instance.
*
*
* This data type is used as a response element in the DescribeDBInstances action.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class DBInstance implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField DB_INSTANCE_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DBInstanceIdentifier").getter(getter(DBInstance::dbInstanceIdentifier))
.setter(setter(Builder::dbInstanceIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBInstanceIdentifier").build())
.build();
private static final SdkField DB_INSTANCE_CLASS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DBInstanceClass").getter(getter(DBInstance::dbInstanceClass)).setter(setter(Builder::dbInstanceClass))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBInstanceClass").build()).build();
private static final SdkField ENGINE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Engine")
.getter(getter(DBInstance::engine)).setter(setter(Builder::engine))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Engine").build()).build();
private static final SdkField DB_INSTANCE_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DBInstanceStatus").getter(getter(DBInstance::dbInstanceStatus))
.setter(setter(Builder::dbInstanceStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBInstanceStatus").build()).build();
private static final SdkField MASTER_USERNAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("MasterUsername").getter(getter(DBInstance::masterUsername)).setter(setter(Builder::masterUsername))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MasterUsername").build()).build();
private static final SdkField DB_NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("DBName")
.getter(getter(DBInstance::dbName)).setter(setter(Builder::dbName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBName").build()).build();
private static final SdkField ENDPOINT_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Endpoint").getter(getter(DBInstance::endpoint)).setter(setter(Builder::endpoint))
.constructor(Endpoint::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Endpoint").build()).build();
private static final SdkField ALLOCATED_STORAGE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("AllocatedStorage").getter(getter(DBInstance::allocatedStorage))
.setter(setter(Builder::allocatedStorage))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AllocatedStorage").build()).build();
private static final SdkField INSTANCE_CREATE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("InstanceCreateTime").getter(getter(DBInstance::instanceCreateTime))
.setter(setter(Builder::instanceCreateTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceCreateTime").build())
.build();
private static final SdkField PREFERRED_BACKUP_WINDOW_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("PreferredBackupWindow").getter(getter(DBInstance::preferredBackupWindow))
.setter(setter(Builder::preferredBackupWindow))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PreferredBackupWindow").build())
.build();
private static final SdkField BACKUP_RETENTION_PERIOD_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("BackupRetentionPeriod").getter(getter(DBInstance::backupRetentionPeriod))
.setter(setter(Builder::backupRetentionPeriod))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BackupRetentionPeriod").build())
.build();
private static final SdkField> DB_SECURITY_GROUPS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("DBSecurityGroups")
.getter(getter(DBInstance::dbSecurityGroups))
.setter(setter(Builder::dbSecurityGroups))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBSecurityGroups").build(),
ListTrait
.builder()
.memberLocationName("DBSecurityGroup")
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(DBSecurityGroupMembership::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("DBSecurityGroup").build()).build()).build()).build();
private static final SdkField> VPC_SECURITY_GROUPS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("VpcSecurityGroups")
.getter(getter(DBInstance::vpcSecurityGroups))
.setter(setter(Builder::vpcSecurityGroups))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcSecurityGroups").build(),
ListTrait
.builder()
.memberLocationName("VpcSecurityGroupMembership")
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(VpcSecurityGroupMembership::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("VpcSecurityGroupMembership").build()).build()).build())
.build();
private static final SdkField> DB_PARAMETER_GROUPS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("DBParameterGroups")
.getter(getter(DBInstance::dbParameterGroups))
.setter(setter(Builder::dbParameterGroups))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBParameterGroups").build(),
ListTrait
.builder()
.memberLocationName("DBParameterGroup")
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(DBParameterGroupStatus::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("DBParameterGroup").build()).build()).build()).build();
private static final SdkField AVAILABILITY_ZONE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AvailabilityZone").getter(getter(DBInstance::availabilityZone))
.setter(setter(Builder::availabilityZone))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AvailabilityZone").build()).build();
private static final SdkField DB_SUBNET_GROUP_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("DBSubnetGroup")
.getter(getter(DBInstance::dbSubnetGroup)).setter(setter(Builder::dbSubnetGroup)).constructor(DBSubnetGroup::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBSubnetGroup").build()).build();
private static final SdkField PREFERRED_MAINTENANCE_WINDOW_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("PreferredMaintenanceWindow")
.getter(getter(DBInstance::preferredMaintenanceWindow))
.setter(setter(Builder::preferredMaintenanceWindow))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PreferredMaintenanceWindow").build())
.build();
private static final SdkField PENDING_MODIFIED_VALUES_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("PendingModifiedValues")
.getter(getter(DBInstance::pendingModifiedValues)).setter(setter(Builder::pendingModifiedValues))
.constructor(PendingModifiedValues::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PendingModifiedValues").build())
.build();
private static final SdkField LATEST_RESTORABLE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("LatestRestorableTime").getter(getter(DBInstance::latestRestorableTime))
.setter(setter(Builder::latestRestorableTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LatestRestorableTime").build())
.build();
private static final SdkField MULTI_AZ_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("MultiAZ").getter(getter(DBInstance::multiAZ)).setter(setter(Builder::multiAZ))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MultiAZ").build()).build();
private static final SdkField ENGINE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("EngineVersion").getter(getter(DBInstance::engineVersion)).setter(setter(Builder::engineVersion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineVersion").build()).build();
private static final SdkField AUTO_MINOR_VERSION_UPGRADE_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("AutoMinorVersionUpgrade").getter(getter(DBInstance::autoMinorVersionUpgrade))
.setter(setter(Builder::autoMinorVersionUpgrade))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoMinorVersionUpgrade").build())
.build();
private static final SdkField READ_REPLICA_SOURCE_DB_INSTANCE_IDENTIFIER_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("ReadReplicaSourceDBInstanceIdentifier")
.getter(getter(DBInstance::readReplicaSourceDBInstanceIdentifier))
.setter(setter(Builder::readReplicaSourceDBInstanceIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("ReadReplicaSourceDBInstanceIdentifier").build()).build();
private static final SdkField> READ_REPLICA_DB_INSTANCE_IDENTIFIERS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("ReadReplicaDBInstanceIdentifiers")
.getter(getter(DBInstance::readReplicaDBInstanceIdentifiers))
.setter(setter(Builder::readReplicaDBInstanceIdentifiers))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReadReplicaDBInstanceIdentifiers")
.build(),
ListTrait
.builder()
.memberLocationName("ReadReplicaDBInstanceIdentifier")
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("ReadReplicaDBInstanceIdentifier").build()).build()).build())
.build();
private static final SdkField> READ_REPLICA_DB_CLUSTER_IDENTIFIERS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("ReadReplicaDBClusterIdentifiers")
.getter(getter(DBInstance::readReplicaDBClusterIdentifiers))
.setter(setter(Builder::readReplicaDBClusterIdentifiers))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReadReplicaDBClusterIdentifiers")
.build(),
ListTrait
.builder()
.memberLocationName("ReadReplicaDBClusterIdentifier")
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("ReadReplicaDBClusterIdentifier").build()).build()).build())
.build();
private static final SdkField LICENSE_MODEL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("LicenseModel").getter(getter(DBInstance::licenseModel)).setter(setter(Builder::licenseModel))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LicenseModel").build()).build();
private static final SdkField IOPS_FIELD = SdkField. builder(MarshallingType.INTEGER).memberName("Iops")
.getter(getter(DBInstance::iops)).setter(setter(Builder::iops))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Iops").build()).build();
private static final SdkField> OPTION_GROUP_MEMBERSHIPS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("OptionGroupMemberships")
.getter(getter(DBInstance::optionGroupMemberships))
.setter(setter(Builder::optionGroupMemberships))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OptionGroupMemberships").build(),
ListTrait
.builder()
.memberLocationName("OptionGroupMembership")
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(OptionGroupMembership::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("OptionGroupMembership").build()).build()).build()).build();
private static final SdkField CHARACTER_SET_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CharacterSetName").getter(getter(DBInstance::characterSetName))
.setter(setter(Builder::characterSetName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CharacterSetName").build()).build();
private static final SdkField SECONDARY_AVAILABILITY_ZONE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("SecondaryAvailabilityZone").getter(getter(DBInstance::secondaryAvailabilityZone))
.setter(setter(Builder::secondaryAvailabilityZone))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecondaryAvailabilityZone").build())
.build();
private static final SdkField PUBLICLY_ACCESSIBLE_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("PubliclyAccessible").getter(getter(DBInstance::publiclyAccessible))
.setter(setter(Builder::publiclyAccessible))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PubliclyAccessible").build())
.build();
private static final SdkField> STATUS_INFOS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("StatusInfos")
.getter(getter(DBInstance::statusInfos))
.setter(setter(Builder::statusInfos))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StatusInfos").build(),
ListTrait
.builder()
.memberLocationName("DBInstanceStatusInfo")
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(DBInstanceStatusInfo::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("DBInstanceStatusInfo").build()).build()).build()).build();
private static final SdkField STORAGE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("StorageType").getter(getter(DBInstance::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(DBInstance::tdeCredentialArn))
.setter(setter(Builder::tdeCredentialArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TdeCredentialArn").build()).build();
private static final SdkField DB_INSTANCE_PORT_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("DbInstancePort").getter(getter(DBInstance::dbInstancePort)).setter(setter(Builder::dbInstancePort))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DbInstancePort").build()).build();
private static final SdkField DB_CLUSTER_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DBClusterIdentifier").getter(getter(DBInstance::dbClusterIdentifier))
.setter(setter(Builder::dbClusterIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBClusterIdentifier").build())
.build();
private static final SdkField STORAGE_ENCRYPTED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("StorageEncrypted").getter(getter(DBInstance::storageEncrypted))
.setter(setter(Builder::storageEncrypted))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StorageEncrypted").build()).build();
private static final SdkField KMS_KEY_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("KmsKeyId").getter(getter(DBInstance::kmsKeyId)).setter(setter(Builder::kmsKeyId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KmsKeyId").build()).build();
private static final SdkField DBI_RESOURCE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DbiResourceId").getter(getter(DBInstance::dbiResourceId)).setter(setter(Builder::dbiResourceId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DbiResourceId").build()).build();
private static final SdkField CA_CERTIFICATE_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CACertificateIdentifier").getter(getter(DBInstance::caCertificateIdentifier))
.setter(setter(Builder::caCertificateIdentifier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CACertificateIdentifier").build())
.build();
private static final SdkField> DOMAIN_MEMBERSHIPS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("DomainMemberships")
.getter(getter(DBInstance::domainMemberships))
.setter(setter(Builder::domainMemberships))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DomainMemberships").build(),
ListTrait
.builder()
.memberLocationName("DomainMembership")
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(DomainMembership::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("DomainMembership").build()).build()).build()).build();
private static final SdkField COPY_TAGS_TO_SNAPSHOT_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("CopyTagsToSnapshot").getter(getter(DBInstance::copyTagsToSnapshot))
.setter(setter(Builder::copyTagsToSnapshot))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CopyTagsToSnapshot").build())
.build();
private static final SdkField MONITORING_INTERVAL_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("MonitoringInterval").getter(getter(DBInstance::monitoringInterval))
.setter(setter(Builder::monitoringInterval))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MonitoringInterval").build())
.build();
private static final SdkField ENHANCED_MONITORING_RESOURCE_ARN_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("EnhancedMonitoringResourceArn")
.getter(getter(DBInstance::enhancedMonitoringResourceArn))
.setter(setter(Builder::enhancedMonitoringResourceArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnhancedMonitoringResourceArn")
.build()).build();
private static final SdkField MONITORING_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("MonitoringRoleArn").getter(getter(DBInstance::monitoringRoleArn))
.setter(setter(Builder::monitoringRoleArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MonitoringRoleArn").build()).build();
private static final SdkField PROMOTION_TIER_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("PromotionTier").getter(getter(DBInstance::promotionTier)).setter(setter(Builder::promotionTier))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PromotionTier").build()).build();
private static final SdkField DB_INSTANCE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DBInstanceArn").getter(getter(DBInstance::dbInstanceArn)).setter(setter(Builder::dbInstanceArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBInstanceArn").build()).build();
private static final SdkField TIMEZONE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Timezone").getter(getter(DBInstance::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(DBInstance::iamDatabaseAuthenticationEnabled))
.setter(setter(Builder::iamDatabaseAuthenticationEnabled))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IAMDatabaseAuthenticationEnabled")
.build()).build();
private static final SdkField PERFORMANCE_INSIGHTS_ENABLED_FIELD = SdkField
. builder(MarshallingType.BOOLEAN)
.memberName("PerformanceInsightsEnabled")
.getter(getter(DBInstance::performanceInsightsEnabled))
.setter(setter(Builder::performanceInsightsEnabled))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PerformanceInsightsEnabled").build())
.build();
private static final SdkField PERFORMANCE_INSIGHTS_KMS_KEY_ID_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("PerformanceInsightsKMSKeyId")
.getter(getter(DBInstance::performanceInsightsKMSKeyId))
.setter(setter(Builder::performanceInsightsKMSKeyId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PerformanceInsightsKMSKeyId")
.build()).build();
private static final SdkField> ENABLED_CLOUDWATCH_LOGS_EXPORTS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("EnabledCloudwatchLogsExports")
.getter(getter(DBInstance::enabledCloudwatchLogsExports))
.setter(setter(Builder::enabledCloudwatchLogsExports))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnabledCloudwatchLogsExports")
.build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField DELETION_PROTECTION_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("DeletionProtection").getter(getter(DBInstance::deletionProtection))
.setter(setter(Builder::deletionProtection))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DeletionProtection").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DB_INSTANCE_IDENTIFIER_FIELD,
DB_INSTANCE_CLASS_FIELD, ENGINE_FIELD, DB_INSTANCE_STATUS_FIELD, MASTER_USERNAME_FIELD, DB_NAME_FIELD,
ENDPOINT_FIELD, ALLOCATED_STORAGE_FIELD, INSTANCE_CREATE_TIME_FIELD, PREFERRED_BACKUP_WINDOW_FIELD,
BACKUP_RETENTION_PERIOD_FIELD, DB_SECURITY_GROUPS_FIELD, VPC_SECURITY_GROUPS_FIELD, DB_PARAMETER_GROUPS_FIELD,
AVAILABILITY_ZONE_FIELD, DB_SUBNET_GROUP_FIELD, PREFERRED_MAINTENANCE_WINDOW_FIELD, PENDING_MODIFIED_VALUES_FIELD,
LATEST_RESTORABLE_TIME_FIELD, MULTI_AZ_FIELD, ENGINE_VERSION_FIELD, AUTO_MINOR_VERSION_UPGRADE_FIELD,
READ_REPLICA_SOURCE_DB_INSTANCE_IDENTIFIER_FIELD, READ_REPLICA_DB_INSTANCE_IDENTIFIERS_FIELD,
READ_REPLICA_DB_CLUSTER_IDENTIFIERS_FIELD, LICENSE_MODEL_FIELD, IOPS_FIELD, OPTION_GROUP_MEMBERSHIPS_FIELD,
CHARACTER_SET_NAME_FIELD, SECONDARY_AVAILABILITY_ZONE_FIELD, PUBLICLY_ACCESSIBLE_FIELD, STATUS_INFOS_FIELD,
STORAGE_TYPE_FIELD, TDE_CREDENTIAL_ARN_FIELD, DB_INSTANCE_PORT_FIELD, DB_CLUSTER_IDENTIFIER_FIELD,
STORAGE_ENCRYPTED_FIELD, KMS_KEY_ID_FIELD, DBI_RESOURCE_ID_FIELD, CA_CERTIFICATE_IDENTIFIER_FIELD,
DOMAIN_MEMBERSHIPS_FIELD, COPY_TAGS_TO_SNAPSHOT_FIELD, MONITORING_INTERVAL_FIELD,
ENHANCED_MONITORING_RESOURCE_ARN_FIELD, MONITORING_ROLE_ARN_FIELD, PROMOTION_TIER_FIELD, DB_INSTANCE_ARN_FIELD,
TIMEZONE_FIELD, IAM_DATABASE_AUTHENTICATION_ENABLED_FIELD, PERFORMANCE_INSIGHTS_ENABLED_FIELD,
PERFORMANCE_INSIGHTS_KMS_KEY_ID_FIELD, ENABLED_CLOUDWATCH_LOGS_EXPORTS_FIELD, DELETION_PROTECTION_FIELD));
private static final long serialVersionUID = 1L;
private final String dbInstanceIdentifier;
private final String dbInstanceClass;
private final String engine;
private final String dbInstanceStatus;
private final String masterUsername;
private final String dbName;
private final Endpoint endpoint;
private final Integer allocatedStorage;
private final Instant instanceCreateTime;
private final String preferredBackupWindow;
private final Integer backupRetentionPeriod;
private final List dbSecurityGroups;
private final List vpcSecurityGroups;
private final List dbParameterGroups;
private final String availabilityZone;
private final DBSubnetGroup dbSubnetGroup;
private final String preferredMaintenanceWindow;
private final PendingModifiedValues pendingModifiedValues;
private final Instant latestRestorableTime;
private final Boolean multiAZ;
private final String engineVersion;
private final Boolean autoMinorVersionUpgrade;
private final String readReplicaSourceDBInstanceIdentifier;
private final List readReplicaDBInstanceIdentifiers;
private final List readReplicaDBClusterIdentifiers;
private final String licenseModel;
private final Integer iops;
private final List optionGroupMemberships;
private final String characterSetName;
private final String secondaryAvailabilityZone;
private final Boolean publiclyAccessible;
private final List statusInfos;
private final String storageType;
private final String tdeCredentialArn;
private final Integer dbInstancePort;
private final String dbClusterIdentifier;
private final Boolean storageEncrypted;
private final String kmsKeyId;
private final String dbiResourceId;
private final String caCertificateIdentifier;
private final List domainMemberships;
private final Boolean copyTagsToSnapshot;
private final Integer monitoringInterval;
private final String enhancedMonitoringResourceArn;
private final String monitoringRoleArn;
private final Integer promotionTier;
private final String dbInstanceArn;
private final String timezone;
private final Boolean iamDatabaseAuthenticationEnabled;
private final Boolean performanceInsightsEnabled;
private final String performanceInsightsKMSKeyId;
private final List enabledCloudwatchLogsExports;
private final Boolean deletionProtection;
private DBInstance(BuilderImpl builder) {
this.dbInstanceIdentifier = builder.dbInstanceIdentifier;
this.dbInstanceClass = builder.dbInstanceClass;
this.engine = builder.engine;
this.dbInstanceStatus = builder.dbInstanceStatus;
this.masterUsername = builder.masterUsername;
this.dbName = builder.dbName;
this.endpoint = builder.endpoint;
this.allocatedStorage = builder.allocatedStorage;
this.instanceCreateTime = builder.instanceCreateTime;
this.preferredBackupWindow = builder.preferredBackupWindow;
this.backupRetentionPeriod = builder.backupRetentionPeriod;
this.dbSecurityGroups = builder.dbSecurityGroups;
this.vpcSecurityGroups = builder.vpcSecurityGroups;
this.dbParameterGroups = builder.dbParameterGroups;
this.availabilityZone = builder.availabilityZone;
this.dbSubnetGroup = builder.dbSubnetGroup;
this.preferredMaintenanceWindow = builder.preferredMaintenanceWindow;
this.pendingModifiedValues = builder.pendingModifiedValues;
this.latestRestorableTime = builder.latestRestorableTime;
this.multiAZ = builder.multiAZ;
this.engineVersion = builder.engineVersion;
this.autoMinorVersionUpgrade = builder.autoMinorVersionUpgrade;
this.readReplicaSourceDBInstanceIdentifier = builder.readReplicaSourceDBInstanceIdentifier;
this.readReplicaDBInstanceIdentifiers = builder.readReplicaDBInstanceIdentifiers;
this.readReplicaDBClusterIdentifiers = builder.readReplicaDBClusterIdentifiers;
this.licenseModel = builder.licenseModel;
this.iops = builder.iops;
this.optionGroupMemberships = builder.optionGroupMemberships;
this.characterSetName = builder.characterSetName;
this.secondaryAvailabilityZone = builder.secondaryAvailabilityZone;
this.publiclyAccessible = builder.publiclyAccessible;
this.statusInfos = builder.statusInfos;
this.storageType = builder.storageType;
this.tdeCredentialArn = builder.tdeCredentialArn;
this.dbInstancePort = builder.dbInstancePort;
this.dbClusterIdentifier = builder.dbClusterIdentifier;
this.storageEncrypted = builder.storageEncrypted;
this.kmsKeyId = builder.kmsKeyId;
this.dbiResourceId = builder.dbiResourceId;
this.caCertificateIdentifier = builder.caCertificateIdentifier;
this.domainMemberships = builder.domainMemberships;
this.copyTagsToSnapshot = builder.copyTagsToSnapshot;
this.monitoringInterval = builder.monitoringInterval;
this.enhancedMonitoringResourceArn = builder.enhancedMonitoringResourceArn;
this.monitoringRoleArn = builder.monitoringRoleArn;
this.promotionTier = builder.promotionTier;
this.dbInstanceArn = builder.dbInstanceArn;
this.timezone = builder.timezone;
this.iamDatabaseAuthenticationEnabled = builder.iamDatabaseAuthenticationEnabled;
this.performanceInsightsEnabled = builder.performanceInsightsEnabled;
this.performanceInsightsKMSKeyId = builder.performanceInsightsKMSKeyId;
this.enabledCloudwatchLogsExports = builder.enabledCloudwatchLogsExports;
this.deletionProtection = builder.deletionProtection;
}
/**
*
* Contains a user-supplied database identifier. This identifier is the unique key that identifies a DB instance.
*
*
* @return Contains a user-supplied database identifier. This identifier is the unique key that identifies a DB
* instance.
*/
public final String dbInstanceIdentifier() {
return dbInstanceIdentifier;
}
/**
*
* Contains the name of the compute and memory capacity class of the DB instance.
*
*
* @return Contains the name of the compute and memory capacity class of the DB instance.
*/
public final String dbInstanceClass() {
return dbInstanceClass;
}
/**
*
* Provides the name of the database engine to be used for this DB instance.
*
*
* @return Provides the name of the database engine to be used for this DB instance.
*/
public final String engine() {
return engine;
}
/**
*
* Specifies the current state of this database.
*
*
* @return Specifies the current state of this database.
*/
public final String dbInstanceStatus() {
return dbInstanceStatus;
}
/**
*
* Not supported by Neptune.
*
*
* @return Not supported by Neptune.
*/
public final String masterUsername() {
return masterUsername;
}
/**
*
* The database name.
*
*
* @return The database name.
*/
public final String dbName() {
return dbName;
}
/**
*
* Specifies the connection endpoint.
*
*
* @return Specifies the connection endpoint.
*/
public final Endpoint endpoint() {
return endpoint;
}
/**
*
* Not supported by Neptune.
*
*
* @return Not supported by Neptune.
*/
public final Integer allocatedStorage() {
return allocatedStorage;
}
/**
*
* Provides the date and time the DB instance was created.
*
*
* @return Provides the date and time the DB instance was created.
*/
public final Instant instanceCreateTime() {
return instanceCreateTime;
}
/**
*
* Specifies the daily time range during which automated backups are created if automated backups are enabled, as
* determined by the BackupRetentionPeriod
.
*
*
* @return Specifies the daily time range during which automated backups are created if automated backups are
* enabled, as determined by the BackupRetentionPeriod
.
*/
public final String preferredBackupWindow() {
return preferredBackupWindow;
}
/**
*
* Specifies the number of days for which automatic DB snapshots are retained.
*
*
* @return Specifies the number of days for which automatic DB snapshots are retained.
*/
public final Integer backupRetentionPeriod() {
return backupRetentionPeriod;
}
/**
* For responses, this returns true if the service returned a value for the DBSecurityGroups 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 hasDbSecurityGroups() {
return dbSecurityGroups != null && !(dbSecurityGroups instanceof SdkAutoConstructList);
}
/**
*
* Provides List of DB security group elements containing only DBSecurityGroup.Name
and
* DBSecurityGroup.Status
subelements.
*
*
* 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 #hasDbSecurityGroups} method.
*
*
* @return Provides List of DB security group elements containing only DBSecurityGroup.Name
and
* DBSecurityGroup.Status
subelements.
*/
public final List dbSecurityGroups() {
return dbSecurityGroups;
}
/**
* For responses, this returns true if the service returned a value for the VpcSecurityGroups 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 hasVpcSecurityGroups() {
return vpcSecurityGroups != null && !(vpcSecurityGroups instanceof SdkAutoConstructList);
}
/**
*
* Provides a list of VPC security group elements that the DB instance belongs to.
*
*
* 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 #hasVpcSecurityGroups} method.
*
*
* @return Provides a list of VPC security group elements that the DB instance belongs to.
*/
public final List vpcSecurityGroups() {
return vpcSecurityGroups;
}
/**
* For responses, this returns true if the service returned a value for the DBParameterGroups 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 hasDbParameterGroups() {
return dbParameterGroups != null && !(dbParameterGroups instanceof SdkAutoConstructList);
}
/**
*
* Provides the list of DB parameter groups applied to this DB instance.
*
*
* 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 #hasDbParameterGroups} method.
*
*
* @return Provides the list of DB parameter groups applied to this DB instance.
*/
public final List dbParameterGroups() {
return dbParameterGroups;
}
/**
*
* Specifies the name of the Availability Zone the DB instance is located in.
*
*
* @return Specifies the name of the Availability Zone the DB instance is located in.
*/
public final String availabilityZone() {
return availabilityZone;
}
/**
*
* Specifies information on the subnet group associated with the DB instance, including the name, description, and
* subnets in the subnet group.
*
*
* @return Specifies information on the subnet group associated with the DB instance, including the name,
* description, and subnets in the subnet group.
*/
public final DBSubnetGroup dbSubnetGroup() {
return dbSubnetGroup;
}
/**
*
* Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*
*
* @return Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time
* (UTC).
*/
public final String preferredMaintenanceWindow() {
return preferredMaintenanceWindow;
}
/**
*
* Specifies that changes to the DB instance are pending. This element is only included when changes are pending.
* Specific changes are identified by subelements.
*
*
* @return Specifies that changes to the DB instance are pending. This element is only included when changes are
* pending. Specific changes are identified by subelements.
*/
public final PendingModifiedValues pendingModifiedValues() {
return pendingModifiedValues;
}
/**
*
* Specifies the latest time to which a database can be restored with point-in-time restore.
*
*
* @return Specifies the latest time to which a database can be restored with point-in-time restore.
*/
public final Instant latestRestorableTime() {
return latestRestorableTime;
}
/**
*
* Specifies if the DB instance is a Multi-AZ deployment.
*
*
* @return Specifies if the DB instance is a Multi-AZ deployment.
*/
public final Boolean multiAZ() {
return multiAZ;
}
/**
*
* Indicates the database engine version.
*
*
* @return Indicates the database engine version.
*/
public final String engineVersion() {
return engineVersion;
}
/**
*
* Indicates that minor version patches are applied automatically.
*
*
* @return Indicates that minor version patches are applied automatically.
*/
public final Boolean autoMinorVersionUpgrade() {
return autoMinorVersionUpgrade;
}
/**
*
* Contains the identifier of the source DB instance if this DB instance is a Read Replica.
*
*
* @return Contains the identifier of the source DB instance if this DB instance is a Read Replica.
*/
public final String readReplicaSourceDBInstanceIdentifier() {
return readReplicaSourceDBInstanceIdentifier;
}
/**
* For responses, this returns true if the service returned a value for the ReadReplicaDBInstanceIdentifiers
* 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 hasReadReplicaDBInstanceIdentifiers() {
return readReplicaDBInstanceIdentifiers != null && !(readReplicaDBInstanceIdentifiers instanceof SdkAutoConstructList);
}
/**
*
* Contains one or more identifiers of the Read Replicas associated with this DB instance.
*
*
* 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 #hasReadReplicaDBInstanceIdentifiers}
* method.
*
*
* @return Contains one or more identifiers of the Read Replicas associated with this DB instance.
*/
public final List readReplicaDBInstanceIdentifiers() {
return readReplicaDBInstanceIdentifiers;
}
/**
* For responses, this returns true if the service returned a value for the ReadReplicaDBClusterIdentifiers
* 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 hasReadReplicaDBClusterIdentifiers() {
return readReplicaDBClusterIdentifiers != null && !(readReplicaDBClusterIdentifiers instanceof SdkAutoConstructList);
}
/**
*
* Contains one or more identifiers of DB clusters that are Read Replicas of this DB instance.
*
*
* 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 #hasReadReplicaDBClusterIdentifiers}
* method.
*
*
* @return Contains one or more identifiers of DB clusters that are Read Replicas of this DB instance.
*/
public final List readReplicaDBClusterIdentifiers() {
return readReplicaDBClusterIdentifiers;
}
/**
*
* License model information for this DB instance.
*
*
* @return License model information for this DB instance.
*/
public final String licenseModel() {
return licenseModel;
}
/**
*
* Specifies the Provisioned IOPS (I/O operations per second) value.
*
*
* @return Specifies the Provisioned IOPS (I/O operations per second) value.
*/
public final Integer iops() {
return iops;
}
/**
* For responses, this returns true if the service returned a value for the OptionGroupMemberships 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 hasOptionGroupMemberships() {
return optionGroupMemberships != null && !(optionGroupMemberships instanceof SdkAutoConstructList);
}
/**
*
* (Not supported by Neptune)
*
*
* 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 #hasOptionGroupMemberships} method.
*
*
* @return (Not supported by Neptune)
*/
public final List optionGroupMemberships() {
return optionGroupMemberships;
}
/**
*
* (Not supported by Neptune)
*
*
* @return (Not supported by Neptune)
*/
public final String characterSetName() {
return characterSetName;
}
/**
*
* If present, specifies the name of the secondary Availability Zone for a DB instance with multi-AZ support.
*
*
* @return If present, specifies the name of the secondary Availability Zone for a DB instance with multi-AZ
* support.
*/
public final String secondaryAvailabilityZone() {
return secondaryAvailabilityZone;
}
/**
*
* This flag should no longer be used.
*
*
* @return This flag should no longer be used.
* @deprecated
*/
@Deprecated
public final Boolean publiclyAccessible() {
return publiclyAccessible;
}
/**
* For responses, this returns true if the service returned a value for the StatusInfos 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 hasStatusInfos() {
return statusInfos != null && !(statusInfos instanceof SdkAutoConstructList);
}
/**
*
* The status of a Read Replica. If the instance is not a Read Replica, this is blank.
*
*
* 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 #hasStatusInfos} method.
*
*
* @return The status of a Read Replica. If the instance is not a Read Replica, this is blank.
*/
public final List statusInfos() {
return statusInfos;
}
/**
*
* Specifies the storage type associated with DB instance.
*
*
* @return Specifies the storage type associated with DB instance.
*/
public final String storageType() {
return storageType;
}
/**
*
* The ARN from the key store with which the instance is associated for TDE encryption.
*
*
* @return The ARN from the key store with which the instance is associated for TDE encryption.
*/
public final String tdeCredentialArn() {
return tdeCredentialArn;
}
/**
*
* Specifies the port that the DB instance listens on. If the DB instance is part of a DB cluster, this can be a
* different port than the DB cluster port.
*
*
* @return Specifies the port that the DB instance listens on. If the DB instance is part of a DB cluster, this can
* be a different port than the DB cluster port.
*/
public final Integer dbInstancePort() {
return dbInstancePort;
}
/**
*
* If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a
* member of.
*
*
* @return If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance
* is a member of.
*/
public final String dbClusterIdentifier() {
return dbClusterIdentifier;
}
/**
*
* Not supported: The encryption for DB instances is managed by the DB cluster.
*
*
* @return Not supported: The encryption for DB instances is managed by the DB cluster.
*/
public final Boolean storageEncrypted() {
return storageEncrypted;
}
/**
*
* Not supported: The encryption for DB instances is managed by the DB cluster.
*
*
* @return Not supported: The encryption for DB instances is managed by the DB cluster.
*/
public final String kmsKeyId() {
return kmsKeyId;
}
/**
*
* The Amazon Region-unique, immutable identifier for the DB instance. This identifier is found in Amazon CloudTrail
* log entries whenever the Amazon KMS key for the DB instance is accessed.
*
*
* @return The Amazon Region-unique, immutable identifier for the DB instance. This identifier is found in Amazon
* CloudTrail log entries whenever the Amazon KMS key for the DB instance is accessed.
*/
public final String dbiResourceId() {
return dbiResourceId;
}
/**
*
* The identifier of the CA certificate for this DB instance.
*
*
* @return The identifier of the CA certificate for this DB instance.
*/
public final String caCertificateIdentifier() {
return caCertificateIdentifier;
}
/**
* For responses, this returns true if the service returned a value for the DomainMemberships 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 hasDomainMemberships() {
return domainMemberships != null && !(domainMemberships instanceof SdkAutoConstructList);
}
/**
*
* Not supported
*
*
* 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 #hasDomainMemberships} method.
*
*
* @return Not supported
*/
public final List domainMemberships() {
return domainMemberships;
}
/**
*
* Specifies whether tags are copied from the DB instance to snapshots of the DB instance.
*
*
* @return Specifies whether tags are copied from the DB instance to snapshots of the DB instance.
*/
public final Boolean copyTagsToSnapshot() {
return copyTagsToSnapshot;
}
/**
*
* The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.
*
*
* @return The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB
* instance.
*/
public final Integer monitoringInterval() {
return monitoringInterval;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that receives the Enhanced Monitoring
* metrics data for the DB instance.
*
*
* @return The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that receives the Enhanced
* Monitoring metrics data for the DB instance.
*/
public final String enhancedMonitoringResourceArn() {
return enhancedMonitoringResourceArn;
}
/**
*
* The ARN for the IAM role that permits Neptune to send Enhanced Monitoring metrics to Amazon CloudWatch Logs.
*
*
* @return The ARN for the IAM role that permits Neptune to send Enhanced Monitoring metrics to Amazon CloudWatch
* Logs.
*/
public final String monitoringRoleArn() {
return monitoringRoleArn;
}
/**
*
* A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of
* the existing primary instance.
*
*
* @return A value that specifies the order in which a Read Replica is promoted to the primary instance after a
* failure of the existing primary instance.
*/
public final Integer promotionTier() {
return promotionTier;
}
/**
*
* The Amazon Resource Name (ARN) for the DB instance.
*
*
* @return The Amazon Resource Name (ARN) for the DB instance.
*/
public final String dbInstanceArn() {
return dbInstanceArn;
}
/**
*
* Not supported.
*
*
* @return Not supported.
*/
public final String timezone() {
return timezone;
}
/**
*
* True if Amazon Identity and Access Management (IAM) authentication is enabled, and otherwise false.
*
*
* @return True if Amazon Identity and Access Management (IAM) authentication is enabled, and otherwise false.
*/
public final Boolean iamDatabaseAuthenticationEnabled() {
return iamDatabaseAuthenticationEnabled;
}
/**
*
* (Not supported by Neptune)
*
*
* @return (Not supported by Neptune)
*/
public final Boolean performanceInsightsEnabled() {
return performanceInsightsEnabled;
}
/**
*
* (Not supported by Neptune)
*
*
* @return (Not supported by Neptune)
*/
public final String performanceInsightsKMSKeyId() {
return performanceInsightsKMSKeyId;
}
/**
* For responses, this returns true if the service returned a value for the EnabledCloudwatchLogsExports 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 hasEnabledCloudwatchLogsExports() {
return enabledCloudwatchLogsExports != null && !(enabledCloudwatchLogsExports instanceof SdkAutoConstructList);
}
/**
*
* A list of log types that this DB instance is configured to export to CloudWatch Logs.
*
*
* 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 #hasEnabledCloudwatchLogsExports} method.
*
*
* @return A list of log types that this DB instance is configured to export to CloudWatch Logs.
*/
public final List enabledCloudwatchLogsExports() {
return enabledCloudwatchLogsExports;
}
/**
*
* Indicates whether or not the DB instance has deletion protection enabled. The instance can't be deleted when
* deletion protection is enabled. See Deleting a DB
* Instance.
*
*
* @return Indicates whether or not the DB instance has deletion protection enabled. The instance can't be deleted
* when deletion protection is enabled. See Deleting
* a DB Instance.
*/
public final Boolean deletionProtection() {
return deletionProtection;
}
@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(dbInstanceIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(dbInstanceClass());
hashCode = 31 * hashCode + Objects.hashCode(engine());
hashCode = 31 * hashCode + Objects.hashCode(dbInstanceStatus());
hashCode = 31 * hashCode + Objects.hashCode(masterUsername());
hashCode = 31 * hashCode + Objects.hashCode(dbName());
hashCode = 31 * hashCode + Objects.hashCode(endpoint());
hashCode = 31 * hashCode + Objects.hashCode(allocatedStorage());
hashCode = 31 * hashCode + Objects.hashCode(instanceCreateTime());
hashCode = 31 * hashCode + Objects.hashCode(preferredBackupWindow());
hashCode = 31 * hashCode + Objects.hashCode(backupRetentionPeriod());
hashCode = 31 * hashCode + Objects.hashCode(hasDbSecurityGroups() ? dbSecurityGroups() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasVpcSecurityGroups() ? vpcSecurityGroups() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasDbParameterGroups() ? dbParameterGroups() : null);
hashCode = 31 * hashCode + Objects.hashCode(availabilityZone());
hashCode = 31 * hashCode + Objects.hashCode(dbSubnetGroup());
hashCode = 31 * hashCode + Objects.hashCode(preferredMaintenanceWindow());
hashCode = 31 * hashCode + Objects.hashCode(pendingModifiedValues());
hashCode = 31 * hashCode + Objects.hashCode(latestRestorableTime());
hashCode = 31 * hashCode + Objects.hashCode(multiAZ());
hashCode = 31 * hashCode + Objects.hashCode(engineVersion());
hashCode = 31 * hashCode + Objects.hashCode(autoMinorVersionUpgrade());
hashCode = 31 * hashCode + Objects.hashCode(readReplicaSourceDBInstanceIdentifier());
hashCode = 31 * hashCode
+ Objects.hashCode(hasReadReplicaDBInstanceIdentifiers() ? readReplicaDBInstanceIdentifiers() : null);
hashCode = 31 * hashCode
+ Objects.hashCode(hasReadReplicaDBClusterIdentifiers() ? readReplicaDBClusterIdentifiers() : null);
hashCode = 31 * hashCode + Objects.hashCode(licenseModel());
hashCode = 31 * hashCode + Objects.hashCode(iops());
hashCode = 31 * hashCode + Objects.hashCode(hasOptionGroupMemberships() ? optionGroupMemberships() : null);
hashCode = 31 * hashCode + Objects.hashCode(characterSetName());
hashCode = 31 * hashCode + Objects.hashCode(secondaryAvailabilityZone());
hashCode = 31 * hashCode + Objects.hashCode(publiclyAccessible());
hashCode = 31 * hashCode + Objects.hashCode(hasStatusInfos() ? statusInfos() : null);
hashCode = 31 * hashCode + Objects.hashCode(storageType());
hashCode = 31 * hashCode + Objects.hashCode(tdeCredentialArn());
hashCode = 31 * hashCode + Objects.hashCode(dbInstancePort());
hashCode = 31 * hashCode + Objects.hashCode(dbClusterIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(storageEncrypted());
hashCode = 31 * hashCode + Objects.hashCode(kmsKeyId());
hashCode = 31 * hashCode + Objects.hashCode(dbiResourceId());
hashCode = 31 * hashCode + Objects.hashCode(caCertificateIdentifier());
hashCode = 31 * hashCode + Objects.hashCode(hasDomainMemberships() ? domainMemberships() : null);
hashCode = 31 * hashCode + Objects.hashCode(copyTagsToSnapshot());
hashCode = 31 * hashCode + Objects.hashCode(monitoringInterval());
hashCode = 31 * hashCode + Objects.hashCode(enhancedMonitoringResourceArn());
hashCode = 31 * hashCode + Objects.hashCode(monitoringRoleArn());
hashCode = 31 * hashCode + Objects.hashCode(promotionTier());
hashCode = 31 * hashCode + Objects.hashCode(dbInstanceArn());
hashCode = 31 * hashCode + Objects.hashCode(timezone());
hashCode = 31 * hashCode + Objects.hashCode(iamDatabaseAuthenticationEnabled());
hashCode = 31 * hashCode + Objects.hashCode(performanceInsightsEnabled());
hashCode = 31 * hashCode + Objects.hashCode(performanceInsightsKMSKeyId());
hashCode = 31 * hashCode + Objects.hashCode(hasEnabledCloudwatchLogsExports() ? enabledCloudwatchLogsExports() : null);
hashCode = 31 * hashCode + Objects.hashCode(deletionProtection());
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 DBInstance)) {
return false;
}
DBInstance other = (DBInstance) obj;
return Objects.equals(dbInstanceIdentifier(), other.dbInstanceIdentifier())
&& Objects.equals(dbInstanceClass(), other.dbInstanceClass()) && Objects.equals(engine(), other.engine())
&& Objects.equals(dbInstanceStatus(), other.dbInstanceStatus())
&& Objects.equals(masterUsername(), other.masterUsername()) && Objects.equals(dbName(), other.dbName())
&& Objects.equals(endpoint(), other.endpoint()) && Objects.equals(allocatedStorage(), other.allocatedStorage())
&& Objects.equals(instanceCreateTime(), other.instanceCreateTime())
&& Objects.equals(preferredBackupWindow(), other.preferredBackupWindow())
&& Objects.equals(backupRetentionPeriod(), other.backupRetentionPeriod())
&& hasDbSecurityGroups() == other.hasDbSecurityGroups()
&& Objects.equals(dbSecurityGroups(), other.dbSecurityGroups())
&& hasVpcSecurityGroups() == other.hasVpcSecurityGroups()
&& Objects.equals(vpcSecurityGroups(), other.vpcSecurityGroups())
&& hasDbParameterGroups() == other.hasDbParameterGroups()
&& Objects.equals(dbParameterGroups(), other.dbParameterGroups())
&& Objects.equals(availabilityZone(), other.availabilityZone())
&& Objects.equals(dbSubnetGroup(), other.dbSubnetGroup())
&& Objects.equals(preferredMaintenanceWindow(), other.preferredMaintenanceWindow())
&& Objects.equals(pendingModifiedValues(), other.pendingModifiedValues())
&& Objects.equals(latestRestorableTime(), other.latestRestorableTime())
&& Objects.equals(multiAZ(), other.multiAZ()) && Objects.equals(engineVersion(), other.engineVersion())
&& Objects.equals(autoMinorVersionUpgrade(), other.autoMinorVersionUpgrade())
&& Objects.equals(readReplicaSourceDBInstanceIdentifier(), other.readReplicaSourceDBInstanceIdentifier())
&& hasReadReplicaDBInstanceIdentifiers() == other.hasReadReplicaDBInstanceIdentifiers()
&& Objects.equals(readReplicaDBInstanceIdentifiers(), other.readReplicaDBInstanceIdentifiers())
&& hasReadReplicaDBClusterIdentifiers() == other.hasReadReplicaDBClusterIdentifiers()
&& Objects.equals(readReplicaDBClusterIdentifiers(), other.readReplicaDBClusterIdentifiers())
&& Objects.equals(licenseModel(), other.licenseModel()) && Objects.equals(iops(), other.iops())
&& hasOptionGroupMemberships() == other.hasOptionGroupMemberships()
&& Objects.equals(optionGroupMemberships(), other.optionGroupMemberships())
&& Objects.equals(characterSetName(), other.characterSetName())
&& Objects.equals(secondaryAvailabilityZone(), other.secondaryAvailabilityZone())
&& Objects.equals(publiclyAccessible(), other.publiclyAccessible()) && hasStatusInfos() == other.hasStatusInfos()
&& Objects.equals(statusInfos(), other.statusInfos()) && Objects.equals(storageType(), other.storageType())
&& Objects.equals(tdeCredentialArn(), other.tdeCredentialArn())
&& Objects.equals(dbInstancePort(), other.dbInstancePort())
&& Objects.equals(dbClusterIdentifier(), other.dbClusterIdentifier())
&& Objects.equals(storageEncrypted(), other.storageEncrypted()) && Objects.equals(kmsKeyId(), other.kmsKeyId())
&& Objects.equals(dbiResourceId(), other.dbiResourceId())
&& Objects.equals(caCertificateIdentifier(), other.caCertificateIdentifier())
&& hasDomainMemberships() == other.hasDomainMemberships()
&& Objects.equals(domainMemberships(), other.domainMemberships())
&& Objects.equals(copyTagsToSnapshot(), other.copyTagsToSnapshot())
&& Objects.equals(monitoringInterval(), other.monitoringInterval())
&& Objects.equals(enhancedMonitoringResourceArn(), other.enhancedMonitoringResourceArn())
&& Objects.equals(monitoringRoleArn(), other.monitoringRoleArn())
&& Objects.equals(promotionTier(), other.promotionTier())
&& Objects.equals(dbInstanceArn(), other.dbInstanceArn()) && Objects.equals(timezone(), other.timezone())
&& Objects.equals(iamDatabaseAuthenticationEnabled(), other.iamDatabaseAuthenticationEnabled())
&& Objects.equals(performanceInsightsEnabled(), other.performanceInsightsEnabled())
&& Objects.equals(performanceInsightsKMSKeyId(), other.performanceInsightsKMSKeyId())
&& hasEnabledCloudwatchLogsExports() == other.hasEnabledCloudwatchLogsExports()
&& Objects.equals(enabledCloudwatchLogsExports(), other.enabledCloudwatchLogsExports())
&& Objects.equals(deletionProtection(), other.deletionProtection());
}
/**
* 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("DBInstance")
.add("DBInstanceIdentifier", dbInstanceIdentifier())
.add("DBInstanceClass", dbInstanceClass())
.add("Engine", engine())
.add("DBInstanceStatus", dbInstanceStatus())
.add("MasterUsername", masterUsername())
.add("DBName", dbName())
.add("Endpoint", endpoint())
.add("AllocatedStorage", allocatedStorage())
.add("InstanceCreateTime", instanceCreateTime())
.add("PreferredBackupWindow", preferredBackupWindow())
.add("BackupRetentionPeriod", backupRetentionPeriod())
.add("DBSecurityGroups", hasDbSecurityGroups() ? dbSecurityGroups() : null)
.add("VpcSecurityGroups", hasVpcSecurityGroups() ? vpcSecurityGroups() : null)
.add("DBParameterGroups", hasDbParameterGroups() ? dbParameterGroups() : null)
.add("AvailabilityZone", availabilityZone())
.add("DBSubnetGroup", dbSubnetGroup())
.add("PreferredMaintenanceWindow", preferredMaintenanceWindow())
.add("PendingModifiedValues", pendingModifiedValues())
.add("LatestRestorableTime", latestRestorableTime())
.add("MultiAZ", multiAZ())
.add("EngineVersion", engineVersion())
.add("AutoMinorVersionUpgrade", autoMinorVersionUpgrade())
.add("ReadReplicaSourceDBInstanceIdentifier", readReplicaSourceDBInstanceIdentifier())
.add("ReadReplicaDBInstanceIdentifiers",
hasReadReplicaDBInstanceIdentifiers() ? readReplicaDBInstanceIdentifiers() : null)
.add("ReadReplicaDBClusterIdentifiers",
hasReadReplicaDBClusterIdentifiers() ? readReplicaDBClusterIdentifiers() : null)
.add("LicenseModel", licenseModel()).add("Iops", iops())
.add("OptionGroupMemberships", hasOptionGroupMemberships() ? optionGroupMemberships() : null)
.add("CharacterSetName", characterSetName()).add("SecondaryAvailabilityZone", secondaryAvailabilityZone())
.add("PubliclyAccessible", publiclyAccessible()).add("StatusInfos", hasStatusInfos() ? statusInfos() : null)
.add("StorageType", storageType()).add("TdeCredentialArn", tdeCredentialArn())
.add("DbInstancePort", dbInstancePort()).add("DBClusterIdentifier", dbClusterIdentifier())
.add("StorageEncrypted", storageEncrypted()).add("KmsKeyId", kmsKeyId()).add("DbiResourceId", dbiResourceId())
.add("CACertificateIdentifier", caCertificateIdentifier())
.add("DomainMemberships", hasDomainMemberships() ? domainMemberships() : null)
.add("CopyTagsToSnapshot", copyTagsToSnapshot()).add("MonitoringInterval", monitoringInterval())
.add("EnhancedMonitoringResourceArn", enhancedMonitoringResourceArn())
.add("MonitoringRoleArn", monitoringRoleArn()).add("PromotionTier", promotionTier())
.add("DBInstanceArn", dbInstanceArn()).add("Timezone", timezone())
.add("IAMDatabaseAuthenticationEnabled", iamDatabaseAuthenticationEnabled())
.add("PerformanceInsightsEnabled", performanceInsightsEnabled())
.add("PerformanceInsightsKMSKeyId", performanceInsightsKMSKeyId())
.add("EnabledCloudwatchLogsExports", hasEnabledCloudwatchLogsExports() ? enabledCloudwatchLogsExports() : null)
.add("DeletionProtection", deletionProtection()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "DBInstanceIdentifier":
return Optional.ofNullable(clazz.cast(dbInstanceIdentifier()));
case "DBInstanceClass":
return Optional.ofNullable(clazz.cast(dbInstanceClass()));
case "Engine":
return Optional.ofNullable(clazz.cast(engine()));
case "DBInstanceStatus":
return Optional.ofNullable(clazz.cast(dbInstanceStatus()));
case "MasterUsername":
return Optional.ofNullable(clazz.cast(masterUsername()));
case "DBName":
return Optional.ofNullable(clazz.cast(dbName()));
case "Endpoint":
return Optional.ofNullable(clazz.cast(endpoint()));
case "AllocatedStorage":
return Optional.ofNullable(clazz.cast(allocatedStorage()));
case "InstanceCreateTime":
return Optional.ofNullable(clazz.cast(instanceCreateTime()));
case "PreferredBackupWindow":
return Optional.ofNullable(clazz.cast(preferredBackupWindow()));
case "BackupRetentionPeriod":
return Optional.ofNullable(clazz.cast(backupRetentionPeriod()));
case "DBSecurityGroups":
return Optional.ofNullable(clazz.cast(dbSecurityGroups()));
case "VpcSecurityGroups":
return Optional.ofNullable(clazz.cast(vpcSecurityGroups()));
case "DBParameterGroups":
return Optional.ofNullable(clazz.cast(dbParameterGroups()));
case "AvailabilityZone":
return Optional.ofNullable(clazz.cast(availabilityZone()));
case "DBSubnetGroup":
return Optional.ofNullable(clazz.cast(dbSubnetGroup()));
case "PreferredMaintenanceWindow":
return Optional.ofNullable(clazz.cast(preferredMaintenanceWindow()));
case "PendingModifiedValues":
return Optional.ofNullable(clazz.cast(pendingModifiedValues()));
case "LatestRestorableTime":
return Optional.ofNullable(clazz.cast(latestRestorableTime()));
case "MultiAZ":
return Optional.ofNullable(clazz.cast(multiAZ()));
case "EngineVersion":
return Optional.ofNullable(clazz.cast(engineVersion()));
case "AutoMinorVersionUpgrade":
return Optional.ofNullable(clazz.cast(autoMinorVersionUpgrade()));
case "ReadReplicaSourceDBInstanceIdentifier":
return Optional.ofNullable(clazz.cast(readReplicaSourceDBInstanceIdentifier()));
case "ReadReplicaDBInstanceIdentifiers":
return Optional.ofNullable(clazz.cast(readReplicaDBInstanceIdentifiers()));
case "ReadReplicaDBClusterIdentifiers":
return Optional.ofNullable(clazz.cast(readReplicaDBClusterIdentifiers()));
case "LicenseModel":
return Optional.ofNullable(clazz.cast(licenseModel()));
case "Iops":
return Optional.ofNullable(clazz.cast(iops()));
case "OptionGroupMemberships":
return Optional.ofNullable(clazz.cast(optionGroupMemberships()));
case "CharacterSetName":
return Optional.ofNullable(clazz.cast(characterSetName()));
case "SecondaryAvailabilityZone":
return Optional.ofNullable(clazz.cast(secondaryAvailabilityZone()));
case "PubliclyAccessible":
return Optional.ofNullable(clazz.cast(publiclyAccessible()));
case "StatusInfos":
return Optional.ofNullable(clazz.cast(statusInfos()));
case "StorageType":
return Optional.ofNullable(clazz.cast(storageType()));
case "TdeCredentialArn":
return Optional.ofNullable(clazz.cast(tdeCredentialArn()));
case "DbInstancePort":
return Optional.ofNullable(clazz.cast(dbInstancePort()));
case "DBClusterIdentifier":
return Optional.ofNullable(clazz.cast(dbClusterIdentifier()));
case "StorageEncrypted":
return Optional.ofNullable(clazz.cast(storageEncrypted()));
case "KmsKeyId":
return Optional.ofNullable(clazz.cast(kmsKeyId()));
case "DbiResourceId":
return Optional.ofNullable(clazz.cast(dbiResourceId()));
case "CACertificateIdentifier":
return Optional.ofNullable(clazz.cast(caCertificateIdentifier()));
case "DomainMemberships":
return Optional.ofNullable(clazz.cast(domainMemberships()));
case "CopyTagsToSnapshot":
return Optional.ofNullable(clazz.cast(copyTagsToSnapshot()));
case "MonitoringInterval":
return Optional.ofNullable(clazz.cast(monitoringInterval()));
case "EnhancedMonitoringResourceArn":
return Optional.ofNullable(clazz.cast(enhancedMonitoringResourceArn()));
case "MonitoringRoleArn":
return Optional.ofNullable(clazz.cast(monitoringRoleArn()));
case "PromotionTier":
return Optional.ofNullable(clazz.cast(promotionTier()));
case "DBInstanceArn":
return Optional.ofNullable(clazz.cast(dbInstanceArn()));
case "Timezone":
return Optional.ofNullable(clazz.cast(timezone()));
case "IAMDatabaseAuthenticationEnabled":
return Optional.ofNullable(clazz.cast(iamDatabaseAuthenticationEnabled()));
case "PerformanceInsightsEnabled":
return Optional.ofNullable(clazz.cast(performanceInsightsEnabled()));
case "PerformanceInsightsKMSKeyId":
return Optional.ofNullable(clazz.cast(performanceInsightsKMSKeyId()));
case "EnabledCloudwatchLogsExports":
return Optional.ofNullable(clazz.cast(enabledCloudwatchLogsExports()));
case "DeletionProtection":
return Optional.ofNullable(clazz.cast(deletionProtection()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function