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.ivs.model.Channel Maven / Gradle / Ivy
Go to download
The AWS Java SDK for Ivs module holds the client classes that are used for
communicating with Ivs.
/*
* 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.ivs.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Object specifying a channel.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class Channel implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("arn")
.getter(getter(Channel::arn)).setter(setter(Builder::arn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("arn").build()).build();
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
.getter(getter(Channel::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();
private static final SdkField LATENCY_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("latencyMode").getter(getter(Channel::latencyModeAsString)).setter(setter(Builder::latencyMode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("latencyMode").build()).build();
private static final SdkField TYPE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("type")
.getter(getter(Channel::typeAsString)).setter(setter(Builder::type))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("type").build()).build();
private static final SdkField RECORDING_CONFIGURATION_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("recordingConfigurationArn").getter(getter(Channel::recordingConfigurationArn))
.setter(setter(Builder::recordingConfigurationArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("recordingConfigurationArn").build())
.build();
private static final SdkField INGEST_ENDPOINT_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ingestEndpoint").getter(getter(Channel::ingestEndpoint)).setter(setter(Builder::ingestEndpoint))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ingestEndpoint").build()).build();
private static final SdkField PLAYBACK_URL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("playbackUrl").getter(getter(Channel::playbackUrl)).setter(setter(Builder::playbackUrl))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("playbackUrl").build()).build();
private static final SdkField AUTHORIZED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("authorized").getter(getter(Channel::authorized)).setter(setter(Builder::authorized))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("authorized").build()).build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("tags")
.getter(getter(Channel::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 INSECURE_INGEST_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("insecureIngest").getter(getter(Channel::insecureIngest)).setter(setter(Builder::insecureIngest))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("insecureIngest").build()).build();
private static final SdkField PRESET_FIELD = SdkField. builder(MarshallingType.STRING).memberName("preset")
.getter(getter(Channel::presetAsString)).setter(setter(Builder::preset))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("preset").build()).build();
private static final SdkField SRT_FIELD = SdkField. builder(MarshallingType.SDK_POJO).memberName("srt")
.getter(getter(Channel::srt)).setter(setter(Builder::srt)).constructor(Srt::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("srt").build()).build();
private static final SdkField PLAYBACK_RESTRICTION_POLICY_ARN_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("playbackRestrictionPolicyArn")
.getter(getter(Channel::playbackRestrictionPolicyArn))
.setter(setter(Builder::playbackRestrictionPolicyArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("playbackRestrictionPolicyArn")
.build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD, NAME_FIELD,
LATENCY_MODE_FIELD, TYPE_FIELD, RECORDING_CONFIGURATION_ARN_FIELD, INGEST_ENDPOINT_FIELD, PLAYBACK_URL_FIELD,
AUTHORIZED_FIELD, TAGS_FIELD, INSECURE_INGEST_FIELD, PRESET_FIELD, SRT_FIELD, PLAYBACK_RESTRICTION_POLICY_ARN_FIELD));
private static final long serialVersionUID = 1L;
private final String arn;
private final String name;
private final String latencyMode;
private final String type;
private final String recordingConfigurationArn;
private final String ingestEndpoint;
private final String playbackUrl;
private final Boolean authorized;
private final Map tags;
private final Boolean insecureIngest;
private final String preset;
private final Srt srt;
private final String playbackRestrictionPolicyArn;
private Channel(BuilderImpl builder) {
this.arn = builder.arn;
this.name = builder.name;
this.latencyMode = builder.latencyMode;
this.type = builder.type;
this.recordingConfigurationArn = builder.recordingConfigurationArn;
this.ingestEndpoint = builder.ingestEndpoint;
this.playbackUrl = builder.playbackUrl;
this.authorized = builder.authorized;
this.tags = builder.tags;
this.insecureIngest = builder.insecureIngest;
this.preset = builder.preset;
this.srt = builder.srt;
this.playbackRestrictionPolicyArn = builder.playbackRestrictionPolicyArn;
}
/**
*
* Channel ARN.
*
*
* @return Channel ARN.
*/
public final String arn() {
return arn;
}
/**
*
* Channel name.
*
*
* @return Channel name.
*/
public final String name() {
return name;
}
/**
*
* Channel latency mode. Use NORMAL
to broadcast and deliver live video up to Full HD. Use
* LOW
for near-real-time interaction with viewers. Default: LOW
.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #latencyMode} will
* return {@link ChannelLatencyMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #latencyModeAsString}.
*
*
* @return Channel latency mode. Use NORMAL
to broadcast and deliver live video up to Full HD. Use
* LOW
for near-real-time interaction with viewers. Default: LOW
.
* @see ChannelLatencyMode
*/
public final ChannelLatencyMode latencyMode() {
return ChannelLatencyMode.fromValue(latencyMode);
}
/**
*
* Channel latency mode. Use NORMAL
to broadcast and deliver live video up to Full HD. Use
* LOW
for near-real-time interaction with viewers. Default: LOW
.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #latencyMode} will
* return {@link ChannelLatencyMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #latencyModeAsString}.
*
*
* @return Channel latency mode. Use NORMAL
to broadcast and deliver live video up to Full HD. Use
* LOW
for near-real-time interaction with viewers. Default: LOW
.
* @see ChannelLatencyMode
*/
public final String latencyModeAsString() {
return latencyMode;
}
/**
*
* Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable input
* resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD
. For
* details, see Channel
* Types .
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #type} will return
* {@link ChannelType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #typeAsString}.
*
*
* @return Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable input
* resolution or bitrate, the stream probably will disconnect immediately. Default:
* STANDARD
. For details, see Channel
* Types .
* @see ChannelType
*/
public final ChannelType type() {
return ChannelType.fromValue(type);
}
/**
*
* Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable input
* resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD
. For
* details, see Channel
* Types .
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #type} will return
* {@link ChannelType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #typeAsString}.
*
*
* @return Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable input
* resolution or bitrate, the stream probably will disconnect immediately. Default:
* STANDARD
. For details, see Channel
* Types .
* @see ChannelType
*/
public final String typeAsString() {
return type;
}
/**
*
* Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording. Default: ""
* (empty string, recording is disabled).
*
*
* @return Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording.
* Default: "" (empty string, recording is disabled).
*/
public final String recordingConfigurationArn() {
return recordingConfigurationArn;
}
/**
*
* Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.
*
*
* @return Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming
* software.
*/
public final String ingestEndpoint() {
return ingestEndpoint;
}
/**
*
* Channel playback URL.
*
*
* @return Channel playback URL.
*/
public final String playbackUrl() {
return playbackUrl;
}
/**
*
* Whether the channel is private (enabled for playback authorization). Default: false
.
*
*
* @return Whether the channel is private (enabled for playback authorization). Default: false
.
*/
public final Boolean authorized() {
return authorized;
}
/**
* 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);
}
/**
*
* Tags attached to the resource. Array of 1-50 maps, each of the form string:string (key:value)
. See
* Tagging Amazon Web Services
* Resources for more information, including restrictions that apply to tags and
* "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is documented
* there.
*
*
* 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 Tags attached to the resource. Array of 1-50 maps, each of the form
* string:string (key:value)
. See Tagging Amazon Web Services
* Resources for more information, including restrictions that apply to tags and
* "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is
* documented there.
*/
public final Map tags() {
return tags;
}
/**
*
* Whether the channel allows insecure RTMP ingest. Default: false
.
*
*
* @return Whether the channel allows insecure RTMP ingest. Default: false
.
*/
public final Boolean insecureIngest() {
return insecureIngest;
}
/**
*
* Optional transcode preset for the channel. This is selectable only for ADVANCED_HD
and
* ADVANCED_SD
channel types. For those channel types, the default preset
is
* HIGHER_BANDWIDTH_DELIVERY
. For other channel types (BASIC
and STANDARD
),
* preset
is the empty string (""
).
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #preset} will
* return {@link TranscodePreset#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #presetAsString}.
*
*
* @return Optional transcode preset for the channel. This is selectable only for ADVANCED_HD
and
* ADVANCED_SD
channel types. For those channel types, the default preset
is
* HIGHER_BANDWIDTH_DELIVERY
. For other channel types (BASIC
and
* STANDARD
), preset
is the empty string (""
).
* @see TranscodePreset
*/
public final TranscodePreset preset() {
return TranscodePreset.fromValue(preset);
}
/**
*
* Optional transcode preset for the channel. This is selectable only for ADVANCED_HD
and
* ADVANCED_SD
channel types. For those channel types, the default preset
is
* HIGHER_BANDWIDTH_DELIVERY
. For other channel types (BASIC
and STANDARD
),
* preset
is the empty string (""
).
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #preset} will
* return {@link TranscodePreset#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #presetAsString}.
*
*
* @return Optional transcode preset for the channel. This is selectable only for ADVANCED_HD
and
* ADVANCED_SD
channel types. For those channel types, the default preset
is
* HIGHER_BANDWIDTH_DELIVERY
. For other channel types (BASIC
and
* STANDARD
), preset
is the empty string (""
).
* @see TranscodePreset
*/
public final String presetAsString() {
return preset;
}
/**
*
* Specifies the endpoint and optional passphrase for streaming with the SRT protocol.
*
*
* @return Specifies the endpoint and optional passphrase for streaming with the SRT protocol.
*/
public final Srt srt() {
return srt;
}
/**
*
* Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback restriction.
* Default: "" (empty string, no playback restriction policy is applied).
*
*
* @return Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback
* restriction. Default: "" (empty string, no playback restriction policy is applied).
*/
public final String playbackRestrictionPolicyArn() {
return playbackRestrictionPolicyArn;
}
@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 + Objects.hashCode(arn());
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(latencyModeAsString());
hashCode = 31 * hashCode + Objects.hashCode(typeAsString());
hashCode = 31 * hashCode + Objects.hashCode(recordingConfigurationArn());
hashCode = 31 * hashCode + Objects.hashCode(ingestEndpoint());
hashCode = 31 * hashCode + Objects.hashCode(playbackUrl());
hashCode = 31 * hashCode + Objects.hashCode(authorized());
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null);
hashCode = 31 * hashCode + Objects.hashCode(insecureIngest());
hashCode = 31 * hashCode + Objects.hashCode(presetAsString());
hashCode = 31 * hashCode + Objects.hashCode(srt());
hashCode = 31 * hashCode + Objects.hashCode(playbackRestrictionPolicyArn());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof Channel)) {
return false;
}
Channel other = (Channel) obj;
return Objects.equals(arn(), other.arn()) && Objects.equals(name(), other.name())
&& Objects.equals(latencyModeAsString(), other.latencyModeAsString())
&& Objects.equals(typeAsString(), other.typeAsString())
&& Objects.equals(recordingConfigurationArn(), other.recordingConfigurationArn())
&& Objects.equals(ingestEndpoint(), other.ingestEndpoint()) && Objects.equals(playbackUrl(), other.playbackUrl())
&& Objects.equals(authorized(), other.authorized()) && hasTags() == other.hasTags()
&& Objects.equals(tags(), other.tags()) && Objects.equals(insecureIngest(), other.insecureIngest())
&& Objects.equals(presetAsString(), other.presetAsString()) && Objects.equals(srt(), other.srt())
&& Objects.equals(playbackRestrictionPolicyArn(), other.playbackRestrictionPolicyArn());
}
/**
* 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("Channel").add("Arn", arn()).add("Name", name()).add("LatencyMode", latencyModeAsString())
.add("Type", typeAsString()).add("RecordingConfigurationArn", recordingConfigurationArn())
.add("IngestEndpoint", ingestEndpoint()).add("PlaybackUrl", playbackUrl()).add("Authorized", authorized())
.add("Tags", hasTags() ? tags() : null).add("InsecureIngest", insecureIngest()).add("Preset", presetAsString())
.add("Srt", srt()).add("PlaybackRestrictionPolicyArn", playbackRestrictionPolicyArn()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "arn":
return Optional.ofNullable(clazz.cast(arn()));
case "name":
return Optional.ofNullable(clazz.cast(name()));
case "latencyMode":
return Optional.ofNullable(clazz.cast(latencyModeAsString()));
case "type":
return Optional.ofNullable(clazz.cast(typeAsString()));
case "recordingConfigurationArn":
return Optional.ofNullable(clazz.cast(recordingConfigurationArn()));
case "ingestEndpoint":
return Optional.ofNullable(clazz.cast(ingestEndpoint()));
case "playbackUrl":
return Optional.ofNullable(clazz.cast(playbackUrl()));
case "authorized":
return Optional.ofNullable(clazz.cast(authorized()));
case "tags":
return Optional.ofNullable(clazz.cast(tags()));
case "insecureIngest":
return Optional.ofNullable(clazz.cast(insecureIngest()));
case "preset":
return Optional.ofNullable(clazz.cast(presetAsString()));
case "srt":
return Optional.ofNullable(clazz.cast(srt()));
case "playbackRestrictionPolicyArn":
return Optional.ofNullable(clazz.cast(playbackRestrictionPolicyArn()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((Channel) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SdkPojo, CopyableBuilder {
/**
*
* Channel ARN.
*
*
* @param arn
* Channel ARN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder arn(String arn);
/**
*
* Channel name.
*
*
* @param name
* Channel name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder name(String name);
/**
*
* Channel latency mode. Use NORMAL
to broadcast and deliver live video up to Full HD. Use
* LOW
for near-real-time interaction with viewers. Default: LOW
.
*
*
* @param latencyMode
* Channel latency mode. Use NORMAL
to broadcast and deliver live video up to Full HD. Use
* LOW
for near-real-time interaction with viewers. Default: LOW
.
* @see ChannelLatencyMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChannelLatencyMode
*/
Builder latencyMode(String latencyMode);
/**
*
* Channel latency mode. Use NORMAL
to broadcast and deliver live video up to Full HD. Use
* LOW
for near-real-time interaction with viewers. Default: LOW
.
*
*
* @param latencyMode
* Channel latency mode. Use NORMAL
to broadcast and deliver live video up to Full HD. Use
* LOW
for near-real-time interaction with viewers. Default: LOW
.
* @see ChannelLatencyMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChannelLatencyMode
*/
Builder latencyMode(ChannelLatencyMode latencyMode);
/**
*
* Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable input
* resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD
.
* For details, see Channel Types .
*
*
* @param type
* Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable
* input resolution or bitrate, the stream probably will disconnect immediately. Default:
* STANDARD
. For details, see Channel
* Types .
* @see ChannelType
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChannelType
*/
Builder type(String type);
/**
*
* Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable input
* resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD
.
* For details, see Channel Types .
*
*
* @param type
* Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable
* input resolution or bitrate, the stream probably will disconnect immediately. Default:
* STANDARD
. For details, see Channel
* Types .
* @see ChannelType
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChannelType
*/
Builder type(ChannelType type);
/**
*
* Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording. Default: ""
* (empty string, recording is disabled).
*
*
* @param recordingConfigurationArn
* Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording.
* Default: "" (empty string, recording is disabled).
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder recordingConfigurationArn(String recordingConfigurationArn);
/**
*
* Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.
*
*
* @param ingestEndpoint
* Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming
* software.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder ingestEndpoint(String ingestEndpoint);
/**
*
* Channel playback URL.
*
*
* @param playbackUrl
* Channel playback URL.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder playbackUrl(String playbackUrl);
/**
*
* Whether the channel is private (enabled for playback authorization). Default: false
.
*
*
* @param authorized
* Whether the channel is private (enabled for playback authorization). Default: false
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder authorized(Boolean authorized);
/**
*
* Tags attached to the resource. Array of 1-50 maps, each of the form string:string (key:value)
.
* See Tagging Amazon Web Services
* Resources for more information, including restrictions that apply to tags and
* "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is
* documented there.
*
*
* @param tags
* Tags attached to the resource. Array of 1-50 maps, each of the form
* string:string (key:value)
. See Tagging Amazon Web Services
* Resources for more information, including restrictions that apply to tags and
* "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is
* documented there.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Map tags);
/**
*
* Whether the channel allows insecure RTMP ingest. Default: false
.
*
*
* @param insecureIngest
* Whether the channel allows insecure RTMP ingest. Default: false
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder insecureIngest(Boolean insecureIngest);
/**
*
* Optional transcode preset for the channel. This is selectable only for ADVANCED_HD
and
* ADVANCED_SD
channel types. For those channel types, the default preset
is
* HIGHER_BANDWIDTH_DELIVERY
. For other channel types (BASIC
and STANDARD
* ), preset
is the empty string (""
).
*
*
* @param preset
* Optional transcode preset for the channel. This is selectable only for ADVANCED_HD
and
* ADVANCED_SD
channel types. For those channel types, the default preset
is
* HIGHER_BANDWIDTH_DELIVERY
. For other channel types (BASIC
and
* STANDARD
), preset
is the empty string (""
).
* @see TranscodePreset
* @return Returns a reference to this object so that method calls can be chained together.
* @see TranscodePreset
*/
Builder preset(String preset);
/**
*
* Optional transcode preset for the channel. This is selectable only for ADVANCED_HD
and
* ADVANCED_SD
channel types. For those channel types, the default preset
is
* HIGHER_BANDWIDTH_DELIVERY
. For other channel types (BASIC
and STANDARD
* ), preset
is the empty string (""
).
*
*
* @param preset
* Optional transcode preset for the channel. This is selectable only for ADVANCED_HD
and
* ADVANCED_SD
channel types. For those channel types, the default preset
is
* HIGHER_BANDWIDTH_DELIVERY
. For other channel types (BASIC
and
* STANDARD
), preset
is the empty string (""
).
* @see TranscodePreset
* @return Returns a reference to this object so that method calls can be chained together.
* @see TranscodePreset
*/
Builder preset(TranscodePreset preset);
/**
*
* Specifies the endpoint and optional passphrase for streaming with the SRT protocol.
*
*
* @param srt
* Specifies the endpoint and optional passphrase for streaming with the SRT protocol.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder srt(Srt srt);
/**
*
* Specifies the endpoint and optional passphrase for streaming with the SRT protocol.
*
* This is a convenience method that creates an instance of the {@link Srt.Builder} avoiding the need to create
* one manually via {@link Srt#builder()}.
*
*
* When the {@link Consumer} completes, {@link Srt.Builder#build()} is called immediately and its result is
* passed to {@link #srt(Srt)}.
*
* @param srt
* a consumer that will call methods on {@link Srt.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #srt(Srt)
*/
default Builder srt(Consumer srt) {
return srt(Srt.builder().applyMutation(srt).build());
}
/**
*
* Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback
* restriction. Default: "" (empty string, no playback restriction policy is applied).
*
*
* @param playbackRestrictionPolicyArn
* Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback
* restriction. Default: "" (empty string, no playback restriction policy is applied).
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder playbackRestrictionPolicyArn(String playbackRestrictionPolicyArn);
}
static final class BuilderImpl implements Builder {
private String arn;
private String name;
private String latencyMode;
private String type;
private String recordingConfigurationArn;
private String ingestEndpoint;
private String playbackUrl;
private Boolean authorized;
private Map tags = DefaultSdkAutoConstructMap.getInstance();
private Boolean insecureIngest;
private String preset;
private Srt srt;
private String playbackRestrictionPolicyArn;
private BuilderImpl() {
}
private BuilderImpl(Channel model) {
arn(model.arn);
name(model.name);
latencyMode(model.latencyMode);
type(model.type);
recordingConfigurationArn(model.recordingConfigurationArn);
ingestEndpoint(model.ingestEndpoint);
playbackUrl(model.playbackUrl);
authorized(model.authorized);
tags(model.tags);
insecureIngest(model.insecureIngest);
preset(model.preset);
srt(model.srt);
playbackRestrictionPolicyArn(model.playbackRestrictionPolicyArn);
}
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 getName() {
return name;
}
public final void setName(String name) {
this.name = name;
}
@Override
public final Builder name(String name) {
this.name = name;
return this;
}
public final String getLatencyMode() {
return latencyMode;
}
public final void setLatencyMode(String latencyMode) {
this.latencyMode = latencyMode;
}
@Override
public final Builder latencyMode(String latencyMode) {
this.latencyMode = latencyMode;
return this;
}
@Override
public final Builder latencyMode(ChannelLatencyMode latencyMode) {
this.latencyMode(latencyMode == null ? null : latencyMode.toString());
return this;
}
public final String getType() {
return type;
}
public final void setType(String type) {
this.type = type;
}
@Override
public final Builder type(String type) {
this.type = type;
return this;
}
@Override
public final Builder type(ChannelType type) {
this.type(type == null ? null : type.toString());
return this;
}
public final String getRecordingConfigurationArn() {
return recordingConfigurationArn;
}
public final void setRecordingConfigurationArn(String recordingConfigurationArn) {
this.recordingConfigurationArn = recordingConfigurationArn;
}
@Override
public final Builder recordingConfigurationArn(String recordingConfigurationArn) {
this.recordingConfigurationArn = recordingConfigurationArn;
return this;
}
public final String getIngestEndpoint() {
return ingestEndpoint;
}
public final void setIngestEndpoint(String ingestEndpoint) {
this.ingestEndpoint = ingestEndpoint;
}
@Override
public final Builder ingestEndpoint(String ingestEndpoint) {
this.ingestEndpoint = ingestEndpoint;
return this;
}
public final String getPlaybackUrl() {
return playbackUrl;
}
public final void setPlaybackUrl(String playbackUrl) {
this.playbackUrl = playbackUrl;
}
@Override
public final Builder playbackUrl(String playbackUrl) {
this.playbackUrl = playbackUrl;
return this;
}
public final Boolean getAuthorized() {
return authorized;
}
public final void setAuthorized(Boolean authorized) {
this.authorized = authorized;
}
@Override
public final Builder authorized(Boolean authorized) {
this.authorized = authorized;
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 Boolean getInsecureIngest() {
return insecureIngest;
}
public final void setInsecureIngest(Boolean insecureIngest) {
this.insecureIngest = insecureIngest;
}
@Override
public final Builder insecureIngest(Boolean insecureIngest) {
this.insecureIngest = insecureIngest;
return this;
}
public final String getPreset() {
return preset;
}
public final void setPreset(String preset) {
this.preset = preset;
}
@Override
public final Builder preset(String preset) {
this.preset = preset;
return this;
}
@Override
public final Builder preset(TranscodePreset preset) {
this.preset(preset == null ? null : preset.toString());
return this;
}
public final Srt.Builder getSrt() {
return srt != null ? srt.toBuilder() : null;
}
public final void setSrt(Srt.BuilderImpl srt) {
this.srt = srt != null ? srt.build() : null;
}
@Override
public final Builder srt(Srt srt) {
this.srt = srt;
return this;
}
public final String getPlaybackRestrictionPolicyArn() {
return playbackRestrictionPolicyArn;
}
public final void setPlaybackRestrictionPolicyArn(String playbackRestrictionPolicyArn) {
this.playbackRestrictionPolicyArn = playbackRestrictionPolicyArn;
}
@Override
public final Builder playbackRestrictionPolicyArn(String playbackRestrictionPolicyArn) {
this.playbackRestrictionPolicyArn = playbackRestrictionPolicyArn;
return this;
}
@Override
public Channel build() {
return new Channel(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}