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.mediapackage.model.CreateOriginEndpointResponse Maven / Gradle / Ivy
Go to download
The AWS Java SDK for AWS Elemental MediaPackage module holds the client classes that are used for
communicating
with AWS Elemental MediaPackage Service
/*
* 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.mediapackage.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 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 MediaPackageResponse 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 AUTHORIZATION_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Authorization").getter(getter(CreateOriginEndpointResponse::authorization))
.setter(setter(Builder::authorization)).constructor(Authorization::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("authorization").build()).build();
private static final SdkField CHANNEL_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ChannelId").getter(getter(CreateOriginEndpointResponse::channelId)).setter(setter(Builder::channelId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("channelId").build()).build();
private static final SdkField CMAF_PACKAGE_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("CmafPackage").getter(getter(CreateOriginEndpointResponse::cmafPackage))
.setter(setter(Builder::cmafPackage)).constructor(CmafPackage::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("cmafPackage").build()).build();
private static final SdkField DASH_PACKAGE_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("DashPackage").getter(getter(CreateOriginEndpointResponse::dashPackage))
.setter(setter(Builder::dashPackage)).constructor(DashPackage::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dashPackage").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 HLS_PACKAGE_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("HlsPackage").getter(getter(CreateOriginEndpointResponse::hlsPackage))
.setter(setter(Builder::hlsPackage)).constructor(HlsPackage::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("hlsPackage").build()).build();
private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Id")
.getter(getter(CreateOriginEndpointResponse::id)).setter(setter(Builder::id))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("id").build()).build();
private static final SdkField MANIFEST_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ManifestName").getter(getter(CreateOriginEndpointResponse::manifestName))
.setter(setter(Builder::manifestName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("manifestName").build()).build();
private static final SdkField MSS_PACKAGE_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("MssPackage").getter(getter(CreateOriginEndpointResponse::mssPackage))
.setter(setter(Builder::mssPackage)).constructor(MssPackage::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("mssPackage").build()).build();
private static final SdkField ORIGINATION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Origination").getter(getter(CreateOriginEndpointResponse::originationAsString))
.setter(setter(Builder::origination))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("origination").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> 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 SdkField TIME_DELAY_SECONDS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("TimeDelaySeconds").getter(getter(CreateOriginEndpointResponse::timeDelaySeconds))
.setter(setter(Builder::timeDelaySeconds))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("timeDelaySeconds").build()).build();
private static final SdkField URL_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Url")
.getter(getter(CreateOriginEndpointResponse::url)).setter(setter(Builder::url))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("url").build()).build();
private static final SdkField> WHITELIST_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Whitelist")
.getter(getter(CreateOriginEndpointResponse::whitelist))
.setter(setter(Builder::whitelist))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("whitelist").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD,
AUTHORIZATION_FIELD, CHANNEL_ID_FIELD, CMAF_PACKAGE_FIELD, DASH_PACKAGE_FIELD, DESCRIPTION_FIELD, HLS_PACKAGE_FIELD,
ID_FIELD, MANIFEST_NAME_FIELD, MSS_PACKAGE_FIELD, ORIGINATION_FIELD, STARTOVER_WINDOW_SECONDS_FIELD, TAGS_FIELD,
TIME_DELAY_SECONDS_FIELD, URL_FIELD, WHITELIST_FIELD));
private final String arn;
private final Authorization authorization;
private final String channelId;
private final CmafPackage cmafPackage;
private final DashPackage dashPackage;
private final String description;
private final HlsPackage hlsPackage;
private final String id;
private final String manifestName;
private final MssPackage mssPackage;
private final String origination;
private final Integer startoverWindowSeconds;
private final Map tags;
private final Integer timeDelaySeconds;
private final String url;
private final List whitelist;
private CreateOriginEndpointResponse(BuilderImpl builder) {
super(builder);
this.arn = builder.arn;
this.authorization = builder.authorization;
this.channelId = builder.channelId;
this.cmafPackage = builder.cmafPackage;
this.dashPackage = builder.dashPackage;
this.description = builder.description;
this.hlsPackage = builder.hlsPackage;
this.id = builder.id;
this.manifestName = builder.manifestName;
this.mssPackage = builder.mssPackage;
this.origination = builder.origination;
this.startoverWindowSeconds = builder.startoverWindowSeconds;
this.tags = builder.tags;
this.timeDelaySeconds = builder.timeDelaySeconds;
this.url = builder.url;
this.whitelist = builder.whitelist;
}
/**
* The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
*
* @return The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
*/
public final String arn() {
return arn;
}
/**
* Returns the value of the Authorization property for this object.
*
* @return The value of the Authorization property for this object.
*/
public final Authorization authorization() {
return authorization;
}
/**
* The ID of the Channel the OriginEndpoint is associated with.
*
* @return The ID of the Channel the OriginEndpoint is associated with.
*/
public final String channelId() {
return channelId;
}
/**
* Returns the value of the CmafPackage property for this object.
*
* @return The value of the CmafPackage property for this object.
*/
public final CmafPackage cmafPackage() {
return cmafPackage;
}
/**
* Returns the value of the DashPackage property for this object.
*
* @return The value of the DashPackage property for this object.
*/
public final DashPackage dashPackage() {
return dashPackage;
}
/**
* A short text description of the OriginEndpoint.
*
* @return A short text description of the OriginEndpoint.
*/
public final String description() {
return description;
}
/**
* Returns the value of the HlsPackage property for this object.
*
* @return The value of the HlsPackage property for this object.
*/
public final HlsPackage hlsPackage() {
return hlsPackage;
}
/**
* The ID of the OriginEndpoint.
*
* @return The ID of the OriginEndpoint.
*/
public final String id() {
return id;
}
/**
* A short string appended to the end of the OriginEndpoint URL.
*
* @return A short string appended to the end of the OriginEndpoint URL.
*/
public final String manifestName() {
return manifestName;
}
/**
* Returns the value of the MssPackage property for this object.
*
* @return The value of the MssPackage property for this object.
*/
public final MssPackage mssPackage() {
return mssPackage;
}
/**
* Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may
* by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be
* requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #origination} will
* return {@link Origination#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #originationAsString}.
*
*
* @return Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the
* OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the
* OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily
* disabling origination
* @see Origination
*/
public final Origination origination() {
return Origination.fromValue(origination);
}
/**
* Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may
* by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be
* requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #origination} will
* return {@link Origination#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #originationAsString}.
*
*
* @return Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the
* OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the
* OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily
* disabling origination
* @see Origination
*/
public final String originationAsString() {
return origination;
}
/**
* Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback will
* be disabled for the OriginEndpoint.
*
* @return Maximum duration (seconds) of content to retain for startover playback. If not specified, startover
* playback will be disabled for the OriginEndpoint.
*/
public final Integer startoverWindowSeconds() {
return startoverWindowSeconds;
}
/**
* 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);
}
/**
* Returns the value of the Tags property for this object.
*
* 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 value of the Tags property for this object.
*/
public final Map tags() {
return tags;
}
/**
* Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time
* delay in effect for the OriginEndpoint.
*
* @return Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no
* time delay in effect for the OriginEndpoint.
*/
public final Integer timeDelaySeconds() {
return timeDelaySeconds;
}
/**
* The URL of the packaged OriginEndpoint for consumption.
*
* @return The URL of the packaged OriginEndpoint for consumption.
*/
public final String url() {
return url;
}
/**
* For responses, this returns true if the service returned a value for the Whitelist 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 hasWhitelist() {
return whitelist != null && !(whitelist instanceof SdkAutoConstructList);
}
/**
* A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
*
* 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 #hasWhitelist} method.
*
*
* @return A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
*/
public final List whitelist() {
return whitelist;
}
@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(arn());
hashCode = 31 * hashCode + Objects.hashCode(authorization());
hashCode = 31 * hashCode + Objects.hashCode(channelId());
hashCode = 31 * hashCode + Objects.hashCode(cmafPackage());
hashCode = 31 * hashCode + Objects.hashCode(dashPackage());
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(hlsPackage());
hashCode = 31 * hashCode + Objects.hashCode(id());
hashCode = 31 * hashCode + Objects.hashCode(manifestName());
hashCode = 31 * hashCode + Objects.hashCode(mssPackage());
hashCode = 31 * hashCode + Objects.hashCode(originationAsString());
hashCode = 31 * hashCode + Objects.hashCode(startoverWindowSeconds());
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null);
hashCode = 31 * hashCode + Objects.hashCode(timeDelaySeconds());
hashCode = 31 * hashCode + Objects.hashCode(url());
hashCode = 31 * hashCode + Objects.hashCode(hasWhitelist() ? whitelist() : 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(authorization(), other.authorization())
&& Objects.equals(channelId(), other.channelId()) && Objects.equals(cmafPackage(), other.cmafPackage())
&& Objects.equals(dashPackage(), other.dashPackage()) && Objects.equals(description(), other.description())
&& Objects.equals(hlsPackage(), other.hlsPackage()) && Objects.equals(id(), other.id())
&& Objects.equals(manifestName(), other.manifestName()) && Objects.equals(mssPackage(), other.mssPackage())
&& Objects.equals(originationAsString(), other.originationAsString())
&& Objects.equals(startoverWindowSeconds(), other.startoverWindowSeconds()) && hasTags() == other.hasTags()
&& Objects.equals(tags(), other.tags()) && Objects.equals(timeDelaySeconds(), other.timeDelaySeconds())
&& Objects.equals(url(), other.url()) && hasWhitelist() == other.hasWhitelist()
&& Objects.equals(whitelist(), other.whitelist());
}
/**
* 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("Authorization", authorization())
.add("ChannelId", channelId()).add("CmafPackage", cmafPackage()).add("DashPackage", dashPackage())
.add("Description", description()).add("HlsPackage", hlsPackage()).add("Id", id())
.add("ManifestName", manifestName()).add("MssPackage", mssPackage()).add("Origination", originationAsString())
.add("StartoverWindowSeconds", startoverWindowSeconds()).add("Tags", hasTags() ? tags() : null)
.add("TimeDelaySeconds", timeDelaySeconds()).add("Url", url())
.add("Whitelist", hasWhitelist() ? whitelist() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "Arn":
return Optional.ofNullable(clazz.cast(arn()));
case "Authorization":
return Optional.ofNullable(clazz.cast(authorization()));
case "ChannelId":
return Optional.ofNullable(clazz.cast(channelId()));
case "CmafPackage":
return Optional.ofNullable(clazz.cast(cmafPackage()));
case "DashPackage":
return Optional.ofNullable(clazz.cast(dashPackage()));
case "Description":
return Optional.ofNullable(clazz.cast(description()));
case "HlsPackage":
return Optional.ofNullable(clazz.cast(hlsPackage()));
case "Id":
return Optional.ofNullable(clazz.cast(id()));
case "ManifestName":
return Optional.ofNullable(clazz.cast(manifestName()));
case "MssPackage":
return Optional.ofNullable(clazz.cast(mssPackage()));
case "Origination":
return Optional.ofNullable(clazz.cast(originationAsString()));
case "StartoverWindowSeconds":
return Optional.ofNullable(clazz.cast(startoverWindowSeconds()));
case "Tags":
return Optional.ofNullable(clazz.cast(tags()));
case "TimeDelaySeconds":
return Optional.ofNullable(clazz.cast(timeDelaySeconds()));
case "Url":
return Optional.ofNullable(clazz.cast(url()));
case "Whitelist":
return Optional.ofNullable(clazz.cast(whitelist()));
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 MediaPackageResponse.Builder, SdkPojo,
CopyableBuilder {
/**
* The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
*
* @param arn
* The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder arn(String arn);
/**
* Sets the value of the Authorization property for this object.
*
* @param authorization
* The new value for the Authorization property for this object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder authorization(Authorization authorization);
/**
* Sets the value of the Authorization property for this object.
*
* This is a convenience method that creates an instance of the {@link Authorization.Builder} avoiding the need
* to create one manually via {@link Authorization#builder()}.
*
*
* When the {@link Consumer} completes, {@link Authorization.Builder#build()} is called immediately and its
* result is passed to {@link #authorization(Authorization)}.
*
* @param authorization
* a consumer that will call methods on {@link Authorization.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #authorization(Authorization)
*/
default Builder authorization(Consumer authorization) {
return authorization(Authorization.builder().applyMutation(authorization).build());
}
/**
* The ID of the Channel the OriginEndpoint is associated with.
*
* @param channelId
* The ID of the Channel the OriginEndpoint is associated with.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder channelId(String channelId);
/**
* Sets the value of the CmafPackage property for this object.
*
* @param cmafPackage
* The new value for the CmafPackage property for this object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder cmafPackage(CmafPackage cmafPackage);
/**
* Sets the value of the CmafPackage property for this object.
*
* This is a convenience method that creates an instance of the {@link CmafPackage.Builder} avoiding the need to
* create one manually via {@link CmafPackage#builder()}.
*
*
* When the {@link Consumer} completes, {@link CmafPackage.Builder#build()} is called immediately and its result
* is passed to {@link #cmafPackage(CmafPackage)}.
*
* @param cmafPackage
* a consumer that will call methods on {@link CmafPackage.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #cmafPackage(CmafPackage)
*/
default Builder cmafPackage(Consumer cmafPackage) {
return cmafPackage(CmafPackage.builder().applyMutation(cmafPackage).build());
}
/**
* Sets the value of the DashPackage property for this object.
*
* @param dashPackage
* The new value for the DashPackage property for this object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder dashPackage(DashPackage dashPackage);
/**
* Sets the value of the DashPackage property for this object.
*
* This is a convenience method that creates an instance of the {@link DashPackage.Builder} avoiding the need to
* create one manually via {@link DashPackage#builder()}.
*
*
* When the {@link Consumer} completes, {@link DashPackage.Builder#build()} is called immediately and its result
* is passed to {@link #dashPackage(DashPackage)}.
*
* @param dashPackage
* a consumer that will call methods on {@link DashPackage.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #dashPackage(DashPackage)
*/
default Builder dashPackage(Consumer dashPackage) {
return dashPackage(DashPackage.builder().applyMutation(dashPackage).build());
}
/**
* A short text description of the OriginEndpoint.
*
* @param description
* A short text description of the OriginEndpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder description(String description);
/**
* Sets the value of the HlsPackage property for this object.
*
* @param hlsPackage
* The new value for the HlsPackage property for this object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder hlsPackage(HlsPackage hlsPackage);
/**
* Sets the value of the HlsPackage property for this object.
*
* This is a convenience method that creates an instance of the {@link HlsPackage.Builder} avoiding the need to
* create one manually via {@link HlsPackage#builder()}.
*
*
* When the {@link Consumer} completes, {@link HlsPackage.Builder#build()} is called immediately and its result
* is passed to {@link #hlsPackage(HlsPackage)}.
*
* @param hlsPackage
* a consumer that will call methods on {@link HlsPackage.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #hlsPackage(HlsPackage)
*/
default Builder hlsPackage(Consumer hlsPackage) {
return hlsPackage(HlsPackage.builder().applyMutation(hlsPackage).build());
}
/**
* The ID of the OriginEndpoint.
*
* @param id
* The ID of the OriginEndpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder id(String id);
/**
* A short string appended to the end of the OriginEndpoint URL.
*
* @param manifestName
* A short string appended to the end of the OriginEndpoint URL.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder manifestName(String manifestName);
/**
* Sets the value of the MssPackage property for this object.
*
* @param mssPackage
* The new value for the MssPackage property for this object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder mssPackage(MssPackage mssPackage);
/**
* Sets the value of the MssPackage property for this object.
*
* This is a convenience method that creates an instance of the {@link MssPackage.Builder} avoiding the need to
* create one manually via {@link MssPackage#builder()}.
*
*
* When the {@link Consumer} completes, {@link MssPackage.Builder#build()} is called immediately and its result
* is passed to {@link #mssPackage(MssPackage)}.
*
* @param mssPackage
* a consumer that will call methods on {@link MssPackage.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #mssPackage(MssPackage)
*/
default Builder mssPackage(Consumer mssPackage) {
return mssPackage(MssPackage.builder().applyMutation(mssPackage).build());
}
/**
* Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint
* may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be
* requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
*
* @param origination
* Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the
* OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the
* OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for
* temporarily disabling origination
* @see Origination
* @return Returns a reference to this object so that method calls can be chained together.
* @see Origination
*/
Builder origination(String origination);
/**
* Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint
* may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be
* requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
*
* @param origination
* Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the
* OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the
* OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for
* temporarily disabling origination
* @see Origination
* @return Returns a reference to this object so that method calls can be chained together.
* @see Origination
*/
Builder origination(Origination origination);
/**
* Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback
* will be disabled for the OriginEndpoint.
*
* @param startoverWindowSeconds
* Maximum duration (seconds) of content to retain for startover playback. If not specified, startover
* playback will be disabled for the OriginEndpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder startoverWindowSeconds(Integer startoverWindowSeconds);
/**
* Sets the value of the Tags property for this object.
*
* @param tags
* The new value for the Tags property for this object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Map tags);
/**
* Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time
* delay in effect for the OriginEndpoint.
*
* @param timeDelaySeconds
* Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be
* no time delay in effect for the OriginEndpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder timeDelaySeconds(Integer timeDelaySeconds);
/**
* The URL of the packaged OriginEndpoint for consumption.
*
* @param url
* The URL of the packaged OriginEndpoint for consumption.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder url(String url);
/**
* A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
*
* @param whitelist
* A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder whitelist(Collection whitelist);
/**
* A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
*
* @param whitelist
* A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder whitelist(String... whitelist);
}
static final class BuilderImpl extends MediaPackageResponse.BuilderImpl implements Builder {
private String arn;
private Authorization authorization;
private String channelId;
private CmafPackage cmafPackage;
private DashPackage dashPackage;
private String description;
private HlsPackage hlsPackage;
private String id;
private String manifestName;
private MssPackage mssPackage;
private String origination;
private Integer startoverWindowSeconds;
private Map tags = DefaultSdkAutoConstructMap.getInstance();
private Integer timeDelaySeconds;
private String url;
private List whitelist = DefaultSdkAutoConstructList.getInstance();
private BuilderImpl() {
}
private BuilderImpl(CreateOriginEndpointResponse model) {
super(model);
arn(model.arn);
authorization(model.authorization);
channelId(model.channelId);
cmafPackage(model.cmafPackage);
dashPackage(model.dashPackage);
description(model.description);
hlsPackage(model.hlsPackage);
id(model.id);
manifestName(model.manifestName);
mssPackage(model.mssPackage);
origination(model.origination);
startoverWindowSeconds(model.startoverWindowSeconds);
tags(model.tags);
timeDelaySeconds(model.timeDelaySeconds);
url(model.url);
whitelist(model.whitelist);
}
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 Authorization.Builder getAuthorization() {
return authorization != null ? authorization.toBuilder() : null;
}
public final void setAuthorization(Authorization.BuilderImpl authorization) {
this.authorization = authorization != null ? authorization.build() : null;
}
@Override
public final Builder authorization(Authorization authorization) {
this.authorization = authorization;
return this;
}
public final String getChannelId() {
return channelId;
}
public final void setChannelId(String channelId) {
this.channelId = channelId;
}
@Override
public final Builder channelId(String channelId) {
this.channelId = channelId;
return this;
}
public final CmafPackage.Builder getCmafPackage() {
return cmafPackage != null ? cmafPackage.toBuilder() : null;
}
public final void setCmafPackage(CmafPackage.BuilderImpl cmafPackage) {
this.cmafPackage = cmafPackage != null ? cmafPackage.build() : null;
}
@Override
public final Builder cmafPackage(CmafPackage cmafPackage) {
this.cmafPackage = cmafPackage;
return this;
}
public final DashPackage.Builder getDashPackage() {
return dashPackage != null ? dashPackage.toBuilder() : null;
}
public final void setDashPackage(DashPackage.BuilderImpl dashPackage) {
this.dashPackage = dashPackage != null ? dashPackage.build() : null;
}
@Override
public final Builder dashPackage(DashPackage dashPackage) {
this.dashPackage = dashPackage;
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 HlsPackage.Builder getHlsPackage() {
return hlsPackage != null ? hlsPackage.toBuilder() : null;
}
public final void setHlsPackage(HlsPackage.BuilderImpl hlsPackage) {
this.hlsPackage = hlsPackage != null ? hlsPackage.build() : null;
}
@Override
public final Builder hlsPackage(HlsPackage hlsPackage) {
this.hlsPackage = hlsPackage;
return this;
}
public final String getId() {
return id;
}
public final void setId(String id) {
this.id = id;
}
@Override
public final Builder id(String id) {
this.id = id;
return this;
}
public final String getManifestName() {
return manifestName;
}
public final void setManifestName(String manifestName) {
this.manifestName = manifestName;
}
@Override
public final Builder manifestName(String manifestName) {
this.manifestName = manifestName;
return this;
}
public final MssPackage.Builder getMssPackage() {
return mssPackage != null ? mssPackage.toBuilder() : null;
}
public final void setMssPackage(MssPackage.BuilderImpl mssPackage) {
this.mssPackage = mssPackage != null ? mssPackage.build() : null;
}
@Override
public final Builder mssPackage(MssPackage mssPackage) {
this.mssPackage = mssPackage;
return this;
}
public final String getOrigination() {
return origination;
}
public final void setOrigination(String origination) {
this.origination = origination;
}
@Override
public final Builder origination(String origination) {
this.origination = origination;
return this;
}
@Override
public final Builder origination(Origination origination) {
this.origination(origination == null ? null : origination.toString());
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 Map getTags() {
if (tags instanceof SdkAutoConstructMap) {
return null;
}
return tags;
}
public final void setTags(Map tags) {
this.tags = TagsCopier.copy(tags);
}
@Override
public final Builder tags(Map tags) {
this.tags = TagsCopier.copy(tags);
return this;
}
public final Integer getTimeDelaySeconds() {
return timeDelaySeconds;
}
public final void setTimeDelaySeconds(Integer timeDelaySeconds) {
this.timeDelaySeconds = timeDelaySeconds;
}
@Override
public final Builder timeDelaySeconds(Integer timeDelaySeconds) {
this.timeDelaySeconds = timeDelaySeconds;
return this;
}
public final String getUrl() {
return url;
}
public final void setUrl(String url) {
this.url = url;
}
@Override
public final Builder url(String url) {
this.url = url;
return this;
}
public final Collection getWhitelist() {
if (whitelist instanceof SdkAutoConstructList) {
return null;
}
return whitelist;
}
public final void setWhitelist(Collection whitelist) {
this.whitelist = ___listOf__stringCopier.copy(whitelist);
}
@Override
public final Builder whitelist(Collection whitelist) {
this.whitelist = ___listOf__stringCopier.copy(whitelist);
return this;
}
@Override
@SafeVarargs
public final Builder whitelist(String... whitelist) {
whitelist(Arrays.asList(whitelist));
return this;
}
@Override
public CreateOriginEndpointResponse build() {
return new CreateOriginEndpointResponse(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}