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

software.amazon.awssdk.services.medialive.model.ListReservationsRequest 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.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;

/**
 * Placeholder documentation for ListReservationsRequest
 */
@Generated("software.amazon.awssdk:codegen")
public final class ListReservationsRequest extends MediaLiveRequest implements
        ToCopyableBuilder {
    private static final SdkField CHANNEL_CLASS_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ChannelClass").getter(getter(ListReservationsRequest::channelClass))
            .setter(setter(Builder::channelClass))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("channelClass").build()).build();

    private static final SdkField CODEC_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Codec")
            .getter(getter(ListReservationsRequest::codec)).setter(setter(Builder::codec))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("codec").build()).build();

    private static final SdkField MAX_RESULTS_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("MaxResults").getter(getter(ListReservationsRequest::maxResults)).setter(setter(Builder::maxResults))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("maxResults").build()).build();

    private static final SdkField MAXIMUM_BITRATE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("MaximumBitrate").getter(getter(ListReservationsRequest::maximumBitrate))
            .setter(setter(Builder::maximumBitrate))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("maximumBitrate").build())
            .build();

    private static final SdkField MAXIMUM_FRAMERATE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("MaximumFramerate").getter(getter(ListReservationsRequest::maximumFramerate))
            .setter(setter(Builder::maximumFramerate))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("maximumFramerate").build())
            .build();

    private static final SdkField NEXT_TOKEN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("NextToken").getter(getter(ListReservationsRequest::nextToken)).setter(setter(Builder::nextToken))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("nextToken").build()).build();

    private static final SdkField RESOLUTION_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("Resolution").getter(getter(ListReservationsRequest::resolution)).setter(setter(Builder::resolution))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("resolution").build()).build();

    private static final SdkField RESOURCE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ResourceType").getter(getter(ListReservationsRequest::resourceType))
            .setter(setter(Builder::resourceType))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("resourceType").build()).build();

    private static final SdkField SPECIAL_FEATURE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("SpecialFeature").getter(getter(ListReservationsRequest::specialFeature))
            .setter(setter(Builder::specialFeature))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("specialFeature").build())
            .build();

    private static final SdkField VIDEO_QUALITY_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("VideoQuality").getter(getter(ListReservationsRequest::videoQuality))
            .setter(setter(Builder::videoQuality))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("videoQuality").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CHANNEL_CLASS_FIELD,
            CODEC_FIELD, MAX_RESULTS_FIELD, MAXIMUM_BITRATE_FIELD, MAXIMUM_FRAMERATE_FIELD, NEXT_TOKEN_FIELD, RESOLUTION_FIELD,
            RESOURCE_TYPE_FIELD, SPECIAL_FEATURE_FIELD, VIDEO_QUALITY_FIELD));

    private final String channelClass;

    private final String codec;

    private final Integer maxResults;

    private final String maximumBitrate;

    private final String maximumFramerate;

    private final String nextToken;

    private final String resolution;

    private final String resourceType;

    private final String specialFeature;

    private final String videoQuality;

    private ListReservationsRequest(BuilderImpl builder) {
        super(builder);
        this.channelClass = builder.channelClass;
        this.codec = builder.codec;
        this.maxResults = builder.maxResults;
        this.maximumBitrate = builder.maximumBitrate;
        this.maximumFramerate = builder.maximumFramerate;
        this.nextToken = builder.nextToken;
        this.resolution = builder.resolution;
        this.resourceType = builder.resourceType;
        this.specialFeature = builder.specialFeature;
        this.videoQuality = builder.videoQuality;
    }

    /**
     * Filter by channel class, 'STANDARD' or 'SINGLE_PIPELINE'
     *
     * @return Filter by channel class, 'STANDARD' or 'SINGLE_PIPELINE'
     */
    public final String channelClass() {
        return channelClass;
    }

    /**
     * Filter by codec, 'AVC', 'HEVC', 'MPEG2', 'AUDIO', or 'LINK'
     * 
     * @return Filter by codec, 'AVC', 'HEVC', 'MPEG2', 'AUDIO', or 'LINK'
     */
    public final String codec() {
        return codec;
    }

    /**
     * Returns the value of the MaxResults property for this object.
     * 
     * @return The value of the MaxResults property for this object.
     */
    public final Integer maxResults() {
        return maxResults;
    }

    /**
     * Filter by bitrate, 'MAX_10_MBPS', 'MAX_20_MBPS', or 'MAX_50_MBPS'
     *
     * @return Filter by bitrate, 'MAX_10_MBPS', 'MAX_20_MBPS', or 'MAX_50_MBPS'
     */
    public final String maximumBitrate() {
        return maximumBitrate;
    }

    /**
     * Filter by framerate, 'MAX_30_FPS' or 'MAX_60_FPS'
     * 
     * @return Filter by framerate, 'MAX_30_FPS' or 'MAX_60_FPS'
     */
    public final String maximumFramerate() {
        return maximumFramerate;
    }

    /**
     * Returns the value of the NextToken property for this object.
     * 
     * @return The value of the NextToken property for this object.
     */
    public final String nextToken() {
        return nextToken;
    }

    /**
     * Filter by resolution, 'SD', 'HD', 'FHD', or 'UHD'
     * 
     * @return Filter by resolution, 'SD', 'HD', 'FHD', or 'UHD'
     */
    public final String resolution() {
        return resolution;
    }

    /**
     * Filter by resource type, 'INPUT', 'OUTPUT', 'MULTIPLEX', or 'CHANNEL'
     * 
     * @return Filter by resource type, 'INPUT', 'OUTPUT', 'MULTIPLEX', or 'CHANNEL'
     */
    public final String resourceType() {
        return resourceType;
    }

    /**
     * Filter by special feature, 'ADVANCED_AUDIO' or 'AUDIO_NORMALIZATION'
     *
     * @return Filter by special feature, 'ADVANCED_AUDIO' or 'AUDIO_NORMALIZATION'
     */
    public final String specialFeature() {
        return specialFeature;
    }

    /**
     * Filter by video quality, 'STANDARD', 'ENHANCED', or 'PREMIUM'
     *
     * @return Filter by video quality, 'STANDARD', 'ENHANCED', or 'PREMIUM'
     */
    public final String videoQuality() {
        return videoQuality;
    }

    @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(channelClass());
        hashCode = 31 * hashCode + Objects.hashCode(codec());
        hashCode = 31 * hashCode + Objects.hashCode(maxResults());
        hashCode = 31 * hashCode + Objects.hashCode(maximumBitrate());
        hashCode = 31 * hashCode + Objects.hashCode(maximumFramerate());
        hashCode = 31 * hashCode + Objects.hashCode(nextToken());
        hashCode = 31 * hashCode + Objects.hashCode(resolution());
        hashCode = 31 * hashCode + Objects.hashCode(resourceType());
        hashCode = 31 * hashCode + Objects.hashCode(specialFeature());
        hashCode = 31 * hashCode + Objects.hashCode(videoQuality());
        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 ListReservationsRequest)) {
            return false;
        }
        ListReservationsRequest other = (ListReservationsRequest) obj;
        return Objects.equals(channelClass(), other.channelClass()) && Objects.equals(codec(), other.codec())
                && Objects.equals(maxResults(), other.maxResults()) && Objects.equals(maximumBitrate(), other.maximumBitrate())
                && Objects.equals(maximumFramerate(), other.maximumFramerate()) && Objects.equals(nextToken(), other.nextToken())
                && Objects.equals(resolution(), other.resolution()) && Objects.equals(resourceType(), other.resourceType())
                && Objects.equals(specialFeature(), other.specialFeature())
                && Objects.equals(videoQuality(), other.videoQuality());
    }

    /**
     * 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("ListReservationsRequest").add("ChannelClass", channelClass()).add("Codec", codec())
                .add("MaxResults", maxResults()).add("MaximumBitrate", maximumBitrate())
                .add("MaximumFramerate", maximumFramerate()).add("NextToken", nextToken()).add("Resolution", resolution())
                .add("ResourceType", resourceType()).add("SpecialFeature", specialFeature()).add("VideoQuality", videoQuality())
                .build();
    }

    public final  Optional getValueForField(String fieldName, Class clazz) {
        switch (fieldName) {
        case "ChannelClass":
            return Optional.ofNullable(clazz.cast(channelClass()));
        case "Codec":
            return Optional.ofNullable(clazz.cast(codec()));
        case "MaxResults":
            return Optional.ofNullable(clazz.cast(maxResults()));
        case "MaximumBitrate":
            return Optional.ofNullable(clazz.cast(maximumBitrate()));
        case "MaximumFramerate":
            return Optional.ofNullable(clazz.cast(maximumFramerate()));
        case "NextToken":
            return Optional.ofNullable(clazz.cast(nextToken()));
        case "Resolution":
            return Optional.ofNullable(clazz.cast(resolution()));
        case "ResourceType":
            return Optional.ofNullable(clazz.cast(resourceType()));
        case "SpecialFeature":
            return Optional.ofNullable(clazz.cast(specialFeature()));
        case "VideoQuality":
            return Optional.ofNullable(clazz.cast(videoQuality()));
        default:
            return Optional.empty();
        }
    }

    @Override
    public final List> sdkFields() {
        return SDK_FIELDS;
    }

    private static  Function getter(Function g) {
        return obj -> g.apply((ListReservationsRequest) obj);
    }

    private static  BiConsumer setter(BiConsumer s) {
        return (obj, val) -> s.accept((Builder) obj, val);
    }

    public interface Builder extends MediaLiveRequest.Builder, SdkPojo, CopyableBuilder {
        /**
         * Filter by channel class, 'STANDARD' or 'SINGLE_PIPELINE'
         *
         * @param channelClass
         *        Filter by channel class, 'STANDARD' or 'SINGLE_PIPELINE'
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder channelClass(String channelClass);

        /**
         * Filter by codec, 'AVC', 'HEVC', 'MPEG2', 'AUDIO', or 'LINK'
         * 
         * @param codec
         *        Filter by codec, 'AVC', 'HEVC', 'MPEG2', 'AUDIO', or 'LINK'
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder codec(String codec);

        /**
         * Sets the value of the MaxResults property for this object.
         *
         * @param maxResults
         *        The new value for the MaxResults property for this object.
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder maxResults(Integer maxResults);

        /**
         * Filter by bitrate, 'MAX_10_MBPS', 'MAX_20_MBPS', or 'MAX_50_MBPS'
         *
         * @param maximumBitrate
         *        Filter by bitrate, 'MAX_10_MBPS', 'MAX_20_MBPS', or 'MAX_50_MBPS'
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder maximumBitrate(String maximumBitrate);

        /**
         * Filter by framerate, 'MAX_30_FPS' or 'MAX_60_FPS'
         * 
         * @param maximumFramerate
         *        Filter by framerate, 'MAX_30_FPS' or 'MAX_60_FPS'
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder maximumFramerate(String maximumFramerate);

        /**
         * Sets the value of the NextToken property for this object.
         *
         * @param nextToken
         *        The new value for the NextToken property for this object.
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder nextToken(String nextToken);

        /**
         * Filter by resolution, 'SD', 'HD', 'FHD', or 'UHD'
         * 
         * @param resolution
         *        Filter by resolution, 'SD', 'HD', 'FHD', or 'UHD'
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder resolution(String resolution);

        /**
         * Filter by resource type, 'INPUT', 'OUTPUT', 'MULTIPLEX', or 'CHANNEL'
         * 
         * @param resourceType
         *        Filter by resource type, 'INPUT', 'OUTPUT', 'MULTIPLEX', or 'CHANNEL'
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder resourceType(String resourceType);

        /**
         * Filter by special feature, 'ADVANCED_AUDIO' or 'AUDIO_NORMALIZATION'
         *
         * @param specialFeature
         *        Filter by special feature, 'ADVANCED_AUDIO' or 'AUDIO_NORMALIZATION'
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder specialFeature(String specialFeature);

        /**
         * Filter by video quality, 'STANDARD', 'ENHANCED', or 'PREMIUM'
         *
         * @param videoQuality
         *        Filter by video quality, 'STANDARD', 'ENHANCED', or 'PREMIUM'
         * @return Returns a reference to this object so that method calls can be chained together.
         */
        Builder videoQuality(String videoQuality);

        @Override
        Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);

        @Override
        Builder overrideConfiguration(Consumer builderConsumer);
    }

    static final class BuilderImpl extends MediaLiveRequest.BuilderImpl implements Builder {
        private String channelClass;

        private String codec;

        private Integer maxResults;

        private String maximumBitrate;

        private String maximumFramerate;

        private String nextToken;

        private String resolution;

        private String resourceType;

        private String specialFeature;

        private String videoQuality;

        private BuilderImpl() {
        }

        private BuilderImpl(ListReservationsRequest model) {
            super(model);
            channelClass(model.channelClass);
            codec(model.codec);
            maxResults(model.maxResults);
            maximumBitrate(model.maximumBitrate);
            maximumFramerate(model.maximumFramerate);
            nextToken(model.nextToken);
            resolution(model.resolution);
            resourceType(model.resourceType);
            specialFeature(model.specialFeature);
            videoQuality(model.videoQuality);
        }

        public final String getChannelClass() {
            return channelClass;
        }

        public final void setChannelClass(String channelClass) {
            this.channelClass = channelClass;
        }

        @Override
        public final Builder channelClass(String channelClass) {
            this.channelClass = channelClass;
            return this;
        }

        public final String getCodec() {
            return codec;
        }

        public final void setCodec(String codec) {
            this.codec = codec;
        }

        @Override
        public final Builder codec(String codec) {
            this.codec = codec;
            return this;
        }

        public final Integer getMaxResults() {
            return maxResults;
        }

        public final void setMaxResults(Integer maxResults) {
            this.maxResults = maxResults;
        }

        @Override
        public final Builder maxResults(Integer maxResults) {
            this.maxResults = maxResults;
            return this;
        }

        public final String getMaximumBitrate() {
            return maximumBitrate;
        }

        public final void setMaximumBitrate(String maximumBitrate) {
            this.maximumBitrate = maximumBitrate;
        }

        @Override
        public final Builder maximumBitrate(String maximumBitrate) {
            this.maximumBitrate = maximumBitrate;
            return this;
        }

        public final String getMaximumFramerate() {
            return maximumFramerate;
        }

        public final void setMaximumFramerate(String maximumFramerate) {
            this.maximumFramerate = maximumFramerate;
        }

        @Override
        public final Builder maximumFramerate(String maximumFramerate) {
            this.maximumFramerate = maximumFramerate;
            return this;
        }

        public final String getNextToken() {
            return nextToken;
        }

        public final void setNextToken(String nextToken) {
            this.nextToken = nextToken;
        }

        @Override
        public final Builder nextToken(String nextToken) {
            this.nextToken = nextToken;
            return this;
        }

        public final String getResolution() {
            return resolution;
        }

        public final void setResolution(String resolution) {
            this.resolution = resolution;
        }

        @Override
        public final Builder resolution(String resolution) {
            this.resolution = resolution;
            return this;
        }

        public final String getResourceType() {
            return resourceType;
        }

        public final void setResourceType(String resourceType) {
            this.resourceType = resourceType;
        }

        @Override
        public final Builder resourceType(String resourceType) {
            this.resourceType = resourceType;
            return this;
        }

        public final String getSpecialFeature() {
            return specialFeature;
        }

        public final void setSpecialFeature(String specialFeature) {
            this.specialFeature = specialFeature;
        }

        @Override
        public final Builder specialFeature(String specialFeature) {
            this.specialFeature = specialFeature;
            return this;
        }

        public final String getVideoQuality() {
            return videoQuality;
        }

        public final void setVideoQuality(String videoQuality) {
            this.videoQuality = videoQuality;
        }

        @Override
        public final Builder videoQuality(String videoQuality) {
            this.videoQuality = videoQuality;
            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 ListReservationsRequest build() {
            return new ListReservationsRequest(this);
        }

        @Override
        public List> sdkFields() {
            return SDK_FIELDS;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy