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

software.amazon.awssdk.services.medialive.model.DeleteReservationResponse Maven / Gradle / Ivy

/*
 * 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.medialive.model;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
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.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.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * Placeholder documentation for DeleteReservationResponse
 */
@Generated("software.amazon.awssdk:codegen")
public final class DeleteReservationResponse extends MediaLiveResponse implements
        ToCopyableBuilder {
    private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Arn")
            .getter(getter(DeleteReservationResponse::arn)).setter(setter(Builder::arn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("arn").build()).build();

    private static final SdkField COUNT_FIELD = SdkField. builder(MarshallingType.INTEGER).memberName("Count")
            .getter(getter(DeleteReservationResponse::count)).setter(setter(Builder::count))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("count").build()).build();

    private static final SdkField CURRENCY_CODE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("CurrencyCode").getter(getter(DeleteReservationResponse::currencyCode))
            .setter(setter(Builder::currencyCode))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("currencyCode").build()).build();

    private static final SdkField DURATION_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("Duration").getter(getter(DeleteReservationResponse::duration)).setter(setter(Builder::duration))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("duration").build()).build();

    private static final SdkField DURATION_UNITS_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("DurationUnits").getter(getter(DeleteReservationResponse::durationUnitsAsString))
            .setter(setter(Builder::durationUnits))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("durationUnits").build()).build();

    private static final SdkField END_FIELD = SdkField. builder(MarshallingType.STRING).memberName("End")
            .getter(getter(DeleteReservationResponse::end)).setter(setter(Builder::end))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("end").build()).build();

    private static final SdkField FIXED_PRICE_FIELD = SdkField. builder(MarshallingType.DOUBLE)
            .memberName("FixedPrice").getter(getter(DeleteReservationResponse::fixedPrice)).setter(setter(Builder::fixedPrice))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fixedPrice").build()).build();

    private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name")
            .getter(getter(DeleteReservationResponse::name)).setter(setter(Builder::name))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();

    private static final SdkField OFFERING_DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("OfferingDescription").getter(getter(DeleteReservationResponse::offeringDescription))
            .setter(setter(Builder::offeringDescription))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("offeringDescription").build())
            .build();

    private static final SdkField OFFERING_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("OfferingId").getter(getter(DeleteReservationResponse::offeringId)).setter(setter(Builder::offeringId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("offeringId").build()).build();

    private static final SdkField OFFERING_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("OfferingType").getter(getter(DeleteReservationResponse::offeringTypeAsString))
            .setter(setter(Builder::offeringType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("offeringType").build()).build();

    private static final SdkField REGION_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Region")
            .getter(getter(DeleteReservationResponse::region)).setter(setter(Builder::region))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("region").build()).build();

    private static final SdkField RENEWAL_SETTINGS_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("RenewalSettings")
            .getter(getter(DeleteReservationResponse::renewalSettings)).setter(setter(Builder::renewalSettings))
            .constructor(RenewalSettings::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("renewalSettings").build()).build();

    private static final SdkField RESERVATION_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ReservationId").getter(getter(DeleteReservationResponse::reservationId))
            .setter(setter(Builder::reservationId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("reservationId").build()).build();

    private static final SdkField RESOURCE_SPECIFICATION_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("ResourceSpecification")
            .getter(getter(DeleteReservationResponse::resourceSpecification)).setter(setter(Builder::resourceSpecification))
            .constructor(ReservationResourceSpecification::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("resourceSpecification").build())
            .build();

    private static final SdkField START_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Start")
            .getter(getter(DeleteReservationResponse::start)).setter(setter(Builder::start))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("start").build()).build();

    private static final SdkField STATE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("State")
            .getter(getter(DeleteReservationResponse::stateAsString)).setter(setter(Builder::state))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("state").build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .memberName("Tags")
            .getter(getter(DeleteReservationResponse::tags))
            .setter(setter(Builder::tags))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").build(),
                    MapTrait.builder()
                            .keyLocationName("key")
                            .valueLocationName("value")
                            .valueFieldInfo(
                                    SdkField. builder(MarshallingType.STRING)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("value").build()).build()).build()).build();

    private static final SdkField USAGE_PRICE_FIELD = SdkField. builder(MarshallingType.DOUBLE)
            .memberName("UsagePrice").getter(getter(DeleteReservationResponse::usagePrice)).setter(setter(Builder::usagePrice))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("usagePrice").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD, COUNT_FIELD,
            CURRENCY_CODE_FIELD, DURATION_FIELD, DURATION_UNITS_FIELD, END_FIELD, FIXED_PRICE_FIELD, NAME_FIELD,
            OFFERING_DESCRIPTION_FIELD, OFFERING_ID_FIELD, OFFERING_TYPE_FIELD, REGION_FIELD, RENEWAL_SETTINGS_FIELD,
            RESERVATION_ID_FIELD, RESOURCE_SPECIFICATION_FIELD, START_FIELD, STATE_FIELD, TAGS_FIELD, USAGE_PRICE_FIELD));

    private final String arn;

    private final Integer count;

    private final String currencyCode;

    private final Integer duration;

    private final String durationUnits;

    private final String end;

    private final Double fixedPrice;

    private final String name;

    private final String offeringDescription;

    private final String offeringId;

    private final String offeringType;

    private final String region;

    private final RenewalSettings renewalSettings;

    private final String reservationId;

    private final ReservationResourceSpecification resourceSpecification;

    private final String start;

    private final String state;

    private final Map tags;

    private final Double usagePrice;

    private DeleteReservationResponse(BuilderImpl builder) {
        super(builder);
        this.arn = builder.arn;
        this.count = builder.count;
        this.currencyCode = builder.currencyCode;
        this.duration = builder.duration;
        this.durationUnits = builder.durationUnits;
        this.end = builder.end;
        this.fixedPrice = builder.fixedPrice;
        this.name = builder.name;
        this.offeringDescription = builder.offeringDescription;
        this.offeringId = builder.offeringId;
        this.offeringType = builder.offeringType;
        this.region = builder.region;
        this.renewalSettings = builder.renewalSettings;
        this.reservationId = builder.reservationId;
        this.resourceSpecification = builder.resourceSpecification;
        this.start = builder.start;
        this.state = builder.state;
        this.tags = builder.tags;
        this.usagePrice = builder.usagePrice;
    }

    /**
     * Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567'
     * 
     * @return Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567'
     */
    public final String arn() {
        return arn;
    }

    /**
     * Number of reserved resources
     * 
     * @return Number of reserved resources
     */
    public final Integer count() {
        return count;
    }

    /**
     * Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
     * 
     * @return Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
     */
    public final String currencyCode() {
        return currencyCode;
    }

    /**
     * Lease duration, e.g. '12'
     * 
     * @return Lease duration, e.g. '12'
     */
    public final Integer duration() {
        return duration;
    }

    /**
     * Units for duration, e.g. 'MONTHS'
     * 

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

* * @return Units for duration, e.g. 'MONTHS' * @see OfferingDurationUnits */ public final OfferingDurationUnits durationUnits() { return OfferingDurationUnits.fromValue(durationUnits); } /** * Units for duration, e.g. 'MONTHS' *

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

* * @return Units for duration, e.g. 'MONTHS' * @see OfferingDurationUnits */ public final String durationUnitsAsString() { return durationUnits; } /** * Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00' * * @return Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00' */ public final String end() { return end; } /** * One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering * * @return One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering */ public final Double fixedPrice() { return fixedPrice; } /** * User specified reservation name * * @return User specified reservation name */ public final String name() { return name; } /** * Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ in US West (Oregon)' * * @return Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ in US West (Oregon)' */ public final String offeringDescription() { return offeringDescription; } /** * Unique offering ID, e.g. '87654321' * * @return Unique offering ID, e.g. '87654321' */ public final String offeringId() { return offeringId; } /** * Offering type, e.g. 'NO_UPFRONT' *

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

* * @return Offering type, e.g. 'NO_UPFRONT' * @see OfferingType */ public final OfferingType offeringType() { return OfferingType.fromValue(offeringType); } /** * Offering type, e.g. 'NO_UPFRONT' *

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

* * @return Offering type, e.g. 'NO_UPFRONT' * @see OfferingType */ public final String offeringTypeAsString() { return offeringType; } /** * AWS region, e.g. 'us-west-2' * * @return AWS region, e.g. 'us-west-2' */ public final String region() { return region; } /** * Renewal settings for the reservation * * @return Renewal settings for the reservation */ public final RenewalSettings renewalSettings() { return renewalSettings; } /** * Unique reservation ID, e.g. '1234567' * * @return Unique reservation ID, e.g. '1234567' */ public final String reservationId() { return reservationId; } /** * Resource configuration details * * @return Resource configuration details */ public final ReservationResourceSpecification resourceSpecification() { return resourceSpecification; } /** * Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00' * * @return Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00' */ public final String start() { return start; } /** * Current state of reservation, e.g. 'ACTIVE' *

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

* * @return Current state of reservation, e.g. 'ACTIVE' * @see ReservationState */ public final ReservationState state() { return ReservationState.fromValue(state); } /** * Current state of reservation, e.g. 'ACTIVE' *

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

* * @return Current state of reservation, e.g. 'ACTIVE' * @see ReservationState */ public final String stateAsString() { return state; } /** * 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 SdkAutoConstructMap); } /** * A collection of key-value pairs *

* 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 A collection of key-value pairs */ public final Map tags() { return tags; } /** * Recurring usage charge for each reserved resource, e.g. '157.0' * * @return Recurring usage charge for each reserved resource, e.g. '157.0' */ public final Double usagePrice() { return usagePrice; } @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(arn()); hashCode = 31 * hashCode + Objects.hashCode(count()); hashCode = 31 * hashCode + Objects.hashCode(currencyCode()); hashCode = 31 * hashCode + Objects.hashCode(duration()); hashCode = 31 * hashCode + Objects.hashCode(durationUnitsAsString()); hashCode = 31 * hashCode + Objects.hashCode(end()); hashCode = 31 * hashCode + Objects.hashCode(fixedPrice()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(offeringDescription()); hashCode = 31 * hashCode + Objects.hashCode(offeringId()); hashCode = 31 * hashCode + Objects.hashCode(offeringTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(region()); hashCode = 31 * hashCode + Objects.hashCode(renewalSettings()); hashCode = 31 * hashCode + Objects.hashCode(reservationId()); hashCode = 31 * hashCode + Objects.hashCode(resourceSpecification()); hashCode = 31 * hashCode + Objects.hashCode(start()); hashCode = 31 * hashCode + Objects.hashCode(stateAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(usagePrice()); 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 DeleteReservationResponse)) { return false; } DeleteReservationResponse other = (DeleteReservationResponse) obj; return Objects.equals(arn(), other.arn()) && Objects.equals(count(), other.count()) && Objects.equals(currencyCode(), other.currencyCode()) && Objects.equals(duration(), other.duration()) && Objects.equals(durationUnitsAsString(), other.durationUnitsAsString()) && Objects.equals(end(), other.end()) && Objects.equals(fixedPrice(), other.fixedPrice()) && Objects.equals(name(), other.name()) && Objects.equals(offeringDescription(), other.offeringDescription()) && Objects.equals(offeringId(), other.offeringId()) && Objects.equals(offeringTypeAsString(), other.offeringTypeAsString()) && Objects.equals(region(), other.region()) && Objects.equals(renewalSettings(), other.renewalSettings()) && Objects.equals(reservationId(), other.reservationId()) && Objects.equals(resourceSpecification(), other.resourceSpecification()) && Objects.equals(start(), other.start()) && Objects.equals(stateAsString(), other.stateAsString()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(usagePrice(), other.usagePrice()); } /** * 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("DeleteReservationResponse").add("Arn", arn()).add("Count", count()) .add("CurrencyCode", currencyCode()).add("Duration", duration()).add("DurationUnits", durationUnitsAsString()) .add("End", end()).add("FixedPrice", fixedPrice()).add("Name", name()) .add("OfferingDescription", offeringDescription()).add("OfferingId", offeringId()) .add("OfferingType", offeringTypeAsString()).add("Region", region()).add("RenewalSettings", renewalSettings()) .add("ReservationId", reservationId()).add("ResourceSpecification", resourceSpecification()) .add("Start", start()).add("State", stateAsString()).add("Tags", hasTags() ? tags() : null) .add("UsagePrice", usagePrice()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Arn": return Optional.ofNullable(clazz.cast(arn())); case "Count": return Optional.ofNullable(clazz.cast(count())); case "CurrencyCode": return Optional.ofNullable(clazz.cast(currencyCode())); case "Duration": return Optional.ofNullable(clazz.cast(duration())); case "DurationUnits": return Optional.ofNullable(clazz.cast(durationUnitsAsString())); case "End": return Optional.ofNullable(clazz.cast(end())); case "FixedPrice": return Optional.ofNullable(clazz.cast(fixedPrice())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "OfferingDescription": return Optional.ofNullable(clazz.cast(offeringDescription())); case "OfferingId": return Optional.ofNullable(clazz.cast(offeringId())); case "OfferingType": return Optional.ofNullable(clazz.cast(offeringTypeAsString())); case "Region": return Optional.ofNullable(clazz.cast(region())); case "RenewalSettings": return Optional.ofNullable(clazz.cast(renewalSettings())); case "ReservationId": return Optional.ofNullable(clazz.cast(reservationId())); case "ResourceSpecification": return Optional.ofNullable(clazz.cast(resourceSpecification())); case "Start": return Optional.ofNullable(clazz.cast(start())); case "State": return Optional.ofNullable(clazz.cast(stateAsString())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "UsagePrice": return Optional.ofNullable(clazz.cast(usagePrice())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((DeleteReservationResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends MediaLiveResponse.Builder, SdkPojo, CopyableBuilder { /** * Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567' * * @param arn * Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567' * @return Returns a reference to this object so that method calls can be chained together. */ Builder arn(String arn); /** * Number of reserved resources * * @param count * Number of reserved resources * @return Returns a reference to this object so that method calls can be chained together. */ Builder count(Integer count); /** * Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD' * * @param currencyCode * Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD' * @return Returns a reference to this object so that method calls can be chained together. */ Builder currencyCode(String currencyCode); /** * Lease duration, e.g. '12' * * @param duration * Lease duration, e.g. '12' * @return Returns a reference to this object so that method calls can be chained together. */ Builder duration(Integer duration); /** * Units for duration, e.g. 'MONTHS' * * @param durationUnits * Units for duration, e.g. 'MONTHS' * @see OfferingDurationUnits * @return Returns a reference to this object so that method calls can be chained together. * @see OfferingDurationUnits */ Builder durationUnits(String durationUnits); /** * Units for duration, e.g. 'MONTHS' * * @param durationUnits * Units for duration, e.g. 'MONTHS' * @see OfferingDurationUnits * @return Returns a reference to this object so that method calls can be chained together. * @see OfferingDurationUnits */ Builder durationUnits(OfferingDurationUnits durationUnits); /** * Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00' * * @param end * Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00' * @return Returns a reference to this object so that method calls can be chained together. */ Builder end(String end); /** * One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering * * @param fixedPrice * One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering * @return Returns a reference to this object so that method calls can be chained together. */ Builder fixedPrice(Double fixedPrice); /** * User specified reservation name * * @param name * User specified reservation name * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** * Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ in US West (Oregon)' * * @param offeringDescription * Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ in US West (Oregon)' * @return Returns a reference to this object so that method calls can be chained together. */ Builder offeringDescription(String offeringDescription); /** * Unique offering ID, e.g. '87654321' * * @param offeringId * Unique offering ID, e.g. '87654321' * @return Returns a reference to this object so that method calls can be chained together. */ Builder offeringId(String offeringId); /** * Offering type, e.g. 'NO_UPFRONT' * * @param offeringType * Offering type, e.g. 'NO_UPFRONT' * @see OfferingType * @return Returns a reference to this object so that method calls can be chained together. * @see OfferingType */ Builder offeringType(String offeringType); /** * Offering type, e.g. 'NO_UPFRONT' * * @param offeringType * Offering type, e.g. 'NO_UPFRONT' * @see OfferingType * @return Returns a reference to this object so that method calls can be chained together. * @see OfferingType */ Builder offeringType(OfferingType offeringType); /** * AWS region, e.g. 'us-west-2' * * @param region * AWS region, e.g. 'us-west-2' * @return Returns a reference to this object so that method calls can be chained together. */ Builder region(String region); /** * Renewal settings for the reservation * * @param renewalSettings * Renewal settings for the reservation * @return Returns a reference to this object so that method calls can be chained together. */ Builder renewalSettings(RenewalSettings renewalSettings); /** * Renewal settings for the reservation This is a convenience method that creates an instance of the * {@link RenewalSettings.Builder} avoiding the need to create one manually via * {@link RenewalSettings#builder()}. * *

* When the {@link Consumer} completes, {@link RenewalSettings.Builder#build()} is called immediately and its * result is passed to {@link #renewalSettings(RenewalSettings)}. * * @param renewalSettings * a consumer that will call methods on {@link RenewalSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #renewalSettings(RenewalSettings) */ default Builder renewalSettings(Consumer renewalSettings) { return renewalSettings(RenewalSettings.builder().applyMutation(renewalSettings).build()); } /** * Unique reservation ID, e.g. '1234567' * * @param reservationId * Unique reservation ID, e.g. '1234567' * @return Returns a reference to this object so that method calls can be chained together. */ Builder reservationId(String reservationId); /** * Resource configuration details * * @param resourceSpecification * Resource configuration details * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceSpecification(ReservationResourceSpecification resourceSpecification); /** * Resource configuration details This is a convenience method that creates an instance of the * {@link ReservationResourceSpecification.Builder} avoiding the need to create one manually via * {@link ReservationResourceSpecification#builder()}. * *

* When the {@link Consumer} completes, {@link ReservationResourceSpecification.Builder#build()} is called * immediately and its result is passed to {@link #resourceSpecification(ReservationResourceSpecification)}. * * @param resourceSpecification * a consumer that will call methods on {@link ReservationResourceSpecification.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #resourceSpecification(ReservationResourceSpecification) */ default Builder resourceSpecification(Consumer resourceSpecification) { return resourceSpecification(ReservationResourceSpecification.builder().applyMutation(resourceSpecification).build()); } /** * Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00' * * @param start * Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00' * @return Returns a reference to this object so that method calls can be chained together. */ Builder start(String start); /** * Current state of reservation, e.g. 'ACTIVE' * * @param state * Current state of reservation, e.g. 'ACTIVE' * @see ReservationState * @return Returns a reference to this object so that method calls can be chained together. * @see ReservationState */ Builder state(String state); /** * Current state of reservation, e.g. 'ACTIVE' * * @param state * Current state of reservation, e.g. 'ACTIVE' * @see ReservationState * @return Returns a reference to this object so that method calls can be chained together. * @see ReservationState */ Builder state(ReservationState state); /** * A collection of key-value pairs * * @param tags * A collection of key-value pairs * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Map tags); /** * Recurring usage charge for each reserved resource, e.g. '157.0' * * @param usagePrice * Recurring usage charge for each reserved resource, e.g. '157.0' * @return Returns a reference to this object so that method calls can be chained together. */ Builder usagePrice(Double usagePrice); } static final class BuilderImpl extends MediaLiveResponse.BuilderImpl implements Builder { private String arn; private Integer count; private String currencyCode; private Integer duration; private String durationUnits; private String end; private Double fixedPrice; private String name; private String offeringDescription; private String offeringId; private String offeringType; private String region; private RenewalSettings renewalSettings; private String reservationId; private ReservationResourceSpecification resourceSpecification; private String start; private String state; private Map tags = DefaultSdkAutoConstructMap.getInstance(); private Double usagePrice; private BuilderImpl() { } private BuilderImpl(DeleteReservationResponse model) { super(model); arn(model.arn); count(model.count); currencyCode(model.currencyCode); duration(model.duration); durationUnits(model.durationUnits); end(model.end); fixedPrice(model.fixedPrice); name(model.name); offeringDescription(model.offeringDescription); offeringId(model.offeringId); offeringType(model.offeringType); region(model.region); renewalSettings(model.renewalSettings); reservationId(model.reservationId); resourceSpecification(model.resourceSpecification); start(model.start); state(model.state); tags(model.tags); usagePrice(model.usagePrice); } public final String getArn() { return arn; } public final void setArn(String arn) { this.arn = arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } public final Integer getCount() { return count; } public final void setCount(Integer count) { this.count = count; } @Override public final Builder count(Integer count) { this.count = count; return this; } public final String getCurrencyCode() { return currencyCode; } public final void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } @Override public final Builder currencyCode(String currencyCode) { this.currencyCode = currencyCode; return this; } public final Integer getDuration() { return duration; } public final void setDuration(Integer duration) { this.duration = duration; } @Override public final Builder duration(Integer duration) { this.duration = duration; return this; } public final String getDurationUnits() { return durationUnits; } public final void setDurationUnits(String durationUnits) { this.durationUnits = durationUnits; } @Override public final Builder durationUnits(String durationUnits) { this.durationUnits = durationUnits; return this; } @Override public final Builder durationUnits(OfferingDurationUnits durationUnits) { this.durationUnits(durationUnits == null ? null : durationUnits.toString()); return this; } public final String getEnd() { return end; } public final void setEnd(String end) { this.end = end; } @Override public final Builder end(String end) { this.end = end; return this; } public final Double getFixedPrice() { return fixedPrice; } public final void setFixedPrice(Double fixedPrice) { this.fixedPrice = fixedPrice; } @Override public final Builder fixedPrice(Double fixedPrice) { this.fixedPrice = fixedPrice; return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final String getOfferingDescription() { return offeringDescription; } public final void setOfferingDescription(String offeringDescription) { this.offeringDescription = offeringDescription; } @Override public final Builder offeringDescription(String offeringDescription) { this.offeringDescription = offeringDescription; return this; } public final String getOfferingId() { return offeringId; } public final void setOfferingId(String offeringId) { this.offeringId = offeringId; } @Override public final Builder offeringId(String offeringId) { this.offeringId = offeringId; return this; } public final String getOfferingType() { return offeringType; } public final void setOfferingType(String offeringType) { this.offeringType = offeringType; } @Override public final Builder offeringType(String offeringType) { this.offeringType = offeringType; return this; } @Override public final Builder offeringType(OfferingType offeringType) { this.offeringType(offeringType == null ? null : offeringType.toString()); return this; } public final String getRegion() { return region; } public final void setRegion(String region) { this.region = region; } @Override public final Builder region(String region) { this.region = region; return this; } public final RenewalSettings.Builder getRenewalSettings() { return renewalSettings != null ? renewalSettings.toBuilder() : null; } public final void setRenewalSettings(RenewalSettings.BuilderImpl renewalSettings) { this.renewalSettings = renewalSettings != null ? renewalSettings.build() : null; } @Override public final Builder renewalSettings(RenewalSettings renewalSettings) { this.renewalSettings = renewalSettings; return this; } public final String getReservationId() { return reservationId; } public final void setReservationId(String reservationId) { this.reservationId = reservationId; } @Override public final Builder reservationId(String reservationId) { this.reservationId = reservationId; return this; } public final ReservationResourceSpecification.Builder getResourceSpecification() { return resourceSpecification != null ? resourceSpecification.toBuilder() : null; } public final void setResourceSpecification(ReservationResourceSpecification.BuilderImpl resourceSpecification) { this.resourceSpecification = resourceSpecification != null ? resourceSpecification.build() : null; } @Override public final Builder resourceSpecification(ReservationResourceSpecification resourceSpecification) { this.resourceSpecification = resourceSpecification; return this; } public final String getStart() { return start; } public final void setStart(String start) { this.start = start; } @Override public final Builder start(String start) { this.start = start; return this; } public final String getState() { return state; } public final void setState(String state) { this.state = state; } @Override public final Builder state(String state) { this.state = state; return this; } @Override public final Builder state(ReservationState state) { this.state(state == null ? null : state.toString()); return this; } public final Map getTags() { if (tags instanceof SdkAutoConstructMap) { return null; } return tags; } public final void setTags(Map tags) { this.tags = TagsCopier.copy(tags); } @Override public final Builder tags(Map tags) { this.tags = TagsCopier.copy(tags); return this; } public final Double getUsagePrice() { return usagePrice; } public final void setUsagePrice(Double usagePrice) { this.usagePrice = usagePrice; } @Override public final Builder usagePrice(Double usagePrice) { this.usagePrice = usagePrice; return this; } @Override public DeleteReservationResponse build() { return new DeleteReservationResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy