software.amazon.awssdk.services.ivs.model.UpdateChannelRequest Maven / Gradle / Ivy
Show all versions of ivs Show documentation
/*
* 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.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class UpdateChannelRequest extends IvsRequest implements
ToCopyableBuilder {
private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("arn")
.getter(getter(UpdateChannelRequest::arn)).setter(setter(Builder::arn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("arn").build()).build();
private static final SdkField AUTHORIZED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("authorized").getter(getter(UpdateChannelRequest::authorized)).setter(setter(Builder::authorized))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("authorized").build()).build();
private static final SdkField INSECURE_INGEST_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("insecureIngest").getter(getter(UpdateChannelRequest::insecureIngest))
.setter(setter(Builder::insecureIngest))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("insecureIngest").build()).build();
private static final SdkField LATENCY_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("latencyMode").getter(getter(UpdateChannelRequest::latencyModeAsString))
.setter(setter(Builder::latencyMode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("latencyMode").build()).build();
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
.getter(getter(UpdateChannelRequest::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();
private static final SdkField PRESET_FIELD = SdkField. builder(MarshallingType.STRING).memberName("preset")
.getter(getter(UpdateChannelRequest::presetAsString)).setter(setter(Builder::preset))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("preset").build()).build();
private static final SdkField RECORDING_CONFIGURATION_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("recordingConfigurationArn").getter(getter(UpdateChannelRequest::recordingConfigurationArn))
.setter(setter(Builder::recordingConfigurationArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("recordingConfigurationArn").build())
.build();
private static final SdkField TYPE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("type")
.getter(getter(UpdateChannelRequest::typeAsString)).setter(setter(Builder::type))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("type").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD, AUTHORIZED_FIELD,
INSECURE_INGEST_FIELD, LATENCY_MODE_FIELD, NAME_FIELD, PRESET_FIELD, RECORDING_CONFIGURATION_ARN_FIELD, TYPE_FIELD));
private final String arn;
private final Boolean authorized;
private final Boolean insecureIngest;
private final String latencyMode;
private final String name;
private final String preset;
private final String recordingConfigurationArn;
private final String type;
private UpdateChannelRequest(BuilderImpl builder) {
super(builder);
this.arn = builder.arn;
this.authorized = builder.authorized;
this.insecureIngest = builder.insecureIngest;
this.latencyMode = builder.latencyMode;
this.name = builder.name;
this.preset = builder.preset;
this.recordingConfigurationArn = builder.recordingConfigurationArn;
this.type = builder.type;
}
/**
*
* ARN of the channel to be updated.
*
*
* @return ARN of the channel to be updated.
*/
public final String arn() {
return arn;
}
/**
*
* Whether the channel is private (enabled for playback authorization).
*
*
* @return Whether the channel is private (enabled for playback authorization).
*/
public final Boolean authorized() {
return authorized;
}
/**
*
* 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;
}
/**
*
* Channel latency mode. Use NORMAL
to broadcast and deliver live video up to Full HD. Use
* LOW
for near-real-time interaction with viewers. (Note: In the Amazon IVS console, LOW
* and NORMAL
correspond to Ultra-low and Standard, respectively.)
*
*
* 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. (Note: In the Amazon IVS console,
* LOW
and NORMAL
correspond to Ultra-low and Standard, respectively.)
* @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. (Note: In the Amazon IVS console, LOW
* and NORMAL
correspond to Ultra-low and Standard, respectively.)
*
*
* 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. (Note: In the Amazon IVS console,
* LOW
and NORMAL
correspond to Ultra-low and Standard, respectively.)
* @see ChannelLatencyMode
*/
public final String latencyModeAsString() {
return latencyMode;
}
/**
*
* Channel name.
*
*
* @return Channel name.
*/
public final String name() {
return name;
}
/**
*
* 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;
}
/**
*
* Recording-configuration ARN. If this is set to an empty string, recording is disabled. A value other than an
* empty string indicates that recording is enabled
*
*
* @return Recording-configuration ARN. If this is set to an empty string, recording is disabled. A value other than
* an empty string indicates that recording is enabled
*/
public final String recordingConfigurationArn() {
return recordingConfigurationArn;
}
/**
*
* 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;
}
@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(authorized());
hashCode = 31 * hashCode + Objects.hashCode(insecureIngest());
hashCode = 31 * hashCode + Objects.hashCode(latencyModeAsString());
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(presetAsString());
hashCode = 31 * hashCode + Objects.hashCode(recordingConfigurationArn());
hashCode = 31 * hashCode + Objects.hashCode(typeAsString());
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 UpdateChannelRequest)) {
return false;
}
UpdateChannelRequest other = (UpdateChannelRequest) obj;
return Objects.equals(arn(), other.arn()) && Objects.equals(authorized(), other.authorized())
&& Objects.equals(insecureIngest(), other.insecureIngest())
&& Objects.equals(latencyModeAsString(), other.latencyModeAsString()) && Objects.equals(name(), other.name())
&& Objects.equals(presetAsString(), other.presetAsString())
&& Objects.equals(recordingConfigurationArn(), other.recordingConfigurationArn())
&& Objects.equals(typeAsString(), other.typeAsString());
}
/**
* 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("UpdateChannelRequest").add("Arn", arn()).add("Authorized", authorized())
.add("InsecureIngest", insecureIngest()).add("LatencyMode", latencyModeAsString()).add("Name", name())
.add("Preset", presetAsString()).add("RecordingConfigurationArn", recordingConfigurationArn())
.add("Type", typeAsString()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "arn":
return Optional.ofNullable(clazz.cast(arn()));
case "authorized":
return Optional.ofNullable(clazz.cast(authorized()));
case "insecureIngest":
return Optional.ofNullable(clazz.cast(insecureIngest()));
case "latencyMode":
return Optional.ofNullable(clazz.cast(latencyModeAsString()));
case "name":
return Optional.ofNullable(clazz.cast(name()));
case "preset":
return Optional.ofNullable(clazz.cast(presetAsString()));
case "recordingConfigurationArn":
return Optional.ofNullable(clazz.cast(recordingConfigurationArn()));
case "type":
return Optional.ofNullable(clazz.cast(typeAsString()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function