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

software.amazon.awssdk.services.mediapackagev2.model.CreateOriginEndpointResponse 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.mediapackagev2.model;

import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
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 java.util.stream.Collectors;
import java.util.stream.Stream;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
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;

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

    private static final SdkField CHANNEL_GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ChannelGroupName").getter(getter(CreateOriginEndpointResponse::channelGroupName))
            .setter(setter(Builder::channelGroupName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ChannelGroupName").build()).build();

    private static final SdkField CHANNEL_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ChannelName").getter(getter(CreateOriginEndpointResponse::channelName))
            .setter(setter(Builder::channelName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ChannelName").build()).build();

    private static final SdkField ORIGIN_ENDPOINT_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("OriginEndpointName").getter(getter(CreateOriginEndpointResponse::originEndpointName))
            .setter(setter(Builder::originEndpointName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OriginEndpointName").build())
            .build();

    private static final SdkField CONTAINER_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ContainerType").getter(getter(CreateOriginEndpointResponse::containerTypeAsString))
            .setter(setter(Builder::containerType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ContainerType").build()).build();

    private static final SdkField SEGMENT_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
            .memberName("Segment").getter(getter(CreateOriginEndpointResponse::segment)).setter(setter(Builder::segment))
            .constructor(Segment::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Segment").build()).build();

    private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("CreatedAt").getter(getter(CreateOriginEndpointResponse::createdAt)).setter(setter(Builder::createdAt))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedAt").build()).build();

    private static final SdkField MODIFIED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("ModifiedAt").getter(getter(CreateOriginEndpointResponse::modifiedAt))
            .setter(setter(Builder::modifiedAt))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModifiedAt").build()).build();

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

    private static final SdkField STARTOVER_WINDOW_SECONDS_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("StartoverWindowSeconds").getter(getter(CreateOriginEndpointResponse::startoverWindowSeconds))
            .setter(setter(Builder::startoverWindowSeconds))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StartoverWindowSeconds").build())
            .build();

    private static final SdkField> HLS_MANIFESTS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("HlsManifests")
            .getter(getter(CreateOriginEndpointResponse::hlsManifests))
            .setter(setter(Builder::hlsManifests))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HlsManifests").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(GetHlsManifestConfiguration::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField> LOW_LATENCY_HLS_MANIFESTS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("LowLatencyHlsManifests")
            .getter(getter(CreateOriginEndpointResponse::lowLatencyHlsManifests))
            .setter(setter(Builder::lowLatencyHlsManifests))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LowLatencyHlsManifests").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(GetLowLatencyHlsManifestConfiguration::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .memberName("Tags")
            .getter(getter(CreateOriginEndpointResponse::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 List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD,
            CHANNEL_GROUP_NAME_FIELD, CHANNEL_NAME_FIELD, ORIGIN_ENDPOINT_NAME_FIELD, CONTAINER_TYPE_FIELD, SEGMENT_FIELD,
            CREATED_AT_FIELD, MODIFIED_AT_FIELD, DESCRIPTION_FIELD, STARTOVER_WINDOW_SECONDS_FIELD, HLS_MANIFESTS_FIELD,
            LOW_LATENCY_HLS_MANIFESTS_FIELD, TAGS_FIELD));

    private final String arn;

    private final String channelGroupName;

    private final String channelName;

    private final String originEndpointName;

    private final String containerType;

    private final Segment segment;

    private final Instant createdAt;

    private final Instant modifiedAt;

    private final String description;

    private final Integer startoverWindowSeconds;

    private final List hlsManifests;

    private final List lowLatencyHlsManifests;

    private final Map tags;

    private CreateOriginEndpointResponse(BuilderImpl builder) {
        super(builder);
        this.arn = builder.arn;
        this.channelGroupName = builder.channelGroupName;
        this.channelName = builder.channelName;
        this.originEndpointName = builder.originEndpointName;
        this.containerType = builder.containerType;
        this.segment = builder.segment;
        this.createdAt = builder.createdAt;
        this.modifiedAt = builder.modifiedAt;
        this.description = builder.description;
        this.startoverWindowSeconds = builder.startoverWindowSeconds;
        this.hlsManifests = builder.hlsManifests;
        this.lowLatencyHlsManifests = builder.lowLatencyHlsManifests;
        this.tags = builder.tags;
    }

    /**
     * 

* The Amazon Resource Name (ARN) associated with the resource. *

* * @return The Amazon Resource Name (ARN) associated with the resource. */ public final String arn() { return arn; } /** *

* The name that describes the channel group. The name is the primary identifier for the channel group, and must be * unique for your account in the AWS Region. *

* * @return The name that describes the channel group. The name is the primary identifier for the channel group, and * must be unique for your account in the AWS Region. */ public final String channelGroupName() { return channelGroupName; } /** *

* The name that describes the channel. The name is the primary identifier for the channel, and must be unique for * your account in the AWS Region and channel group. *

* * @return The name that describes the channel. The name is the primary identifier for the channel, and must be * unique for your account in the AWS Region and channel group. */ public final String channelName() { return channelName; } /** *

* The name that describes the origin endpoint. The name is the primary identifier for the origin endpoint, and and * must be unique for your account in the AWS Region and channel. *

* * @return The name that describes the origin endpoint. The name is the primary identifier for the origin endpoint, * and and must be unique for your account in the AWS Region and channel. */ public final String originEndpointName() { return originEndpointName; } /** *

* The type of container attached to this origin endpoint. *

*

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

* * @return The type of container attached to this origin endpoint. * @see ContainerType */ public final ContainerType containerType() { return ContainerType.fromValue(containerType); } /** *

* The type of container attached to this origin endpoint. *

*

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

* * @return The type of container attached to this origin endpoint. * @see ContainerType */ public final String containerTypeAsString() { return containerType; } /** *

* The segment configuration, including the segment name, duration, and other configuration values. *

* * @return The segment configuration, including the segment name, duration, and other configuration values. */ public final Segment segment() { return segment; } /** *

* The date and time the origin endpoint was created. *

* * @return The date and time the origin endpoint was created. */ public final Instant createdAt() { return createdAt; } /** *

* The date and time the origin endpoint was modified. *

* * @return The date and time the origin endpoint was modified. */ public final Instant modifiedAt() { return modifiedAt; } /** *

* The description for your origin endpoint. *

* * @return The description for your origin endpoint. */ public final String description() { return description; } /** *

* The size of the window (in seconds) to create a window of the live stream that's available for on-demand viewing. * Viewers can start-over or catch-up on content that falls within the window. *

* * @return The size of the window (in seconds) to create a window of the live stream that's available for on-demand * viewing. Viewers can start-over or catch-up on content that falls within the window. */ public final Integer startoverWindowSeconds() { return startoverWindowSeconds; } /** * For responses, this returns true if the service returned a value for the HlsManifests 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 hasHlsManifests() { return hlsManifests != null && !(hlsManifests instanceof SdkAutoConstructList); } /** *

* An HTTP live streaming (HLS) manifest configuration. *

*

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

* * @return An HTTP live streaming (HLS) manifest configuration. */ public final List hlsManifests() { return hlsManifests; } /** * For responses, this returns true if the service returned a value for the LowLatencyHlsManifests 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 hasLowLatencyHlsManifests() { return lowLatencyHlsManifests != null && !(lowLatencyHlsManifests instanceof SdkAutoConstructList); } /** *

* A low-latency HLS manifest configuration. *

*

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

* * @return A low-latency HLS manifest configuration. */ public final List lowLatencyHlsManifests() { return lowLatencyHlsManifests; } /** * 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); } /** *

* The comma-separated list of tag key:value pairs assigned to the origin endpoint. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTags} method. *

* * @return The comma-separated list of tag key:value pairs assigned to the origin endpoint. */ public final Map tags() { return tags; } @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(channelGroupName()); hashCode = 31 * hashCode + Objects.hashCode(channelName()); hashCode = 31 * hashCode + Objects.hashCode(originEndpointName()); hashCode = 31 * hashCode + Objects.hashCode(containerTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(segment()); hashCode = 31 * hashCode + Objects.hashCode(createdAt()); hashCode = 31 * hashCode + Objects.hashCode(modifiedAt()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(startoverWindowSeconds()); hashCode = 31 * hashCode + Objects.hashCode(hasHlsManifests() ? hlsManifests() : null); hashCode = 31 * hashCode + Objects.hashCode(hasLowLatencyHlsManifests() ? lowLatencyHlsManifests() : null); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); 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 CreateOriginEndpointResponse)) { return false; } CreateOriginEndpointResponse other = (CreateOriginEndpointResponse) obj; return Objects.equals(arn(), other.arn()) && Objects.equals(channelGroupName(), other.channelGroupName()) && Objects.equals(channelName(), other.channelName()) && Objects.equals(originEndpointName(), other.originEndpointName()) && Objects.equals(containerTypeAsString(), other.containerTypeAsString()) && Objects.equals(segment(), other.segment()) && Objects.equals(createdAt(), other.createdAt()) && Objects.equals(modifiedAt(), other.modifiedAt()) && Objects.equals(description(), other.description()) && Objects.equals(startoverWindowSeconds(), other.startoverWindowSeconds()) && hasHlsManifests() == other.hasHlsManifests() && Objects.equals(hlsManifests(), other.hlsManifests()) && hasLowLatencyHlsManifests() == other.hasLowLatencyHlsManifests() && Objects.equals(lowLatencyHlsManifests(), other.lowLatencyHlsManifests()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()); } /** * 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("CreateOriginEndpointResponse").add("Arn", arn()).add("ChannelGroupName", channelGroupName()) .add("ChannelName", channelName()).add("OriginEndpointName", originEndpointName()) .add("ContainerType", containerTypeAsString()).add("Segment", segment()).add("CreatedAt", createdAt()) .add("ModifiedAt", modifiedAt()).add("Description", description()) .add("StartoverWindowSeconds", startoverWindowSeconds()) .add("HlsManifests", hasHlsManifests() ? hlsManifests() : null) .add("LowLatencyHlsManifests", hasLowLatencyHlsManifests() ? lowLatencyHlsManifests() : null) .add("Tags", hasTags() ? tags() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Arn": return Optional.ofNullable(clazz.cast(arn())); case "ChannelGroupName": return Optional.ofNullable(clazz.cast(channelGroupName())); case "ChannelName": return Optional.ofNullable(clazz.cast(channelName())); case "OriginEndpointName": return Optional.ofNullable(clazz.cast(originEndpointName())); case "ContainerType": return Optional.ofNullable(clazz.cast(containerTypeAsString())); case "Segment": return Optional.ofNullable(clazz.cast(segment())); case "CreatedAt": return Optional.ofNullable(clazz.cast(createdAt())); case "ModifiedAt": return Optional.ofNullable(clazz.cast(modifiedAt())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "StartoverWindowSeconds": return Optional.ofNullable(clazz.cast(startoverWindowSeconds())); case "HlsManifests": return Optional.ofNullable(clazz.cast(hlsManifests())); case "LowLatencyHlsManifests": return Optional.ofNullable(clazz.cast(lowLatencyHlsManifests())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateOriginEndpointResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends MediaPackageV2Response.Builder, SdkPojo, CopyableBuilder { /** *

* The Amazon Resource Name (ARN) associated with the resource. *

* * @param arn * The Amazon Resource Name (ARN) associated with the resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder arn(String arn); /** *

* The name that describes the channel group. The name is the primary identifier for the channel group, and must * be unique for your account in the AWS Region. *

* * @param channelGroupName * The name that describes the channel group. The name is the primary identifier for the channel group, * and must be unique for your account in the AWS Region. * @return Returns a reference to this object so that method calls can be chained together. */ Builder channelGroupName(String channelGroupName); /** *

* The name that describes the channel. The name is the primary identifier for the channel, and must be unique * for your account in the AWS Region and channel group. *

* * @param channelName * The name that describes the channel. The name is the primary identifier for the channel, and must be * unique for your account in the AWS Region and channel group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder channelName(String channelName); /** *

* The name that describes the origin endpoint. The name is the primary identifier for the origin endpoint, and * and must be unique for your account in the AWS Region and channel. *

* * @param originEndpointName * The name that describes the origin endpoint. The name is the primary identifier for the origin * endpoint, and and must be unique for your account in the AWS Region and channel. * @return Returns a reference to this object so that method calls can be chained together. */ Builder originEndpointName(String originEndpointName); /** *

* The type of container attached to this origin endpoint. *

* * @param containerType * The type of container attached to this origin endpoint. * @see ContainerType * @return Returns a reference to this object so that method calls can be chained together. * @see ContainerType */ Builder containerType(String containerType); /** *

* The type of container attached to this origin endpoint. *

* * @param containerType * The type of container attached to this origin endpoint. * @see ContainerType * @return Returns a reference to this object so that method calls can be chained together. * @see ContainerType */ Builder containerType(ContainerType containerType); /** *

* The segment configuration, including the segment name, duration, and other configuration values. *

* * @param segment * The segment configuration, including the segment name, duration, and other configuration values. * @return Returns a reference to this object so that method calls can be chained together. */ Builder segment(Segment segment); /** *

* The segment configuration, including the segment name, duration, and other configuration values. *

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

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

* The date and time the origin endpoint was created. *

* * @param createdAt * The date and time the origin endpoint was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdAt(Instant createdAt); /** *

* The date and time the origin endpoint was modified. *

* * @param modifiedAt * The date and time the origin endpoint was modified. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modifiedAt(Instant modifiedAt); /** *

* The description for your origin endpoint. *

* * @param description * The description for your origin endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

* The size of the window (in seconds) to create a window of the live stream that's available for on-demand * viewing. Viewers can start-over or catch-up on content that falls within the window. *

* * @param startoverWindowSeconds * The size of the window (in seconds) to create a window of the live stream that's available for * on-demand viewing. Viewers can start-over or catch-up on content that falls within the window. * @return Returns a reference to this object so that method calls can be chained together. */ Builder startoverWindowSeconds(Integer startoverWindowSeconds); /** *

* An HTTP live streaming (HLS) manifest configuration. *

* * @param hlsManifests * An HTTP live streaming (HLS) manifest configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder hlsManifests(Collection hlsManifests); /** *

* An HTTP live streaming (HLS) manifest configuration. *

* * @param hlsManifests * An HTTP live streaming (HLS) manifest configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder hlsManifests(GetHlsManifestConfiguration... hlsManifests); /** *

* An HTTP live streaming (HLS) manifest configuration. *

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

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

* A low-latency HLS manifest configuration. *

* * @param lowLatencyHlsManifests * A low-latency HLS manifest configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lowLatencyHlsManifests(Collection lowLatencyHlsManifests); /** *

* A low-latency HLS manifest configuration. *

* * @param lowLatencyHlsManifests * A low-latency HLS manifest configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lowLatencyHlsManifests(GetLowLatencyHlsManifestConfiguration... lowLatencyHlsManifests); /** *

* A low-latency HLS manifest configuration. *

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

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

* The comma-separated list of tag key:value pairs assigned to the origin endpoint. *

* * @param tags * The comma-separated list of tag key:value pairs assigned to the origin endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Map tags); } static final class BuilderImpl extends MediaPackageV2Response.BuilderImpl implements Builder { private String arn; private String channelGroupName; private String channelName; private String originEndpointName; private String containerType; private Segment segment; private Instant createdAt; private Instant modifiedAt; private String description; private Integer startoverWindowSeconds; private List hlsManifests = DefaultSdkAutoConstructList.getInstance(); private List lowLatencyHlsManifests = DefaultSdkAutoConstructList.getInstance(); private Map tags = DefaultSdkAutoConstructMap.getInstance(); private BuilderImpl() { } private BuilderImpl(CreateOriginEndpointResponse model) { super(model); arn(model.arn); channelGroupName(model.channelGroupName); channelName(model.channelName); originEndpointName(model.originEndpointName); containerType(model.containerType); segment(model.segment); createdAt(model.createdAt); modifiedAt(model.modifiedAt); description(model.description); startoverWindowSeconds(model.startoverWindowSeconds); hlsManifests(model.hlsManifests); lowLatencyHlsManifests(model.lowLatencyHlsManifests); tags(model.tags); } 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 String getChannelGroupName() { return channelGroupName; } public final void setChannelGroupName(String channelGroupName) { this.channelGroupName = channelGroupName; } @Override public final Builder channelGroupName(String channelGroupName) { this.channelGroupName = channelGroupName; return this; } public final String getChannelName() { return channelName; } public final void setChannelName(String channelName) { this.channelName = channelName; } @Override public final Builder channelName(String channelName) { this.channelName = channelName; return this; } public final String getOriginEndpointName() { return originEndpointName; } public final void setOriginEndpointName(String originEndpointName) { this.originEndpointName = originEndpointName; } @Override public final Builder originEndpointName(String originEndpointName) { this.originEndpointName = originEndpointName; return this; } public final String getContainerType() { return containerType; } public final void setContainerType(String containerType) { this.containerType = containerType; } @Override public final Builder containerType(String containerType) { this.containerType = containerType; return this; } @Override public final Builder containerType(ContainerType containerType) { this.containerType(containerType == null ? null : containerType.toString()); return this; } public final Segment.Builder getSegment() { return segment != null ? segment.toBuilder() : null; } public final void setSegment(Segment.BuilderImpl segment) { this.segment = segment != null ? segment.build() : null; } @Override public final Builder segment(Segment segment) { this.segment = segment; return this; } public final Instant getCreatedAt() { return createdAt; } public final void setCreatedAt(Instant createdAt) { this.createdAt = createdAt; } @Override public final Builder createdAt(Instant createdAt) { this.createdAt = createdAt; return this; } public final Instant getModifiedAt() { return modifiedAt; } public final void setModifiedAt(Instant modifiedAt) { this.modifiedAt = modifiedAt; } @Override public final Builder modifiedAt(Instant modifiedAt) { this.modifiedAt = modifiedAt; 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 Integer getStartoverWindowSeconds() { return startoverWindowSeconds; } public final void setStartoverWindowSeconds(Integer startoverWindowSeconds) { this.startoverWindowSeconds = startoverWindowSeconds; } @Override public final Builder startoverWindowSeconds(Integer startoverWindowSeconds) { this.startoverWindowSeconds = startoverWindowSeconds; return this; } public final List getHlsManifests() { List result = GetHlsManifestsCopier.copyToBuilder(this.hlsManifests); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setHlsManifests(Collection hlsManifests) { this.hlsManifests = GetHlsManifestsCopier.copyFromBuilder(hlsManifests); } @Override public final Builder hlsManifests(Collection hlsManifests) { this.hlsManifests = GetHlsManifestsCopier.copy(hlsManifests); return this; } @Override @SafeVarargs public final Builder hlsManifests(GetHlsManifestConfiguration... hlsManifests) { hlsManifests(Arrays.asList(hlsManifests)); return this; } @Override @SafeVarargs public final Builder hlsManifests(Consumer... hlsManifests) { hlsManifests(Stream.of(hlsManifests).map(c -> GetHlsManifestConfiguration.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final List getLowLatencyHlsManifests() { List result = GetLowLatencyHlsManifestsCopier .copyToBuilder(this.lowLatencyHlsManifests); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setLowLatencyHlsManifests( Collection lowLatencyHlsManifests) { this.lowLatencyHlsManifests = GetLowLatencyHlsManifestsCopier.copyFromBuilder(lowLatencyHlsManifests); } @Override public final Builder lowLatencyHlsManifests(Collection lowLatencyHlsManifests) { this.lowLatencyHlsManifests = GetLowLatencyHlsManifestsCopier.copy(lowLatencyHlsManifests); return this; } @Override @SafeVarargs public final Builder lowLatencyHlsManifests(GetLowLatencyHlsManifestConfiguration... lowLatencyHlsManifests) { lowLatencyHlsManifests(Arrays.asList(lowLatencyHlsManifests)); return this; } @Override @SafeVarargs public final Builder lowLatencyHlsManifests( Consumer... lowLatencyHlsManifests) { lowLatencyHlsManifests(Stream.of(lowLatencyHlsManifests) .map(c -> GetLowLatencyHlsManifestConfiguration.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final Map getTags() { if (tags instanceof SdkAutoConstructMap) { return null; } return tags; } public final void setTags(Map tags) { this.tags = TagMapCopier.copy(tags); } @Override public final Builder tags(Map tags) { this.tags = TagMapCopier.copy(tags); return this; } @Override public CreateOriginEndpointResponse build() { return new CreateOriginEndpointResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy