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

software.amazon.awssdk.services.snowball.model.UpdateJobRequest Maven / Gradle / Ivy

Go to download

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

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.snowball.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 UpdateJobRequest extends SnowballRequest implements
        ToCopyableBuilder {
    private static final SdkField JOB_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("JobId")
            .getter(getter(UpdateJobRequest::jobId)).setter(setter(Builder::jobId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("JobId").build()).build();

    private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("RoleARN").getter(getter(UpdateJobRequest::roleARN)).setter(setter(Builder::roleARN))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RoleARN").build()).build();

    private static final SdkField NOTIFICATION_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
            .memberName("Notification").getter(getter(UpdateJobRequest::notification)).setter(setter(Builder::notification))
            .constructor(Notification::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Notification").build()).build();

    private static final SdkField RESOURCES_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
            .memberName("Resources").getter(getter(UpdateJobRequest::resources)).setter(setter(Builder::resources))
            .constructor(JobResource::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Resources").build()).build();

    private static final SdkField ON_DEVICE_SERVICE_CONFIGURATION_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO)
            .memberName("OnDeviceServiceConfiguration")
            .getter(getter(UpdateJobRequest::onDeviceServiceConfiguration))
            .setter(setter(Builder::onDeviceServiceConfiguration))
            .constructor(OnDeviceServiceConfiguration::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OnDeviceServiceConfiguration")
                    .build()).build();

    private static final SdkField ADDRESS_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("AddressId").getter(getter(UpdateJobRequest::addressId)).setter(setter(Builder::addressId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AddressId").build()).build();

    private static final SdkField SHIPPING_OPTION_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ShippingOption").getter(getter(UpdateJobRequest::shippingOptionAsString))
            .setter(setter(Builder::shippingOption))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ShippingOption").build()).build();

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

    private static final SdkField SNOWBALL_CAPACITY_PREFERENCE_FIELD = SdkField
            . builder(MarshallingType.STRING)
            .memberName("SnowballCapacityPreference")
            .getter(getter(UpdateJobRequest::snowballCapacityPreferenceAsString))
            .setter(setter(Builder::snowballCapacityPreference))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnowballCapacityPreference").build())
            .build();

    private static final SdkField FORWARDING_ADDRESS_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ForwardingAddressId").getter(getter(UpdateJobRequest::forwardingAddressId))
            .setter(setter(Builder::forwardingAddressId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ForwardingAddressId").build())
            .build();

    private static final SdkField PICKUP_DETAILS_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("PickupDetails")
            .getter(getter(UpdateJobRequest::pickupDetails)).setter(setter(Builder::pickupDetails))
            .constructor(PickupDetails::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PickupDetails").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(JOB_ID_FIELD, ROLE_ARN_FIELD,
            NOTIFICATION_FIELD, RESOURCES_FIELD, ON_DEVICE_SERVICE_CONFIGURATION_FIELD, ADDRESS_ID_FIELD, SHIPPING_OPTION_FIELD,
            DESCRIPTION_FIELD, SNOWBALL_CAPACITY_PREFERENCE_FIELD, FORWARDING_ADDRESS_ID_FIELD, PICKUP_DETAILS_FIELD));

    private final String jobId;

    private final String roleARN;

    private final Notification notification;

    private final JobResource resources;

    private final OnDeviceServiceConfiguration onDeviceServiceConfiguration;

    private final String addressId;

    private final String shippingOption;

    private final String description;

    private final String snowballCapacityPreference;

    private final String forwardingAddressId;

    private final PickupDetails pickupDetails;

    private UpdateJobRequest(BuilderImpl builder) {
        super(builder);
        this.jobId = builder.jobId;
        this.roleARN = builder.roleARN;
        this.notification = builder.notification;
        this.resources = builder.resources;
        this.onDeviceServiceConfiguration = builder.onDeviceServiceConfiguration;
        this.addressId = builder.addressId;
        this.shippingOption = builder.shippingOption;
        this.description = builder.description;
        this.snowballCapacityPreference = builder.snowballCapacityPreference;
        this.forwardingAddressId = builder.forwardingAddressId;
        this.pickupDetails = builder.pickupDetails;
    }

    /**
     * 

* The job ID of the job that you want to update, for example JID123e4567-e89b-12d3-a456-426655440000. *

* * @return The job ID of the job that you want to update, for example * JID123e4567-e89b-12d3-a456-426655440000. */ public final String jobId() { return jobId; } /** *

* The new role Amazon Resource Name (ARN) that you want to associate with this job. To create a role ARN, use the * CreateRoleIdentity and * Access Management (IAM) API action. *

* * @return The new role Amazon Resource Name (ARN) that you want to associate with this job. To create a role ARN, * use the CreateRoleIdentity and * Access Management (IAM) API action. */ public final String roleARN() { return roleARN; } /** *

* The new or updated Notification object. *

* * @return The new or updated Notification object. */ public final Notification notification() { return notification; } /** *

* The updated JobResource object, or the updated JobResource object. *

* * @return The updated JobResource object, or the updated JobResource object. */ public final JobResource resources() { return resources; } /** *

* Specifies the service or services on the Snow Family device that your transferred data will be exported from or * imported into. Amazon Web Services Snow Family supports Amazon S3 and NFS (Network File System) and the Amazon * Web Services Storage Gateway service Tape Gateway type. *

* * @return Specifies the service or services on the Snow Family device that your transferred data will be exported * from or imported into. Amazon Web Services Snow Family supports Amazon S3 and NFS (Network File System) * and the Amazon Web Services Storage Gateway service Tape Gateway type. */ public final OnDeviceServiceConfiguration onDeviceServiceConfiguration() { return onDeviceServiceConfiguration; } /** *

* The ID of the updated Address object. *

* * @return The ID of the updated Address object. */ public final String addressId() { return addressId; } /** *

* The updated shipping option value of this job's ShippingDetails object. *

*

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

* * @return The updated shipping option value of this job's ShippingDetails object. * @see ShippingOption */ public final ShippingOption shippingOption() { return ShippingOption.fromValue(shippingOption); } /** *

* The updated shipping option value of this job's ShippingDetails object. *

*

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

* * @return The updated shipping option value of this job's ShippingDetails object. * @see ShippingOption */ public final String shippingOptionAsString() { return shippingOption; } /** *

* The updated description of this job's JobMetadata object. *

* * @return The updated description of this job's JobMetadata object. */ public final String description() { return description; } /** *

* The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB Snowballs * are only available in the US regions. *

*

* For more information, see "https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html" * (Snow Family Devices and Capacity) in the Snowcone User Guide or * "https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html" (Snow Family Devices and * Capacity) in the Snowcone User Guide. *

*

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

* * @return The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB * Snowballs are only available in the US regions.

*

* For more information, see * "https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html" (Snow Family Devices * and Capacity) in the Snowcone User Guide or * "https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html" (Snow Family Devices * and Capacity) in the Snowcone User Guide. * @see SnowballCapacity */ public final SnowballCapacity snowballCapacityPreference() { return SnowballCapacity.fromValue(snowballCapacityPreference); } /** *

* The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB Snowballs * are only available in the US regions. *

*

* For more information, see "https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html" * (Snow Family Devices and Capacity) in the Snowcone User Guide or * "https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html" (Snow Family Devices and * Capacity) in the Snowcone User Guide. *

*

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

* * @return The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB * Snowballs are only available in the US regions.

*

* For more information, see * "https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html" (Snow Family Devices * and Capacity) in the Snowcone User Guide or * "https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html" (Snow Family Devices * and Capacity) in the Snowcone User Guide. * @see SnowballCapacity */ public final String snowballCapacityPreferenceAsString() { return snowballCapacityPreference; } /** *

* The updated ID for the forwarding address for a job. This field is not supported in most regions. *

* * @return The updated ID for the forwarding address for a job. This field is not supported in most regions. */ public final String forwardingAddressId() { return forwardingAddressId; } /** * Returns the value of the PickupDetails property for this object. * * @return The value of the PickupDetails property for this object. */ public final PickupDetails pickupDetails() { return pickupDetails; } @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(jobId()); hashCode = 31 * hashCode + Objects.hashCode(roleARN()); hashCode = 31 * hashCode + Objects.hashCode(notification()); hashCode = 31 * hashCode + Objects.hashCode(resources()); hashCode = 31 * hashCode + Objects.hashCode(onDeviceServiceConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(addressId()); hashCode = 31 * hashCode + Objects.hashCode(shippingOptionAsString()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(snowballCapacityPreferenceAsString()); hashCode = 31 * hashCode + Objects.hashCode(forwardingAddressId()); hashCode = 31 * hashCode + Objects.hashCode(pickupDetails()); 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 UpdateJobRequest)) { return false; } UpdateJobRequest other = (UpdateJobRequest) obj; return Objects.equals(jobId(), other.jobId()) && Objects.equals(roleARN(), other.roleARN()) && Objects.equals(notification(), other.notification()) && Objects.equals(resources(), other.resources()) && Objects.equals(onDeviceServiceConfiguration(), other.onDeviceServiceConfiguration()) && Objects.equals(addressId(), other.addressId()) && Objects.equals(shippingOptionAsString(), other.shippingOptionAsString()) && Objects.equals(description(), other.description()) && Objects.equals(snowballCapacityPreferenceAsString(), other.snowballCapacityPreferenceAsString()) && Objects.equals(forwardingAddressId(), other.forwardingAddressId()) && Objects.equals(pickupDetails(), other.pickupDetails()); } /** * 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("UpdateJobRequest").add("JobId", jobId()).add("RoleARN", roleARN()) .add("Notification", notification()).add("Resources", resources()) .add("OnDeviceServiceConfiguration", onDeviceServiceConfiguration()).add("AddressId", addressId()) .add("ShippingOption", shippingOptionAsString()).add("Description", description()) .add("SnowballCapacityPreference", snowballCapacityPreferenceAsString()) .add("ForwardingAddressId", forwardingAddressId()).add("PickupDetails", pickupDetails()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "JobId": return Optional.ofNullable(clazz.cast(jobId())); case "RoleARN": return Optional.ofNullable(clazz.cast(roleARN())); case "Notification": return Optional.ofNullable(clazz.cast(notification())); case "Resources": return Optional.ofNullable(clazz.cast(resources())); case "OnDeviceServiceConfiguration": return Optional.ofNullable(clazz.cast(onDeviceServiceConfiguration())); case "AddressId": return Optional.ofNullable(clazz.cast(addressId())); case "ShippingOption": return Optional.ofNullable(clazz.cast(shippingOptionAsString())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "SnowballCapacityPreference": return Optional.ofNullable(clazz.cast(snowballCapacityPreferenceAsString())); case "ForwardingAddressId": return Optional.ofNullable(clazz.cast(forwardingAddressId())); case "PickupDetails": return Optional.ofNullable(clazz.cast(pickupDetails())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((UpdateJobRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SnowballRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The job ID of the job that you want to update, for example * JID123e4567-e89b-12d3-a456-426655440000. *

* * @param jobId * The job ID of the job that you want to update, for example * JID123e4567-e89b-12d3-a456-426655440000. * @return Returns a reference to this object so that method calls can be chained together. */ Builder jobId(String jobId); /** *

* The new role Amazon Resource Name (ARN) that you want to associate with this job. To create a role ARN, use * the CreateRoleIdentity * and Access Management (IAM) API action. *

* * @param roleARN * The new role Amazon Resource Name (ARN) that you want to associate with this job. To create a role * ARN, use the CreateRoleIdentity * and Access Management (IAM) API action. * @return Returns a reference to this object so that method calls can be chained together. */ Builder roleARN(String roleARN); /** *

* The new or updated Notification object. *

* * @param notification * The new or updated Notification object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder notification(Notification notification); /** *

* The new or updated Notification object. *

* This is a convenience method that creates an instance of the {@link Notification.Builder} avoiding the need * to create one manually via {@link Notification#builder()}. * *

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

* The updated JobResource object, or the updated JobResource object. *

* * @param resources * The updated JobResource object, or the updated JobResource object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resources(JobResource resources); /** *

* The updated JobResource object, or the updated JobResource object. *

* This is a convenience method that creates an instance of the {@link JobResource.Builder} avoiding the need to * create one manually via {@link JobResource#builder()}. * *

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

* Specifies the service or services on the Snow Family device that your transferred data will be exported from * or imported into. Amazon Web Services Snow Family supports Amazon S3 and NFS (Network File System) and the * Amazon Web Services Storage Gateway service Tape Gateway type. *

* * @param onDeviceServiceConfiguration * Specifies the service or services on the Snow Family device that your transferred data will be * exported from or imported into. Amazon Web Services Snow Family supports Amazon S3 and NFS (Network * File System) and the Amazon Web Services Storage Gateway service Tape Gateway type. * @return Returns a reference to this object so that method calls can be chained together. */ Builder onDeviceServiceConfiguration(OnDeviceServiceConfiguration onDeviceServiceConfiguration); /** *

* Specifies the service or services on the Snow Family device that your transferred data will be exported from * or imported into. Amazon Web Services Snow Family supports Amazon S3 and NFS (Network File System) and the * Amazon Web Services Storage Gateway service Tape Gateway type. *

* This is a convenience method that creates an instance of the {@link OnDeviceServiceConfiguration.Builder} * avoiding the need to create one manually via {@link OnDeviceServiceConfiguration#builder()}. * *

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

* The ID of the updated Address object. *

* * @param addressId * The ID of the updated Address object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder addressId(String addressId); /** *

* The updated shipping option value of this job's ShippingDetails object. *

* * @param shippingOption * The updated shipping option value of this job's ShippingDetails object. * @see ShippingOption * @return Returns a reference to this object so that method calls can be chained together. * @see ShippingOption */ Builder shippingOption(String shippingOption); /** *

* The updated shipping option value of this job's ShippingDetails object. *

* * @param shippingOption * The updated shipping option value of this job's ShippingDetails object. * @see ShippingOption * @return Returns a reference to this object so that method calls can be chained together. * @see ShippingOption */ Builder shippingOption(ShippingOption shippingOption); /** *

* The updated description of this job's JobMetadata object. *

* * @param description * The updated description of this job's JobMetadata object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

* The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB * Snowballs are only available in the US regions. *

*

* For more information, see "https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html" * (Snow Family Devices and Capacity) in the Snowcone User Guide or * "https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html" (Snow Family Devices and * Capacity) in the Snowcone User Guide. *

* * @param snowballCapacityPreference * The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB * Snowballs are only available in the US regions.

*

* For more information, see * "https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html" (Snow Family * Devices and Capacity) in the Snowcone User Guide or * "https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html" (Snow Family * Devices and Capacity) in the Snowcone User Guide. * @see SnowballCapacity * @return Returns a reference to this object so that method calls can be chained together. * @see SnowballCapacity */ Builder snowballCapacityPreference(String snowballCapacityPreference); /** *

* The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB * Snowballs are only available in the US regions. *

*

* For more information, see "https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html" * (Snow Family Devices and Capacity) in the Snowcone User Guide or * "https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html" (Snow Family Devices and * Capacity) in the Snowcone User Guide. *

* * @param snowballCapacityPreference * The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB * Snowballs are only available in the US regions.

*

* For more information, see * "https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html" (Snow Family * Devices and Capacity) in the Snowcone User Guide or * "https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html" (Snow Family * Devices and Capacity) in the Snowcone User Guide. * @see SnowballCapacity * @return Returns a reference to this object so that method calls can be chained together. * @see SnowballCapacity */ Builder snowballCapacityPreference(SnowballCapacity snowballCapacityPreference); /** *

* The updated ID for the forwarding address for a job. This field is not supported in most regions. *

* * @param forwardingAddressId * The updated ID for the forwarding address for a job. This field is not supported in most regions. * @return Returns a reference to this object so that method calls can be chained together. */ Builder forwardingAddressId(String forwardingAddressId); /** * Sets the value of the PickupDetails property for this object. * * @param pickupDetails * The new value for the PickupDetails property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder pickupDetails(PickupDetails pickupDetails); /** * Sets the value of the PickupDetails property for this object. * * This is a convenience method that creates an instance of the {@link PickupDetails.Builder} avoiding the need * to create one manually via {@link PickupDetails#builder()}. * *

* When the {@link Consumer} completes, {@link PickupDetails.Builder#build()} is called immediately and its * result is passed to {@link #pickupDetails(PickupDetails)}. * * @param pickupDetails * a consumer that will call methods on {@link PickupDetails.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #pickupDetails(PickupDetails) */ default Builder pickupDetails(Consumer pickupDetails) { return pickupDetails(PickupDetails.builder().applyMutation(pickupDetails).build()); } @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends SnowballRequest.BuilderImpl implements Builder { private String jobId; private String roleARN; private Notification notification; private JobResource resources; private OnDeviceServiceConfiguration onDeviceServiceConfiguration; private String addressId; private String shippingOption; private String description; private String snowballCapacityPreference; private String forwardingAddressId; private PickupDetails pickupDetails; private BuilderImpl() { } private BuilderImpl(UpdateJobRequest model) { super(model); jobId(model.jobId); roleARN(model.roleARN); notification(model.notification); resources(model.resources); onDeviceServiceConfiguration(model.onDeviceServiceConfiguration); addressId(model.addressId); shippingOption(model.shippingOption); description(model.description); snowballCapacityPreference(model.snowballCapacityPreference); forwardingAddressId(model.forwardingAddressId); pickupDetails(model.pickupDetails); } public final String getJobId() { return jobId; } public final void setJobId(String jobId) { this.jobId = jobId; } @Override public final Builder jobId(String jobId) { this.jobId = jobId; return this; } public final String getRoleARN() { return roleARN; } public final void setRoleARN(String roleARN) { this.roleARN = roleARN; } @Override public final Builder roleARN(String roleARN) { this.roleARN = roleARN; return this; } public final Notification.Builder getNotification() { return notification != null ? notification.toBuilder() : null; } public final void setNotification(Notification.BuilderImpl notification) { this.notification = notification != null ? notification.build() : null; } @Override public final Builder notification(Notification notification) { this.notification = notification; return this; } public final JobResource.Builder getResources() { return resources != null ? resources.toBuilder() : null; } public final void setResources(JobResource.BuilderImpl resources) { this.resources = resources != null ? resources.build() : null; } @Override public final Builder resources(JobResource resources) { this.resources = resources; return this; } public final OnDeviceServiceConfiguration.Builder getOnDeviceServiceConfiguration() { return onDeviceServiceConfiguration != null ? onDeviceServiceConfiguration.toBuilder() : null; } public final void setOnDeviceServiceConfiguration(OnDeviceServiceConfiguration.BuilderImpl onDeviceServiceConfiguration) { this.onDeviceServiceConfiguration = onDeviceServiceConfiguration != null ? onDeviceServiceConfiguration.build() : null; } @Override public final Builder onDeviceServiceConfiguration(OnDeviceServiceConfiguration onDeviceServiceConfiguration) { this.onDeviceServiceConfiguration = onDeviceServiceConfiguration; return this; } public final String getAddressId() { return addressId; } public final void setAddressId(String addressId) { this.addressId = addressId; } @Override public final Builder addressId(String addressId) { this.addressId = addressId; return this; } public final String getShippingOption() { return shippingOption; } public final void setShippingOption(String shippingOption) { this.shippingOption = shippingOption; } @Override public final Builder shippingOption(String shippingOption) { this.shippingOption = shippingOption; return this; } @Override public final Builder shippingOption(ShippingOption shippingOption) { this.shippingOption(shippingOption == null ? null : shippingOption.toString()); 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 getSnowballCapacityPreference() { return snowballCapacityPreference; } public final void setSnowballCapacityPreference(String snowballCapacityPreference) { this.snowballCapacityPreference = snowballCapacityPreference; } @Override public final Builder snowballCapacityPreference(String snowballCapacityPreference) { this.snowballCapacityPreference = snowballCapacityPreference; return this; } @Override public final Builder snowballCapacityPreference(SnowballCapacity snowballCapacityPreference) { this.snowballCapacityPreference(snowballCapacityPreference == null ? null : snowballCapacityPreference.toString()); return this; } public final String getForwardingAddressId() { return forwardingAddressId; } public final void setForwardingAddressId(String forwardingAddressId) { this.forwardingAddressId = forwardingAddressId; } @Override public final Builder forwardingAddressId(String forwardingAddressId) { this.forwardingAddressId = forwardingAddressId; return this; } public final PickupDetails.Builder getPickupDetails() { return pickupDetails != null ? pickupDetails.toBuilder() : null; } public final void setPickupDetails(PickupDetails.BuilderImpl pickupDetails) { this.pickupDetails = pickupDetails != null ? pickupDetails.build() : null; } @Override public final Builder pickupDetails(PickupDetails pickupDetails) { this.pickupDetails = pickupDetails; 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 UpdateJobRequest build() { return new UpdateJobRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy