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

software.amazon.awssdk.services.ebs.model.StartSnapshotRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for EBS module holds the client classes that are used for communicating with EBS.

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.ebs.model;

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.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.DefaultValueTrait;
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;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class StartSnapshotRequest extends EbsRequest implements
        ToCopyableBuilder {
    private static final SdkField VOLUME_SIZE_FIELD = SdkField. builder(MarshallingType.LONG)
            .memberName("VolumeSize").getter(getter(StartSnapshotRequest::volumeSize)).setter(setter(Builder::volumeSize))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VolumeSize").build()).build();

    private static final SdkField PARENT_SNAPSHOT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ParentSnapshotId").getter(getter(StartSnapshotRequest::parentSnapshotId))
            .setter(setter(Builder::parentSnapshotId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ParentSnapshotId").build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Tags")
            .getter(getter(StartSnapshotRequest::tags))
            .setter(setter(Builder::tags))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(Tag::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("Description").getter(getter(StartSnapshotRequest::description)).setter(setter(Builder::description))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build();

    private static final SdkField CLIENT_TOKEN_FIELD = SdkField
            . builder(MarshallingType.STRING)
            .memberName("ClientToken")
            .getter(getter(StartSnapshotRequest::clientToken))
            .setter(setter(Builder::clientToken))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ClientToken").build(),
                    DefaultValueTrait.idempotencyToken()).build();

    private static final SdkField ENCRYPTED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .memberName("Encrypted").getter(getter(StartSnapshotRequest::encrypted)).setter(setter(Builder::encrypted))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Encrypted").build()).build();

    private static final SdkField KMS_KEY_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("KmsKeyArn").getter(getter(StartSnapshotRequest::kmsKeyArn)).setter(setter(Builder::kmsKeyArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KmsKeyArn").build()).build();

    private static final SdkField TIMEOUT_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("Timeout").getter(getter(StartSnapshotRequest::timeout)).setter(setter(Builder::timeout))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Timeout").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(VOLUME_SIZE_FIELD,
            PARENT_SNAPSHOT_ID_FIELD, TAGS_FIELD, DESCRIPTION_FIELD, CLIENT_TOKEN_FIELD, ENCRYPTED_FIELD, KMS_KEY_ARN_FIELD,
            TIMEOUT_FIELD));

    private final Long volumeSize;

    private final String parentSnapshotId;

    private final List tags;

    private final String description;

    private final String clientToken;

    private final Boolean encrypted;

    private final String kmsKeyArn;

    private final Integer timeout;

    private StartSnapshotRequest(BuilderImpl builder) {
        super(builder);
        this.volumeSize = builder.volumeSize;
        this.parentSnapshotId = builder.parentSnapshotId;
        this.tags = builder.tags;
        this.description = builder.description;
        this.clientToken = builder.clientToken;
        this.encrypted = builder.encrypted;
        this.kmsKeyArn = builder.kmsKeyArn;
        this.timeout = builder.timeout;
    }

    /**
     * 

* The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). *

* * @return The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). */ public final Long volumeSize() { return volumeSize; } /** *

* The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an * on-premises volume, omit this parameter. *

*

* You can't specify ParentSnapshotId and Encrypted in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* If you specify an encrypted parent snapshot, you must have permission to use the KMS key that was used to encrypt * the parent snapshot. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @return The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot * for an on-premises volume, omit this parameter.

*

* You can't specify ParentSnapshotId and Encrypted in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled * for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* If you specify an encrypted parent snapshot, you must have permission to use the KMS key that was used to * encrypt the parent snapshot. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*/ public final String parentSnapshotId() { return parentSnapshotId; } /** * For responses, this returns true if the service returned a value for the Tags 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 hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

* The tags to apply to the snapshot. *

*

* 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 #hasTags} method. *

* * @return The tags to apply to the snapshot. */ public final List tags() { return tags; } /** *

* A description for the snapshot. *

* * @return A description for the snapshot. */ public final String description() { return description; } /** *

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency * ensures that an API request completes only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the result from the original successful * request and they have no additional effect. *

*

* If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. *

*

* For more information, see Idempotency for * StartSnapshot API in the Amazon Elastic Compute Cloud User Guide. *

* * @return A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * Idempotency ensures that an API request completes only once. With an idempotent request, if the original * request completes successfully. The subsequent retries with the same client token return the result from * the original successful request and they have no additional effect.

*

* If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. *

*

* For more information, see Idempotency * for StartSnapshot API in the Amazon Elastic Compute Cloud User Guide. */ public final String clientToken() { return clientToken; } /** *

* Indicates whether to encrypt the snapshot. *

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @return Indicates whether to encrypt the snapshot.

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled * for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*/ public final Boolean encrypted() { return encrypted; } /** *

* The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the snapshot. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @return The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the * snapshot.

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled * for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*/ public final String kmsKeyArn() { return kmsKeyArn; } /** *

* The amount of time (in minutes) after which the snapshot is automatically cancelled if: *

*
    *
  • *

    * No blocks are written to the snapshot. *

    *
  • *
  • *

    * The snapshot is not completed after writing the last block of data. *

    *
  • *
*

* If no value is specified, the timeout defaults to 60 minutes. *

* * @return The amount of time (in minutes) after which the snapshot is automatically cancelled if:

*
    *
  • *

    * No blocks are written to the snapshot. *

    *
  • *
  • *

    * The snapshot is not completed after writing the last block of data. *

    *
  • *
*

* If no value is specified, the timeout defaults to 60 minutes. */ public final Integer timeout() { return timeout; } @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(volumeSize()); hashCode = 31 * hashCode + Objects.hashCode(parentSnapshotId()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(clientToken()); hashCode = 31 * hashCode + Objects.hashCode(encrypted()); hashCode = 31 * hashCode + Objects.hashCode(kmsKeyArn()); hashCode = 31 * hashCode + Objects.hashCode(timeout()); 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 StartSnapshotRequest)) { return false; } StartSnapshotRequest other = (StartSnapshotRequest) obj; return Objects.equals(volumeSize(), other.volumeSize()) && Objects.equals(parentSnapshotId(), other.parentSnapshotId()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(description(), other.description()) && Objects.equals(clientToken(), other.clientToken()) && Objects.equals(encrypted(), other.encrypted()) && Objects.equals(kmsKeyArn(), other.kmsKeyArn()) && Objects.equals(timeout(), other.timeout()); } /** * 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("StartSnapshotRequest").add("VolumeSize", volumeSize()) .add("ParentSnapshotId", parentSnapshotId()).add("Tags", hasTags() ? tags() : null) .add("Description", description()).add("ClientToken", clientToken()).add("Encrypted", encrypted()) .add("KmsKeyArn", kmsKeyArn() == null ? null : "*** Sensitive Data Redacted ***").add("Timeout", timeout()) .build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "VolumeSize": return Optional.ofNullable(clazz.cast(volumeSize())); case "ParentSnapshotId": return Optional.ofNullable(clazz.cast(parentSnapshotId())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "ClientToken": return Optional.ofNullable(clazz.cast(clientToken())); case "Encrypted": return Optional.ofNullable(clazz.cast(encrypted())); case "KmsKeyArn": return Optional.ofNullable(clazz.cast(kmsKeyArn())); case "Timeout": return Optional.ofNullable(clazz.cast(timeout())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((StartSnapshotRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends EbsRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). *

* * @param volumeSize * The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). * @return Returns a reference to this object so that method calls can be chained together. */ Builder volumeSize(Long volumeSize); /** *

* The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for * an on-premises volume, omit this parameter. *

*

* You can't specify ParentSnapshotId and Encrypted in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* If you specify an encrypted parent snapshot, you must have permission to use the KMS key that was used to * encrypt the parent snapshot. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @param parentSnapshotId * The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first * snapshot for an on-premises volume, omit this parameter.

*

* You can't specify ParentSnapshotId and Encrypted in the same request. If you specify * both parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled * for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* If you specify an encrypted parent snapshot, you must have permission to use the KMS key that was used * to encrypt the parent snapshot. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User * Guide. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder parentSnapshotId(String parentSnapshotId); /** *

* The tags to apply to the snapshot. *

* * @param tags * The tags to apply to the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* The tags to apply to the snapshot. *

* * @param tags * The tags to apply to the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

* The tags to apply to the snapshot. *

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

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

* A description for the snapshot. *

* * @param description * A description for the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency * ensures that an API request completes only once. With an idempotent request, if the original request * completes successfully. The subsequent retries with the same client token return the result from the original * successful request and they have no additional effect. *

*

* If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. *

*

* For more information, see Idempotency for * StartSnapshot API in the Amazon Elastic Compute Cloud User Guide. *

* * @param clientToken * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * Idempotency ensures that an API request completes only once. With an idempotent request, if the * original request completes successfully. The subsequent retries with the same client token return the * result from the original successful request and they have no additional effect.

*

* If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. *

*

* For more information, see * Idempotency for StartSnapshot API in the Amazon Elastic Compute Cloud User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder clientToken(String clientToken); /** *

* Indicates whether to encrypt the snapshot. *

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @param encrypted * Indicates whether to encrypt the snapshot.

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify * both parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled * for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, * see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User * Guide. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder encrypted(Boolean encrypted); /** *

* The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the snapshot. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @param kmsKeyArn * The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the * snapshot.

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled * for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, * see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User * Guide. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder kmsKeyArn(String kmsKeyArn); /** *

* The amount of time (in minutes) after which the snapshot is automatically cancelled if: *

*
    *
  • *

    * No blocks are written to the snapshot. *

    *
  • *
  • *

    * The snapshot is not completed after writing the last block of data. *

    *
  • *
*

* If no value is specified, the timeout defaults to 60 minutes. *

* * @param timeout * The amount of time (in minutes) after which the snapshot is automatically cancelled if:

*
    *
  • *

    * No blocks are written to the snapshot. *

    *
  • *
  • *

    * The snapshot is not completed after writing the last block of data. *

    *
  • *
*

* If no value is specified, the timeout defaults to 60 minutes. * @return Returns a reference to this object so that method calls can be chained together. */ Builder timeout(Integer timeout); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends EbsRequest.BuilderImpl implements Builder { private Long volumeSize; private String parentSnapshotId; private List tags = DefaultSdkAutoConstructList.getInstance(); private String description; private String clientToken; private Boolean encrypted; private String kmsKeyArn; private Integer timeout; private BuilderImpl() { } private BuilderImpl(StartSnapshotRequest model) { super(model); volumeSize(model.volumeSize); parentSnapshotId(model.parentSnapshotId); tags(model.tags); description(model.description); clientToken(model.clientToken); encrypted(model.encrypted); kmsKeyArn(model.kmsKeyArn); timeout(model.timeout); } public final Long getVolumeSize() { return volumeSize; } public final void setVolumeSize(Long volumeSize) { this.volumeSize = volumeSize; } @Override public final Builder volumeSize(Long volumeSize) { this.volumeSize = volumeSize; return this; } public final String getParentSnapshotId() { return parentSnapshotId; } public final void setParentSnapshotId(String parentSnapshotId) { this.parentSnapshotId = parentSnapshotId; } @Override public final Builder parentSnapshotId(String parentSnapshotId) { this.parentSnapshotId = parentSnapshotId; return this; } public final List getTags() { List result = TagsCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagsCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagsCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override public final Builder description(String description) { this.description = description; return this; } public final String getClientToken() { return clientToken; } public final void setClientToken(String clientToken) { this.clientToken = clientToken; } @Override public final Builder clientToken(String clientToken) { this.clientToken = clientToken; return this; } public final Boolean getEncrypted() { return encrypted; } public final void setEncrypted(Boolean encrypted) { this.encrypted = encrypted; } @Override public final Builder encrypted(Boolean encrypted) { this.encrypted = encrypted; return this; } public final String getKmsKeyArn() { return kmsKeyArn; } public final void setKmsKeyArn(String kmsKeyArn) { this.kmsKeyArn = kmsKeyArn; } @Override public final Builder kmsKeyArn(String kmsKeyArn) { this.kmsKeyArn = kmsKeyArn; return this; } public final Integer getTimeout() { return timeout; } public final void setTimeout(Integer timeout) { this.timeout = timeout; } @Override public final Builder timeout(Integer timeout) { this.timeout = timeout; 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 StartSnapshotRequest build() { return new StartSnapshotRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy