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

software.amazon.awssdk.services.rds.model.StartDbInstanceAutomatedBackupsReplicationRequest 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.30.1
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.util.Arrays;
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 software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
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.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class StartDbInstanceAutomatedBackupsReplicationRequest extends RdsRequest
        implements
        ToCopyableBuilder {
    private static final SdkField SOURCE_DB_INSTANCE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("SourceDBInstanceArn")
            .getter(getter(StartDbInstanceAutomatedBackupsReplicationRequest::sourceDBInstanceArn))
            .setter(setter(Builder::sourceDBInstanceArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceDBInstanceArn").build())
            .build();

    private static final SdkField BACKUP_RETENTION_PERIOD_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("BackupRetentionPeriod")
            .getter(getter(StartDbInstanceAutomatedBackupsReplicationRequest::backupRetentionPeriod))
            .setter(setter(Builder::backupRetentionPeriod))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BackupRetentionPeriod").build())
            .build();

    private static final SdkField KMS_KEY_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("KmsKeyId").getter(getter(StartDbInstanceAutomatedBackupsReplicationRequest::kmsKeyId))
            .setter(setter(Builder::kmsKeyId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KmsKeyId").build()).build();

    private static final SdkField PRE_SIGNED_URL_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("PreSignedUrl").getter(getter(StartDbInstanceAutomatedBackupsReplicationRequest::preSignedUrl))
            .setter(setter(Builder::preSignedUrl))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PreSignedUrl").build()).build();

    private static final SdkField SOURCE_REGION_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("SourceRegion").getter(getter(StartDbInstanceAutomatedBackupsReplicationRequest::sourceRegion))
            .setter(setter(Builder::sourceRegion))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceRegion").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(SOURCE_DB_INSTANCE_ARN_FIELD,
            BACKUP_RETENTION_PERIOD_FIELD, KMS_KEY_ID_FIELD, PRE_SIGNED_URL_FIELD, SOURCE_REGION_FIELD));

    private final String sourceDBInstanceArn;

    private final Integer backupRetentionPeriod;

    private final String kmsKeyId;

    private final String preSignedUrl;

    private final String sourceRegion;

    private StartDbInstanceAutomatedBackupsReplicationRequest(BuilderImpl builder) {
        super(builder);
        this.sourceDBInstanceArn = builder.sourceDBInstanceArn;
        this.backupRetentionPeriod = builder.backupRetentionPeriod;
        this.kmsKeyId = builder.kmsKeyId;
        this.preSignedUrl = builder.preSignedUrl;
        this.sourceRegion = builder.sourceRegion;
    }

    /**
     * 

* The Amazon Resource Name (ARN) of the source DB instance for the replicated automated backups, for example, * arn:aws:rds:us-west-2:123456789012:db:mydatabase. *

* * @return The Amazon Resource Name (ARN) of the source DB instance for the replicated automated backups, for * example, arn:aws:rds:us-west-2:123456789012:db:mydatabase. */ public final String sourceDBInstanceArn() { return sourceDBInstanceArn; } /** *

* The retention period for the replicated automated backups. *

* * @return The retention period for the replicated automated backups. */ public final Integer backupRetentionPeriod() { return backupRetentionPeriod; } /** *

* The Amazon Web Services KMS key identifier for encryption of the replicated automated backups. The KMS key ID is * the Amazon Resource Name (ARN) for the KMS encryption key in the destination Amazon Web Services Region, for * example, arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE. *

* * @return The Amazon Web Services KMS key identifier for encryption of the replicated automated backups. The KMS * key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destination Amazon Web * Services Region, for example, arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE. */ public final String kmsKeyId() { return kmsKeyId; } /** *

* In an Amazon Web Services GovCloud (US) Region, an URL that contains a Signature Version 4 signed request for the * StartDBInstanceAutomatedBackupsReplication operation to call in the Amazon Web Services Region of * the source DB instance. The presigned URL must be a valid request for the * StartDBInstanceAutomatedBackupsReplication API operation that can run in the Amazon Web Services * Region that contains the source DB instance. *

*

* This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web Services * Regions. *

*

* To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: * Using Query Parameters (Amazon Web Services Signature Version 4) and Signature Version 4 Signing * Process. *

* *

* If you are using an Amazon Web Services SDK tool or the CLI, you can specify SourceRegion (or * --source-region for the CLI) instead of specifying PreSignedUrl manually. Specifying * SourceRegion autogenerates a presigned URL that is a valid request for the operation that can run in * the source Amazon Web Services Region. *

*
* * @return In an Amazon Web Services GovCloud (US) Region, an URL that contains a Signature Version 4 signed request * for the StartDBInstanceAutomatedBackupsReplication operation to call in the Amazon Web * Services Region of the source DB instance. The presigned URL must be a valid request for the * StartDBInstanceAutomatedBackupsReplication API operation that can run in the Amazon Web * Services Region that contains the source DB instance.

*

* This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web * Services Regions. *

*

* To learn how to generate a Signature Version 4 signed request, see Authenticating * Requests: Using Query Parameters (Amazon Web Services Signature Version 4) and Signature Version 4 * Signing Process. *

* *

* If you are using an Amazon Web Services SDK tool or the CLI, you can specify SourceRegion * (or --source-region for the CLI) instead of specifying PreSignedUrl manually. * Specifying SourceRegion autogenerates a presigned URL that is a valid request for the * operation that can run in the source Amazon Web Services Region. *

*/ public final String preSignedUrl() { return preSignedUrl; } /** * If PreSignedUrl is not specified, this is the region where the source snapshot is located. A PreSignedUrl will be * generated automatically by the SDK. * * @return If PreSignedUrl is not specified, this is the region where the source snapshot is located. A PreSignedUrl * will be generated automatically by the SDK. */ public final String sourceRegion() { return sourceRegion; } @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 + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(sourceDBInstanceArn()); hashCode = 31 * hashCode + Objects.hashCode(backupRetentionPeriod()); hashCode = 31 * hashCode + Objects.hashCode(kmsKeyId()); hashCode = 31 * hashCode + Objects.hashCode(preSignedUrl()); hashCode = 31 * hashCode + Objects.hashCode(sourceRegion()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof StartDbInstanceAutomatedBackupsReplicationRequest)) { return false; } StartDbInstanceAutomatedBackupsReplicationRequest other = (StartDbInstanceAutomatedBackupsReplicationRequest) obj; return Objects.equals(sourceDBInstanceArn(), other.sourceDBInstanceArn()) && Objects.equals(backupRetentionPeriod(), other.backupRetentionPeriod()) && Objects.equals(kmsKeyId(), other.kmsKeyId()) && Objects.equals(preSignedUrl(), other.preSignedUrl()) && Objects.equals(sourceRegion(), other.sourceRegion()); } /** * 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("StartDbInstanceAutomatedBackupsReplicationRequest") .add("SourceDBInstanceArn", sourceDBInstanceArn()).add("BackupRetentionPeriod", backupRetentionPeriod()) .add("KmsKeyId", kmsKeyId()).add("PreSignedUrl", preSignedUrl()).add("SourceRegion", sourceRegion()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "SourceDBInstanceArn": return Optional.ofNullable(clazz.cast(sourceDBInstanceArn())); case "BackupRetentionPeriod": return Optional.ofNullable(clazz.cast(backupRetentionPeriod())); case "KmsKeyId": return Optional.ofNullable(clazz.cast(kmsKeyId())); case "PreSignedUrl": return Optional.ofNullable(clazz.cast(preSignedUrl())); case "SourceRegion": return Optional.ofNullable(clazz.cast(sourceRegion())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((StartDbInstanceAutomatedBackupsReplicationRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends RdsRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The Amazon Resource Name (ARN) of the source DB instance for the replicated automated backups, for example, * arn:aws:rds:us-west-2:123456789012:db:mydatabase. *

* * @param sourceDBInstanceArn * The Amazon Resource Name (ARN) of the source DB instance for the replicated automated backups, for * example, arn:aws:rds:us-west-2:123456789012:db:mydatabase. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sourceDBInstanceArn(String sourceDBInstanceArn); /** *

* The retention period for the replicated automated backups. *

* * @param backupRetentionPeriod * The retention period for the replicated automated backups. * @return Returns a reference to this object so that method calls can be chained together. */ Builder backupRetentionPeriod(Integer backupRetentionPeriod); /** *

* The Amazon Web Services KMS key identifier for encryption of the replicated automated backups. The KMS key ID * is the Amazon Resource Name (ARN) for the KMS encryption key in the destination Amazon Web Services Region, * for example, arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE. *

* * @param kmsKeyId * The Amazon Web Services KMS key identifier for encryption of the replicated automated backups. The KMS * key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destination Amazon Web * Services Region, for example, arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE * . * @return Returns a reference to this object so that method calls can be chained together. */ Builder kmsKeyId(String kmsKeyId); /** *

* In an Amazon Web Services GovCloud (US) Region, an URL that contains a Signature Version 4 signed request for * the StartDBInstanceAutomatedBackupsReplication operation to call in the Amazon Web Services * Region of the source DB instance. The presigned URL must be a valid request for the * StartDBInstanceAutomatedBackupsReplication API operation that can run in the Amazon Web Services * Region that contains the source DB instance. *

*

* This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web * Services Regions. *

*

* To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: * Using Query Parameters (Amazon Web Services Signature Version 4) and Signature Version 4 Signing * Process. *

* *

* If you are using an Amazon Web Services SDK tool or the CLI, you can specify SourceRegion (or * --source-region for the CLI) instead of specifying PreSignedUrl manually. * Specifying SourceRegion autogenerates a presigned URL that is a valid request for the operation * that can run in the source Amazon Web Services Region. *

*
* * @param preSignedUrl * In an Amazon Web Services GovCloud (US) Region, an URL that contains a Signature Version 4 signed * request for the StartDBInstanceAutomatedBackupsReplication operation to call in the * Amazon Web Services Region of the source DB instance. The presigned URL must be a valid request for * the StartDBInstanceAutomatedBackupsReplication API operation that can run in the Amazon * Web Services Region that contains the source DB instance.

*

* This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon * Web Services Regions. *

*

* To learn how to generate a Signature Version 4 signed request, see Authenticating * Requests: Using Query Parameters (Amazon Web Services Signature Version 4) and Signature Version 4 * Signing Process. *

* *

* If you are using an Amazon Web Services SDK tool or the CLI, you can specify SourceRegion * (or --source-region for the CLI) instead of specifying PreSignedUrl * manually. Specifying SourceRegion autogenerates a presigned URL that is a valid request * for the operation that can run in the source Amazon Web Services Region. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder preSignedUrl(String preSignedUrl); /** * If PreSignedUrl is not specified, this is the region where the source snapshot is located. A PreSignedUrl * will be generated automatically by the SDK. * * @param sourceRegion * If PreSignedUrl is not specified, this is the region where the source snapshot is located. A * PreSignedUrl will be generated automatically by the SDK. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sourceRegion(String sourceRegion); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends RdsRequest.BuilderImpl implements Builder { private String sourceDBInstanceArn; private Integer backupRetentionPeriod; private String kmsKeyId; private String preSignedUrl; private String sourceRegion; private BuilderImpl() { } private BuilderImpl(StartDbInstanceAutomatedBackupsReplicationRequest model) { super(model); sourceDBInstanceArn(model.sourceDBInstanceArn); backupRetentionPeriod(model.backupRetentionPeriod); kmsKeyId(model.kmsKeyId); preSignedUrl(model.preSignedUrl); sourceRegion(model.sourceRegion); } public final String getSourceDBInstanceArn() { return sourceDBInstanceArn; } public final void setSourceDBInstanceArn(String sourceDBInstanceArn) { this.sourceDBInstanceArn = sourceDBInstanceArn; } @Override public final Builder sourceDBInstanceArn(String sourceDBInstanceArn) { this.sourceDBInstanceArn = sourceDBInstanceArn; 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 String getKmsKeyId() { return kmsKeyId; } public final void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } @Override public final Builder kmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; return this; } public final String getPreSignedUrl() { return preSignedUrl; } public final void setPreSignedUrl(String preSignedUrl) { this.preSignedUrl = preSignedUrl; } @Override public final Builder preSignedUrl(String preSignedUrl) { this.preSignedUrl = preSignedUrl; return this; } public final String getSourceRegion() { return sourceRegion; } public final void setSourceRegion(String sourceRegion) { this.sourceRegion = sourceRegion; } @Override public final Builder sourceRegion(String sourceRegion) { this.sourceRegion = sourceRegion; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public StartDbInstanceAutomatedBackupsReplicationRequest build() { return new StartDbInstanceAutomatedBackupsReplicationRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy