Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.mediapackagev2.model.CreateOriginEndpointRequest 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.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.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.DefaultValueTrait;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.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 CreateOriginEndpointRequest extends MediaPackageV2Request implements
ToCopyableBuilder {
private static final SdkField CHANNEL_GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ChannelGroupName").getter(getter(CreateOriginEndpointRequest::channelGroupName))
.setter(setter(Builder::channelGroupName))
.traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("ChannelGroupName").build()).build();
private static final SdkField CHANNEL_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ChannelName").getter(getter(CreateOriginEndpointRequest::channelName))
.setter(setter(Builder::channelName))
.traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("ChannelName").build()).build();
private static final SdkField ORIGIN_ENDPOINT_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("OriginEndpointName").getter(getter(CreateOriginEndpointRequest::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(CreateOriginEndpointRequest::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(CreateOriginEndpointRequest::segment)).setter(setter(Builder::segment))
.constructor(Segment::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Segment").build()).build();
private static final SdkField CLIENT_TOKEN_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("ClientToken")
.getter(getter(CreateOriginEndpointRequest::clientToken))
.setter(setter(Builder::clientToken))
.traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("x-amzn-client-token").build(),
DefaultValueTrait.idempotencyToken()).build();
private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Description").getter(getter(CreateOriginEndpointRequest::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(CreateOriginEndpointRequest::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(CreateOriginEndpointRequest::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(CreateHlsManifestConfiguration::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(CreateOriginEndpointRequest::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(CreateLowLatencyHlsManifestConfiguration::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(CreateOriginEndpointRequest::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(CHANNEL_GROUP_NAME_FIELD,
CHANNEL_NAME_FIELD, ORIGIN_ENDPOINT_NAME_FIELD, CONTAINER_TYPE_FIELD, SEGMENT_FIELD, CLIENT_TOKEN_FIELD,
DESCRIPTION_FIELD, STARTOVER_WINDOW_SECONDS_FIELD, HLS_MANIFESTS_FIELD, LOW_LATENCY_HLS_MANIFESTS_FIELD, TAGS_FIELD));
private final String channelGroupName;
private final String channelName;
private final String originEndpointName;
private final String containerType;
private final Segment segment;
private final String clientToken;
private final String description;
private final Integer startoverWindowSeconds;
private final List hlsManifests;
private final List lowLatencyHlsManifests;
private final Map tags;
private CreateOriginEndpointRequest(BuilderImpl builder) {
super(builder);
this.channelGroupName = builder.channelGroupName;
this.channelName = builder.channelName;
this.originEndpointName = builder.originEndpointName;
this.containerType = builder.containerType;
this.segment = builder.segment;
this.clientToken = builder.clientToken;
this.description = builder.description;
this.startoverWindowSeconds = builder.startoverWindowSeconds;
this.hlsManifests = builder.hlsManifests;
this.lowLatencyHlsManifests = builder.lowLatencyHlsManifests;
this.tags = builder.tags;
}
/**
*
* 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 must
* be unique for your account in the AWS Region and channel. You can't use spaces in the name. You can't change the
* name after you create the endpoint.
*
*
* @return The name that describes the origin endpoint. The name is the primary identifier for the origin endpoint,
* and must be unique for your account in the AWS Region and channel. You can't use spaces in the name. You
* can't change the name after you create the endpoint.
*/
public final String originEndpointName() {
return originEndpointName;
}
/**
*
* The type of container to attach to this origin endpoint. A container type is a file format that encapsulates one
* or more media streams, such as audio and video, into a single file. You can't change the container type after you
* create the 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 to attach to this origin endpoint. A container type is a file format that
* encapsulates one or more media streams, such as audio and video, into a single file. You can't change the
* container type after you create the endpoint.
* @see ContainerType
*/
public final ContainerType containerType() {
return ContainerType.fromValue(containerType);
}
/**
*
* The type of container to attach to this origin endpoint. A container type is a file format that encapsulates one
* or more media streams, such as audio and video, into a single file. You can't change the container type after you
* create the 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 to attach to this origin endpoint. A container type is a file format that
* encapsulates one or more media streams, such as audio and video, into a single file. You can't change the
* container type after you create the 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;
}
/**
*
* A unique, case-sensitive token that you provide to ensure the idempotency of the request.
*
*
* @return A unique, case-sensitive token that you provide to ensure the idempotency of the request.
*/
public final String clientToken() {
return clientToken;
}
/**
*
* Enter any descriptive text that helps you to identify the origin endpoint.
*
*
* @return Enter any descriptive text that helps you to identify the 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. The maximum startover window is
* 1,209,600 seconds (14 days).
*
*
* @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. The maximum
* startover window is 1,209,600 seconds (14 days).
*/
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);
}
/**
*
* A comma-separated list of tag key:value pairs that you define. For example:
*
*
* "Key1": "Value1",
*
*
* "Key2": "Value2"
*
*
* 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 comma-separated list of tag key:value pairs that you define. For example:
*
* "Key1": "Value1",
*
*
* "Key2": "Value2"
*/
public final Map tags() {
return tags;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
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(clientToken());
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 CreateOriginEndpointRequest)) {
return false;
}
CreateOriginEndpointRequest other = (CreateOriginEndpointRequest) obj;
return 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(clientToken(), other.clientToken())
&& 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("CreateOriginEndpointRequest").add("ChannelGroupName", channelGroupName())
.add("ChannelName", channelName()).add("OriginEndpointName", originEndpointName())
.add("ContainerType", containerTypeAsString()).add("Segment", segment()).add("ClientToken", clientToken())
.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 "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 "ClientToken":
return Optional.ofNullable(clazz.cast(clientToken()));
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((CreateOriginEndpointRequest) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends MediaPackageV2Request.Builder, SdkPojo,
CopyableBuilder {
/**
*
* 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
* must be unique for your account in the AWS Region and channel. You can't use spaces in the name. You can't
* change the name after you create the endpoint.
*
*
* @param originEndpointName
* The name that describes the origin endpoint. The name is the primary identifier for the origin
* endpoint, and must be unique for your account in the AWS Region and channel. You can't use spaces in
* the name. You can't change the name after you create the endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder originEndpointName(String originEndpointName);
/**
*
* The type of container to attach to this origin endpoint. A container type is a file format that encapsulates
* one or more media streams, such as audio and video, into a single file. You can't change the container type
* after you create the endpoint.
*
*
* @param containerType
* The type of container to attach to this origin endpoint. A container type is a file format that
* encapsulates one or more media streams, such as audio and video, into a single file. You can't change
* the container type after you create the 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 to attach to this origin endpoint. A container type is a file format that encapsulates
* one or more media streams, such as audio and video, into a single file. You can't change the container type
* after you create the endpoint.
*
*
* @param containerType
* The type of container to attach to this origin endpoint. A container type is a file format that
* encapsulates one or more media streams, such as audio and video, into a single file. You can't change
* the container type after you create the 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());
}
/**
*
* A unique, case-sensitive token that you provide to ensure the idempotency of the request.
*
*
* @param clientToken
* A unique, case-sensitive token that you provide to ensure the idempotency of the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder clientToken(String clientToken);
/**
*
* Enter any descriptive text that helps you to identify the origin endpoint.
*
*
* @param description
* Enter any descriptive text that helps you to identify the 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. The maximum startover
* window is 1,209,600 seconds (14 days).
*
*
* @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. The
* maximum startover window is 1,209,600 seconds (14 days).
* @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(CreateHlsManifestConfiguration... 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.CreateHlsManifestConfiguration.Builder} avoiding
* the need to create one manually via
* {@link software.amazon.awssdk.services.mediapackagev2.model.CreateHlsManifestConfiguration#builder()}.
*
*
* When the {@link Consumer} completes,
* {@link software.amazon.awssdk.services.mediapackagev2.model.CreateHlsManifestConfiguration.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.CreateHlsManifestConfiguration.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(CreateLowLatencyHlsManifestConfiguration... 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.CreateLowLatencyHlsManifestConfiguration.Builder}
* avoiding the need to create one manually via
* {@link software.amazon.awssdk.services.mediapackagev2.model.CreateLowLatencyHlsManifestConfiguration#builder()}
* .
*
*
* When the {@link Consumer} completes,
* {@link software.amazon.awssdk.services.mediapackagev2.model.CreateLowLatencyHlsManifestConfiguration.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.CreateLowLatencyHlsManifestConfiguration.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);
/**
*
* A comma-separated list of tag key:value pairs that you define. For example:
*
*
* "Key1": "Value1",
*
*
* "Key2": "Value2"
*
*
* @param tags
* A comma-separated list of tag key:value pairs that you define. For example:
*
* "Key1": "Value1",
*
*
* "Key2": "Value2"
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Map tags);
@Override
Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
@Override
Builder overrideConfiguration(Consumer builderConsumer);
}
static final class BuilderImpl extends MediaPackageV2Request.BuilderImpl implements Builder {
private String channelGroupName;
private String channelName;
private String originEndpointName;
private String containerType;
private Segment segment;
private String clientToken;
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(CreateOriginEndpointRequest model) {
super(model);
channelGroupName(model.channelGroupName);
channelName(model.channelName);
originEndpointName(model.originEndpointName);
containerType(model.containerType);
segment(model.segment);
clientToken(model.clientToken);
description(model.description);
startoverWindowSeconds(model.startoverWindowSeconds);
hlsManifests(model.hlsManifests);
lowLatencyHlsManifests(model.lowLatencyHlsManifests);
tags(model.tags);
}
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 String getClientToken() {
return clientToken;
}
public final void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
@Override
public final Builder clientToken(String clientToken) {
this.clientToken = clientToken;
return this;
}
public final 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 = CreateHlsManifestsCopier.copyToBuilder(this.hlsManifests);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setHlsManifests(Collection hlsManifests) {
this.hlsManifests = CreateHlsManifestsCopier.copyFromBuilder(hlsManifests);
}
@Override
public final Builder hlsManifests(Collection hlsManifests) {
this.hlsManifests = CreateHlsManifestsCopier.copy(hlsManifests);
return this;
}
@Override
@SafeVarargs
public final Builder hlsManifests(CreateHlsManifestConfiguration... hlsManifests) {
hlsManifests(Arrays.asList(hlsManifests));
return this;
}
@Override
@SafeVarargs
public final Builder hlsManifests(Consumer... hlsManifests) {
hlsManifests(Stream.of(hlsManifests).map(c -> CreateHlsManifestConfiguration.builder().applyMutation(c).build())
.collect(Collectors.toList()));
return this;
}
public final List getLowLatencyHlsManifests() {
List result = CreateLowLatencyHlsManifestsCopier
.copyToBuilder(this.lowLatencyHlsManifests);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setLowLatencyHlsManifests(
Collection lowLatencyHlsManifests) {
this.lowLatencyHlsManifests = CreateLowLatencyHlsManifestsCopier.copyFromBuilder(lowLatencyHlsManifests);
}
@Override
public final Builder lowLatencyHlsManifests(Collection lowLatencyHlsManifests) {
this.lowLatencyHlsManifests = CreateLowLatencyHlsManifestsCopier.copy(lowLatencyHlsManifests);
return this;
}
@Override
@SafeVarargs
public final Builder lowLatencyHlsManifests(CreateLowLatencyHlsManifestConfiguration... lowLatencyHlsManifests) {
lowLatencyHlsManifests(Arrays.asList(lowLatencyHlsManifests));
return this;
}
@Override
@SafeVarargs
public final Builder lowLatencyHlsManifests(
Consumer... lowLatencyHlsManifests) {
lowLatencyHlsManifests(Stream.of(lowLatencyHlsManifests)
.map(c -> CreateLowLatencyHlsManifestConfiguration.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 Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) {
super.overrideConfiguration(overrideConfiguration);
return this;
}
@Override
public Builder overrideConfiguration(Consumer builderConsumer) {
super.overrideConfiguration(builderConsumer);
return this;
}
@Override
public CreateOriginEndpointRequest build() {
return new CreateOriginEndpointRequest(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}