All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.rds.model.PendingModifiedValues Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon RDS module holds the client classes that are used for communicating with Amazon Relational Database Service

There is a newer version: 2.29.15
Show newest version
/*
 * 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;

/**
 * 

* This data type is used as a response element in the ModifyDBInstance operation and contains changes that * will be applied during the next maintenance window. *

*/ @Generated("software.amazon.awssdk:codegen") public final class PendingModifiedValues implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField DB_INSTANCE_CLASS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("DBInstanceClass").getter(getter(PendingModifiedValues::dbInstanceClass)) .setter(setter(Builder::dbInstanceClass)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBInstanceClass").build()).build(); private static final SdkField ALLOCATED_STORAGE_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("AllocatedStorage").getter(getter(PendingModifiedValues::allocatedStorage)) .setter(setter(Builder::allocatedStorage)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AllocatedStorage").build()).build(); private static final SdkField MASTER_USER_PASSWORD_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("MasterUserPassword").getter(getter(PendingModifiedValues::masterUserPassword)) .setter(setter(Builder::masterUserPassword)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MasterUserPassword").build()) .build(); private static final SdkField PORT_FIELD = SdkField. builder(MarshallingType.INTEGER).memberName("Port") .getter(getter(PendingModifiedValues::port)).setter(setter(Builder::port)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Port").build()).build(); private static final SdkField BACKUP_RETENTION_PERIOD_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("BackupRetentionPeriod").getter(getter(PendingModifiedValues::backupRetentionPeriod)) .setter(setter(Builder::backupRetentionPeriod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BackupRetentionPeriod").build()) .build(); private static final SdkField MULTI_AZ_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("MultiAZ").getter(getter(PendingModifiedValues::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(PendingModifiedValues::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(PendingModifiedValues::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(PendingModifiedValues::iops)).setter(setter(Builder::iops)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Iops").build()).build(); private static final SdkField DB_INSTANCE_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("DBInstanceIdentifier").getter(getter(PendingModifiedValues::dbInstanceIdentifier)) .setter(setter(Builder::dbInstanceIdentifier)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBInstanceIdentifier").build()) .build(); private static final SdkField STORAGE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StorageType").getter(getter(PendingModifiedValues::storageType)).setter(setter(Builder::storageType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StorageType").build()).build(); private static final SdkField CA_CERTIFICATE_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CACertificateIdentifier").getter(getter(PendingModifiedValues::caCertificateIdentifier)) .setter(setter(Builder::caCertificateIdentifier)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CACertificateIdentifier").build()) .build(); private static final SdkField DB_SUBNET_GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("DBSubnetGroupName").getter(getter(PendingModifiedValues::dbSubnetGroupName)) .setter(setter(Builder::dbSubnetGroupName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DBSubnetGroupName").build()).build(); private static final SdkField PENDING_CLOUDWATCH_LOGS_EXPORTS_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("PendingCloudwatchLogsExports") .getter(getter(PendingModifiedValues::pendingCloudwatchLogsExports)) .setter(setter(Builder::pendingCloudwatchLogsExports)) .constructor(PendingCloudwatchLogsExports::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PendingCloudwatchLogsExports") .build()).build(); private static final SdkField> PROCESSOR_FEATURES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ProcessorFeatures") .getter(getter(PendingModifiedValues::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 IAM_DATABASE_AUTHENTICATION_ENABLED_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("IAMDatabaseAuthenticationEnabled") .getter(getter(PendingModifiedValues::iamDatabaseAuthenticationEnabled)) .setter(setter(Builder::iamDatabaseAuthenticationEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IAMDatabaseAuthenticationEnabled") .build()).build(); private static final SdkField AUTOMATION_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AutomationMode").getter(getter(PendingModifiedValues::automationModeAsString)) .setter(setter(Builder::automationMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutomationMode").build()).build(); private static final SdkField RESUME_FULL_AUTOMATION_MODE_TIME_FIELD = SdkField . builder(MarshallingType.INSTANT) .memberName("ResumeFullAutomationModeTime") .getter(getter(PendingModifiedValues::resumeFullAutomationModeTime)) .setter(setter(Builder::resumeFullAutomationModeTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResumeFullAutomationModeTime") .build()).build(); private static final SdkField STORAGE_THROUGHPUT_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("StorageThroughput").getter(getter(PendingModifiedValues::storageThroughput)) .setter(setter(Builder::storageThroughput)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StorageThroughput").build()).build(); private static final SdkField ENGINE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Engine") .getter(getter(PendingModifiedValues::engine)).setter(setter(Builder::engine)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Engine").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DB_INSTANCE_CLASS_FIELD, ALLOCATED_STORAGE_FIELD, MASTER_USER_PASSWORD_FIELD, PORT_FIELD, BACKUP_RETENTION_PERIOD_FIELD, MULTI_AZ_FIELD, ENGINE_VERSION_FIELD, LICENSE_MODEL_FIELD, IOPS_FIELD, DB_INSTANCE_IDENTIFIER_FIELD, STORAGE_TYPE_FIELD, CA_CERTIFICATE_IDENTIFIER_FIELD, DB_SUBNET_GROUP_NAME_FIELD, PENDING_CLOUDWATCH_LOGS_EXPORTS_FIELD, PROCESSOR_FEATURES_FIELD, IAM_DATABASE_AUTHENTICATION_ENABLED_FIELD, AUTOMATION_MODE_FIELD, RESUME_FULL_AUTOMATION_MODE_TIME_FIELD, STORAGE_THROUGHPUT_FIELD, ENGINE_FIELD)); private static final long serialVersionUID = 1L; private final String dbInstanceClass; private final Integer allocatedStorage; private final String masterUserPassword; private final Integer port; private final Integer backupRetentionPeriod; private final Boolean multiAZ; private final String engineVersion; private final String licenseModel; private final Integer iops; private final String dbInstanceIdentifier; private final String storageType; private final String caCertificateIdentifier; private final String dbSubnetGroupName; private final PendingCloudwatchLogsExports pendingCloudwatchLogsExports; private final List processorFeatures; private final Boolean iamDatabaseAuthenticationEnabled; private final String automationMode; private final Instant resumeFullAutomationModeTime; private final Integer storageThroughput; private final String engine; private PendingModifiedValues(BuilderImpl builder) { this.dbInstanceClass = builder.dbInstanceClass; this.allocatedStorage = builder.allocatedStorage; this.masterUserPassword = builder.masterUserPassword; this.port = builder.port; this.backupRetentionPeriod = builder.backupRetentionPeriod; this.multiAZ = builder.multiAZ; this.engineVersion = builder.engineVersion; this.licenseModel = builder.licenseModel; this.iops = builder.iops; this.dbInstanceIdentifier = builder.dbInstanceIdentifier; this.storageType = builder.storageType; this.caCertificateIdentifier = builder.caCertificateIdentifier; this.dbSubnetGroupName = builder.dbSubnetGroupName; this.pendingCloudwatchLogsExports = builder.pendingCloudwatchLogsExports; this.processorFeatures = builder.processorFeatures; this.iamDatabaseAuthenticationEnabled = builder.iamDatabaseAuthenticationEnabled; this.automationMode = builder.automationMode; this.resumeFullAutomationModeTime = builder.resumeFullAutomationModeTime; this.storageThroughput = builder.storageThroughput; this.engine = builder.engine; } /** *

* The name of the compute and memory capacity class for the DB instance. *

* * @return The name of the compute and memory capacity class for the DB instance. */ public final String dbInstanceClass() { return dbInstanceClass; } /** *

* The allocated storage size for the DB instance specified in gibibytes (GiB). *

* * @return The allocated storage size for the DB instance specified in gibibytes (GiB). */ public final Integer allocatedStorage() { return allocatedStorage; } /** *

* The master credentials for the DB instance. *

* * @return The master credentials for the DB instance. */ public final String masterUserPassword() { return masterUserPassword; } /** *

* The port for the DB instance. *

* * @return The port for the DB instance. */ public final Integer port() { return port; } /** *

* The number of days for which automated backups are retained. *

* * @return The number of days for which automated backups are retained. */ public final Integer backupRetentionPeriod() { return backupRetentionPeriod; } /** *

* A value that indicates that the Single-AZ DB instance will change to a Multi-AZ deployment. *

* * @return A value that indicates that the Single-AZ DB instance will change to a Multi-AZ deployment. */ public final Boolean multiAZ() { return multiAZ; } /** *

* The database engine version. *

* * @return The database engine version. */ public final String engineVersion() { return engineVersion; } /** *

* The license model for the DB instance. *

*

* Valid values: license-included | bring-your-own-license | * general-public-license *

* * @return The license model for the DB instance.

*

* Valid values: license-included | bring-your-own-license | * general-public-license */ public final String licenseModel() { return licenseModel; } /** *

* The Provisioned IOPS value for the DB instance. *

* * @return The Provisioned IOPS value for the DB instance. */ public final Integer iops() { return iops; } /** *

* The database identifier for the DB instance. *

* * @return The database identifier for the DB instance. */ public final String dbInstanceIdentifier() { return dbInstanceIdentifier; } /** *

* The storage type of the DB instance. *

* * @return The storage type of the DB instance. */ public final String storageType() { return storageType; } /** *

* The identifier of the CA certificate for the DB instance. *

*

* For more information, see Using SSL/TLS to encrypt a * connection to a DB instance in the Amazon RDS User Guide and Using SSL/TLS to * encrypt a connection to a DB cluster in the Amazon Aurora User Guide. *

* * @return The identifier of the CA certificate for the DB instance.

*

* For more information, see Using SSL/TLS to * encrypt a connection to a DB instance in the Amazon RDS User Guide and Using SSL/TLS * to encrypt a connection to a DB cluster in the Amazon Aurora User Guide. */ public final String caCertificateIdentifier() { return caCertificateIdentifier; } /** *

* The DB subnet group for the DB instance. *

* * @return The DB subnet group for the DB instance. */ public final String dbSubnetGroupName() { return dbSubnetGroupName; } /** * Returns the value of the PendingCloudwatchLogsExports property for this object. * * @return The value of the PendingCloudwatchLogsExports property for this object. */ public final PendingCloudwatchLogsExports pendingCloudwatchLogsExports() { return pendingCloudwatchLogsExports; } /** * 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. *

*

* 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. */ public final List processorFeatures() { return processorFeatures; } /** *

* Whether mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is * enabled. *

* * @return Whether mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts * is enabled. */ public final Boolean iamDatabaseAuthenticationEnabled() { return iamDatabaseAuthenticationEnabled; } /** *

* The automation mode of the RDS Custom DB instance: full or all-paused. If * full, the DB instance automates monitoring and instance recovery. If all-paused, the * instance pauses automation for the duration set by --resume-full-automation-mode-minutes. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #automationMode} * will return {@link AutomationMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #automationModeAsString}. *

* * @return The automation mode of the RDS Custom DB instance: full or all-paused. If * full, the DB instance automates monitoring and instance recovery. If all-paused * , the instance pauses automation for the duration set by * --resume-full-automation-mode-minutes. * @see AutomationMode */ public final AutomationMode automationMode() { return AutomationMode.fromValue(automationMode); } /** *

* The automation mode of the RDS Custom DB instance: full or all-paused. If * full, the DB instance automates monitoring and instance recovery. If all-paused, the * instance pauses automation for the duration set by --resume-full-automation-mode-minutes. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #automationMode} * will return {@link AutomationMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #automationModeAsString}. *

* * @return The automation mode of the RDS Custom DB instance: full or all-paused. If * full, the DB instance automates monitoring and instance recovery. If all-paused * , the instance pauses automation for the duration set by * --resume-full-automation-mode-minutes. * @see AutomationMode */ public final String automationModeAsString() { return automationMode; } /** *

* The number of minutes to pause the automation. When the time period ends, RDS Custom resumes full automation. The * minimum value is 60 (default). The maximum value is 1,440. *

* * @return The number of minutes to pause the automation. When the time period ends, RDS Custom resumes full * automation. The minimum value is 60 (default). The maximum value is 1,440. */ public final Instant resumeFullAutomationModeTime() { return resumeFullAutomationModeTime; } /** *

* The storage throughput of the DB instance. *

* * @return The storage throughput of the DB instance. */ public final Integer storageThroughput() { return storageThroughput; } /** *

* The database engine of the DB instance. *

* * @return The database engine of the DB instance. */ public final String engine() { return engine; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(dbInstanceClass()); hashCode = 31 * hashCode + Objects.hashCode(allocatedStorage()); hashCode = 31 * hashCode + Objects.hashCode(masterUserPassword()); hashCode = 31 * hashCode + Objects.hashCode(port()); hashCode = 31 * hashCode + Objects.hashCode(backupRetentionPeriod()); hashCode = 31 * hashCode + Objects.hashCode(multiAZ()); hashCode = 31 * hashCode + Objects.hashCode(engineVersion()); hashCode = 31 * hashCode + Objects.hashCode(licenseModel()); hashCode = 31 * hashCode + Objects.hashCode(iops()); hashCode = 31 * hashCode + Objects.hashCode(dbInstanceIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(storageType()); hashCode = 31 * hashCode + Objects.hashCode(caCertificateIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(dbSubnetGroupName()); hashCode = 31 * hashCode + Objects.hashCode(pendingCloudwatchLogsExports()); hashCode = 31 * hashCode + Objects.hashCode(hasProcessorFeatures() ? processorFeatures() : null); hashCode = 31 * hashCode + Objects.hashCode(iamDatabaseAuthenticationEnabled()); hashCode = 31 * hashCode + Objects.hashCode(automationModeAsString()); hashCode = 31 * hashCode + Objects.hashCode(resumeFullAutomationModeTime()); hashCode = 31 * hashCode + Objects.hashCode(storageThroughput()); hashCode = 31 * hashCode + Objects.hashCode(engine()); 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 PendingModifiedValues)) { return false; } PendingModifiedValues other = (PendingModifiedValues) obj; return Objects.equals(dbInstanceClass(), other.dbInstanceClass()) && Objects.equals(allocatedStorage(), other.allocatedStorage()) && Objects.equals(masterUserPassword(), other.masterUserPassword()) && Objects.equals(port(), other.port()) && Objects.equals(backupRetentionPeriod(), other.backupRetentionPeriod()) && Objects.equals(multiAZ(), other.multiAZ()) && Objects.equals(engineVersion(), other.engineVersion()) && Objects.equals(licenseModel(), other.licenseModel()) && Objects.equals(iops(), other.iops()) && Objects.equals(dbInstanceIdentifier(), other.dbInstanceIdentifier()) && Objects.equals(storageType(), other.storageType()) && Objects.equals(caCertificateIdentifier(), other.caCertificateIdentifier()) && Objects.equals(dbSubnetGroupName(), other.dbSubnetGroupName()) && Objects.equals(pendingCloudwatchLogsExports(), other.pendingCloudwatchLogsExports()) && hasProcessorFeatures() == other.hasProcessorFeatures() && Objects.equals(processorFeatures(), other.processorFeatures()) && Objects.equals(iamDatabaseAuthenticationEnabled(), other.iamDatabaseAuthenticationEnabled()) && Objects.equals(automationModeAsString(), other.automationModeAsString()) && Objects.equals(resumeFullAutomationModeTime(), other.resumeFullAutomationModeTime()) && Objects.equals(storageThroughput(), other.storageThroughput()) && Objects.equals(engine(), other.engine()); } /** * 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("PendingModifiedValues").add("DBInstanceClass", dbInstanceClass()) .add("AllocatedStorage", allocatedStorage()).add("MasterUserPassword", masterUserPassword()).add("Port", port()) .add("BackupRetentionPeriod", backupRetentionPeriod()).add("MultiAZ", multiAZ()) .add("EngineVersion", engineVersion()).add("LicenseModel", licenseModel()).add("Iops", iops()) .add("DBInstanceIdentifier", dbInstanceIdentifier()).add("StorageType", storageType()) .add("CACertificateIdentifier", caCertificateIdentifier()).add("DBSubnetGroupName", dbSubnetGroupName()) .add("PendingCloudwatchLogsExports", pendingCloudwatchLogsExports()) .add("ProcessorFeatures", hasProcessorFeatures() ? processorFeatures() : null) .add("IAMDatabaseAuthenticationEnabled", iamDatabaseAuthenticationEnabled()) .add("AutomationMode", automationModeAsString()) .add("ResumeFullAutomationModeTime", resumeFullAutomationModeTime()) .add("StorageThroughput", storageThroughput()).add("Engine", engine()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "DBInstanceClass": return Optional.ofNullable(clazz.cast(dbInstanceClass())); case "AllocatedStorage": return Optional.ofNullable(clazz.cast(allocatedStorage())); case "MasterUserPassword": return Optional.ofNullable(clazz.cast(masterUserPassword())); case "Port": return Optional.ofNullable(clazz.cast(port())); case "BackupRetentionPeriod": return Optional.ofNullable(clazz.cast(backupRetentionPeriod())); case "MultiAZ": return Optional.ofNullable(clazz.cast(multiAZ())); case "EngineVersion": return Optional.ofNullable(clazz.cast(engineVersion())); case "LicenseModel": return Optional.ofNullable(clazz.cast(licenseModel())); case "Iops": return Optional.ofNullable(clazz.cast(iops())); case "DBInstanceIdentifier": return Optional.ofNullable(clazz.cast(dbInstanceIdentifier())); case "StorageType": return Optional.ofNullable(clazz.cast(storageType())); case "CACertificateIdentifier": return Optional.ofNullable(clazz.cast(caCertificateIdentifier())); case "DBSubnetGroupName": return Optional.ofNullable(clazz.cast(dbSubnetGroupName())); case "PendingCloudwatchLogsExports": return Optional.ofNullable(clazz.cast(pendingCloudwatchLogsExports())); case "ProcessorFeatures": return Optional.ofNullable(clazz.cast(processorFeatures())); case "IAMDatabaseAuthenticationEnabled": return Optional.ofNullable(clazz.cast(iamDatabaseAuthenticationEnabled())); case "AutomationMode": return Optional.ofNullable(clazz.cast(automationModeAsString())); case "ResumeFullAutomationModeTime": return Optional.ofNullable(clazz.cast(resumeFullAutomationModeTime())); case "StorageThroughput": return Optional.ofNullable(clazz.cast(storageThroughput())); case "Engine": return Optional.ofNullable(clazz.cast(engine())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((PendingModifiedValues) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The name of the compute and memory capacity class for the DB instance. *

* * @param dbInstanceClass * The name of the compute and memory capacity class for the DB instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dbInstanceClass(String dbInstanceClass); /** *

* The allocated storage size for the DB instance specified in gibibytes (GiB). *

* * @param allocatedStorage * The allocated storage size for the DB instance specified in gibibytes (GiB). * @return Returns a reference to this object so that method calls can be chained together. */ Builder allocatedStorage(Integer allocatedStorage); /** *

* The master credentials for the DB instance. *

* * @param masterUserPassword * The master credentials for the DB instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder masterUserPassword(String masterUserPassword); /** *

* The port for the DB instance. *

* * @param port * The port for the DB instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder port(Integer port); /** *

* The number of days for which automated backups are retained. *

* * @param backupRetentionPeriod * The number of days for which automated backups are retained. * @return Returns a reference to this object so that method calls can be chained together. */ Builder backupRetentionPeriod(Integer backupRetentionPeriod); /** *

* A value that indicates that the Single-AZ DB instance will change to a Multi-AZ deployment. *

* * @param multiAZ * A value that indicates that the Single-AZ DB instance will change to a Multi-AZ deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder multiAZ(Boolean multiAZ); /** *

* The database engine version. *

* * @param engineVersion * The database engine version. * @return Returns a reference to this object so that method calls can be chained together. */ Builder engineVersion(String engineVersion); /** *

* The license model for the DB instance. *

*

* Valid values: license-included | bring-your-own-license | * general-public-license *

* * @param licenseModel * The license model for the DB instance.

*

* Valid values: license-included | bring-your-own-license | * general-public-license * @return Returns a reference to this object so that method calls can be chained together. */ Builder licenseModel(String licenseModel); /** *

* The Provisioned IOPS value for the DB instance. *

* * @param iops * The Provisioned IOPS value for the DB instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder iops(Integer iops); /** *

* The database identifier for the DB instance. *

* * @param dbInstanceIdentifier * The database identifier for the DB instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dbInstanceIdentifier(String dbInstanceIdentifier); /** *

* The storage type of the DB instance. *

* * @param storageType * The storage type of the DB instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder storageType(String storageType); /** *

* The identifier of the CA certificate for the DB instance. *

*

* For more information, see Using SSL/TLS to encrypt * a connection to a DB instance in the Amazon RDS User Guide and Using SSL/TLS to * encrypt a connection to a DB cluster in the Amazon Aurora User Guide. *

* * @param caCertificateIdentifier * The identifier of the CA certificate for the DB instance.

*

* For more information, see Using SSL/TLS to * encrypt a connection to a DB instance in the Amazon RDS User Guide and Using * SSL/TLS to encrypt a connection to a DB cluster in the Amazon Aurora User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder caCertificateIdentifier(String caCertificateIdentifier); /** *

* The DB subnet group for the DB instance. *

* * @param dbSubnetGroupName * The DB subnet group for the DB instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dbSubnetGroupName(String dbSubnetGroupName); /** * Sets the value of the PendingCloudwatchLogsExports property for this object. * * @param pendingCloudwatchLogsExports * The new value for the PendingCloudwatchLogsExports property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder pendingCloudwatchLogsExports(PendingCloudwatchLogsExports pendingCloudwatchLogsExports); /** * Sets the value of the PendingCloudwatchLogsExports property for this object. * * This is a convenience method that creates an instance of the {@link PendingCloudwatchLogsExports.Builder} * avoiding the need to create one manually via {@link PendingCloudwatchLogsExports#builder()}. * *

* When the {@link Consumer} completes, {@link PendingCloudwatchLogsExports.Builder#build()} is called * immediately and its result is passed to {@link #pendingCloudwatchLogsExports(PendingCloudwatchLogsExports)}. * * @param pendingCloudwatchLogsExports * a consumer that will call methods on {@link PendingCloudwatchLogsExports.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #pendingCloudwatchLogsExports(PendingCloudwatchLogsExports) */ default Builder pendingCloudwatchLogsExports(Consumer pendingCloudwatchLogsExports) { return pendingCloudwatchLogsExports(PendingCloudwatchLogsExports.builder() .applyMutation(pendingCloudwatchLogsExports).build()); } /** *

* The number of CPU cores and the number of threads per core for the DB instance class of the DB instance. *

* * @param processorFeatures * The number of CPU cores and the number of threads per core for the DB instance class of the DB * instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processorFeatures(Collection processorFeatures); /** *

* The number of CPU cores and the number of threads per core for the DB instance class of the DB instance. *

* * @param processorFeatures * The number of CPU cores and the number of threads per core for the DB instance class of the DB * instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processorFeatures(ProcessorFeature... processorFeatures); /** *

* The number of CPU cores and the number of threads per core for the DB instance class of the DB instance. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.rds.model.ProcessorFeature.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.rds.model.ProcessorFeature#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.rds.model.ProcessorFeature.Builder#build()} is called immediately and * its result is passed to {@link #processorFeatures(List)}. * * @param processorFeatures * a consumer that will call methods on * {@link software.amazon.awssdk.services.rds.model.ProcessorFeature.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #processorFeatures(java.util.Collection) */ Builder processorFeatures(Consumer... processorFeatures); /** *

* Whether mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is * enabled. *

* * @param iamDatabaseAuthenticationEnabled * Whether mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database * accounts is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ Builder iamDatabaseAuthenticationEnabled(Boolean iamDatabaseAuthenticationEnabled); /** *

* The automation mode of the RDS Custom DB instance: full or all-paused. If * full, the DB instance automates monitoring and instance recovery. If all-paused, * the instance pauses automation for the duration set by --resume-full-automation-mode-minutes. *

* * @param automationMode * The automation mode of the RDS Custom DB instance: full or all-paused. If * full, the DB instance automates monitoring and instance recovery. If * all-paused, the instance pauses automation for the duration set by * --resume-full-automation-mode-minutes. * @see AutomationMode * @return Returns a reference to this object so that method calls can be chained together. * @see AutomationMode */ Builder automationMode(String automationMode); /** *

* The automation mode of the RDS Custom DB instance: full or all-paused. If * full, the DB instance automates monitoring and instance recovery. If all-paused, * the instance pauses automation for the duration set by --resume-full-automation-mode-minutes. *

* * @param automationMode * The automation mode of the RDS Custom DB instance: full or all-paused. If * full, the DB instance automates monitoring and instance recovery. If * all-paused, the instance pauses automation for the duration set by * --resume-full-automation-mode-minutes. * @see AutomationMode * @return Returns a reference to this object so that method calls can be chained together. * @see AutomationMode */ Builder automationMode(AutomationMode automationMode); /** *

* The number of minutes to pause the automation. When the time period ends, RDS Custom resumes full automation. * The minimum value is 60 (default). The maximum value is 1,440. *

* * @param resumeFullAutomationModeTime * The number of minutes to pause the automation. When the time period ends, RDS Custom resumes full * automation. The minimum value is 60 (default). The maximum value is 1,440. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resumeFullAutomationModeTime(Instant resumeFullAutomationModeTime); /** *

* The storage throughput of the DB instance. *

* * @param storageThroughput * The storage throughput of the DB instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder storageThroughput(Integer storageThroughput); /** *

* The database engine of the DB instance. *

* * @param engine * The database engine of the DB instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder engine(String engine); } static final class BuilderImpl implements Builder { private String dbInstanceClass; private Integer allocatedStorage; private String masterUserPassword; private Integer port; private Integer backupRetentionPeriod; private Boolean multiAZ; private String engineVersion; private String licenseModel; private Integer iops; private String dbInstanceIdentifier; private String storageType; private String caCertificateIdentifier; private String dbSubnetGroupName; private PendingCloudwatchLogsExports pendingCloudwatchLogsExports; private List processorFeatures = DefaultSdkAutoConstructList.getInstance(); private Boolean iamDatabaseAuthenticationEnabled; private String automationMode; private Instant resumeFullAutomationModeTime; private Integer storageThroughput; private String engine; private BuilderImpl() { } private BuilderImpl(PendingModifiedValues model) { dbInstanceClass(model.dbInstanceClass); allocatedStorage(model.allocatedStorage); masterUserPassword(model.masterUserPassword); port(model.port); backupRetentionPeriod(model.backupRetentionPeriod); multiAZ(model.multiAZ); engineVersion(model.engineVersion); licenseModel(model.licenseModel); iops(model.iops); dbInstanceIdentifier(model.dbInstanceIdentifier); storageType(model.storageType); caCertificateIdentifier(model.caCertificateIdentifier); dbSubnetGroupName(model.dbSubnetGroupName); pendingCloudwatchLogsExports(model.pendingCloudwatchLogsExports); processorFeatures(model.processorFeatures); iamDatabaseAuthenticationEnabled(model.iamDatabaseAuthenticationEnabled); automationMode(model.automationMode); resumeFullAutomationModeTime(model.resumeFullAutomationModeTime); storageThroughput(model.storageThroughput); engine(model.engine); } public final String getDbInstanceClass() { return dbInstanceClass; } public final void setDbInstanceClass(String dbInstanceClass) { this.dbInstanceClass = dbInstanceClass; } @Override public final Builder dbInstanceClass(String dbInstanceClass) { this.dbInstanceClass = dbInstanceClass; return this; } public final Integer getAllocatedStorage() { return allocatedStorage; } public final void setAllocatedStorage(Integer allocatedStorage) { this.allocatedStorage = allocatedStorage; } @Override public final Builder allocatedStorage(Integer allocatedStorage) { this.allocatedStorage = allocatedStorage; return this; } public final String getMasterUserPassword() { return masterUserPassword; } public final void setMasterUserPassword(String masterUserPassword) { this.masterUserPassword = masterUserPassword; } @Override public final Builder masterUserPassword(String masterUserPassword) { this.masterUserPassword = masterUserPassword; return this; } public final Integer getPort() { return port; } public final void setPort(Integer port) { this.port = port; } @Override public final Builder port(Integer port) { this.port = port; return this; } public final Integer getBackupRetentionPeriod() { return backupRetentionPeriod; } public final void setBackupRetentionPeriod(Integer backupRetentionPeriod) { this.backupRetentionPeriod = backupRetentionPeriod; } @Override public final Builder backupRetentionPeriod(Integer backupRetentionPeriod) { this.backupRetentionPeriod = backupRetentionPeriod; return this; } public final Boolean getMultiAZ() { return multiAZ; } public final void setMultiAZ(Boolean multiAZ) { this.multiAZ = multiAZ; } @Override public final Builder multiAZ(Boolean multiAZ) { this.multiAZ = multiAZ; return this; } public final String getEngineVersion() { return engineVersion; } public final void setEngineVersion(String engineVersion) { this.engineVersion = engineVersion; } @Override public final Builder engineVersion(String engineVersion) { this.engineVersion = engineVersion; return this; } public final String getLicenseModel() { return licenseModel; } public final void setLicenseModel(String licenseModel) { this.licenseModel = licenseModel; } @Override public final Builder licenseModel(String licenseModel) { this.licenseModel = licenseModel; return this; } public final Integer getIops() { return iops; } public final void setIops(Integer iops) { this.iops = iops; } @Override public final Builder iops(Integer iops) { this.iops = iops; return this; } public final String getDbInstanceIdentifier() { return dbInstanceIdentifier; } public final void setDbInstanceIdentifier(String dbInstanceIdentifier) { this.dbInstanceIdentifier = dbInstanceIdentifier; } @Override public final Builder dbInstanceIdentifier(String dbInstanceIdentifier) { this.dbInstanceIdentifier = dbInstanceIdentifier; return this; } public final String getStorageType() { return storageType; } public final void setStorageType(String storageType) { this.storageType = storageType; } @Override public final Builder storageType(String storageType) { this.storageType = storageType; return this; } public final String getCaCertificateIdentifier() { return caCertificateIdentifier; } public final void setCaCertificateIdentifier(String caCertificateIdentifier) { this.caCertificateIdentifier = caCertificateIdentifier; } @Override public final Builder caCertificateIdentifier(String caCertificateIdentifier) { this.caCertificateIdentifier = caCertificateIdentifier; return this; } public final String getDbSubnetGroupName() { return dbSubnetGroupName; } public final void setDbSubnetGroupName(String dbSubnetGroupName) { this.dbSubnetGroupName = dbSubnetGroupName; } @Override public final Builder dbSubnetGroupName(String dbSubnetGroupName) { this.dbSubnetGroupName = dbSubnetGroupName; return this; } public final PendingCloudwatchLogsExports.Builder getPendingCloudwatchLogsExports() { return pendingCloudwatchLogsExports != null ? pendingCloudwatchLogsExports.toBuilder() : null; } public final void setPendingCloudwatchLogsExports(PendingCloudwatchLogsExports.BuilderImpl pendingCloudwatchLogsExports) { this.pendingCloudwatchLogsExports = pendingCloudwatchLogsExports != null ? pendingCloudwatchLogsExports.build() : null; } @Override public final Builder pendingCloudwatchLogsExports(PendingCloudwatchLogsExports pendingCloudwatchLogsExports) { this.pendingCloudwatchLogsExports = pendingCloudwatchLogsExports; return this; } public final List getProcessorFeatures() { List result = ProcessorFeatureListCopier.copyToBuilder(this.processorFeatures); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setProcessorFeatures(Collection processorFeatures) { this.processorFeatures = ProcessorFeatureListCopier.copyFromBuilder(processorFeatures); } @Override public final Builder processorFeatures(Collection processorFeatures) { this.processorFeatures = ProcessorFeatureListCopier.copy(processorFeatures); return this; } @Override @SafeVarargs public final Builder processorFeatures(ProcessorFeature... processorFeatures) { processorFeatures(Arrays.asList(processorFeatures)); return this; } @Override @SafeVarargs public final Builder processorFeatures(Consumer... processorFeatures) { processorFeatures(Stream.of(processorFeatures).map(c -> ProcessorFeature.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final Boolean getIamDatabaseAuthenticationEnabled() { return iamDatabaseAuthenticationEnabled; } public final void setIamDatabaseAuthenticationEnabled(Boolean iamDatabaseAuthenticationEnabled) { this.iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabled; } @Override public final Builder iamDatabaseAuthenticationEnabled(Boolean iamDatabaseAuthenticationEnabled) { this.iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabled; return this; } public final String getAutomationMode() { return automationMode; } public final void setAutomationMode(String automationMode) { this.automationMode = automationMode; } @Override public final Builder automationMode(String automationMode) { this.automationMode = automationMode; return this; } @Override public final Builder automationMode(AutomationMode automationMode) { this.automationMode(automationMode == null ? null : automationMode.toString()); return this; } public final Instant getResumeFullAutomationModeTime() { return resumeFullAutomationModeTime; } public final void setResumeFullAutomationModeTime(Instant resumeFullAutomationModeTime) { this.resumeFullAutomationModeTime = resumeFullAutomationModeTime; } @Override public final Builder resumeFullAutomationModeTime(Instant resumeFullAutomationModeTime) { this.resumeFullAutomationModeTime = resumeFullAutomationModeTime; return this; } public final Integer getStorageThroughput() { return storageThroughput; } public final void setStorageThroughput(Integer storageThroughput) { this.storageThroughput = storageThroughput; } @Override public final Builder storageThroughput(Integer storageThroughput) { this.storageThroughput = storageThroughput; return this; } public final String getEngine() { return engine; } public final void setEngine(String engine) { this.engine = engine; } @Override public final Builder engine(String engine) { this.engine = engine; return this; } @Override public PendingModifiedValues build() { return new PendingModifiedValues(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy