software.amazon.awssdk.services.connect.model.MediaPlacement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connect Show documentation
Show all versions of connect Show documentation
The AWS Java SDK for Connect module holds the client classes that are used for
communicating with Connect.
/*
* 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.connect.model;
import java.io.Serializable;
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.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.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* A set of endpoints used by clients to connect to the media service group for an Amazon Chime SDK meeting.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class MediaPlacement implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField AUDIO_HOST_URL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AudioHostUrl").getter(getter(MediaPlacement::audioHostUrl)).setter(setter(Builder::audioHostUrl))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AudioHostUrl").build()).build();
private static final SdkField AUDIO_FALLBACK_URL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AudioFallbackUrl").getter(getter(MediaPlacement::audioFallbackUrl))
.setter(setter(Builder::audioFallbackUrl))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AudioFallbackUrl").build()).build();
private static final SdkField SIGNALING_URL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("SignalingUrl").getter(getter(MediaPlacement::signalingUrl)).setter(setter(Builder::signalingUrl))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SignalingUrl").build()).build();
private static final SdkField TURN_CONTROL_URL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TurnControlUrl").getter(getter(MediaPlacement::turnControlUrl)).setter(setter(Builder::turnControlUrl))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TurnControlUrl").build()).build();
private static final SdkField EVENT_INGESTION_URL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("EventIngestionUrl").getter(getter(MediaPlacement::eventIngestionUrl))
.setter(setter(Builder::eventIngestionUrl))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EventIngestionUrl").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AUDIO_HOST_URL_FIELD,
AUDIO_FALLBACK_URL_FIELD, SIGNALING_URL_FIELD, TURN_CONTROL_URL_FIELD, EVENT_INGESTION_URL_FIELD));
private static final long serialVersionUID = 1L;
private final String audioHostUrl;
private final String audioFallbackUrl;
private final String signalingUrl;
private final String turnControlUrl;
private final String eventIngestionUrl;
private MediaPlacement(BuilderImpl builder) {
this.audioHostUrl = builder.audioHostUrl;
this.audioFallbackUrl = builder.audioFallbackUrl;
this.signalingUrl = builder.signalingUrl;
this.turnControlUrl = builder.turnControlUrl;
this.eventIngestionUrl = builder.eventIngestionUrl;
}
/**
*
* The audio host URL.
*
*
* @return The audio host URL.
*/
public final String audioHostUrl() {
return audioHostUrl;
}
/**
*
* The audio fallback URL.
*
*
* @return The audio fallback URL.
*/
public final String audioFallbackUrl() {
return audioFallbackUrl;
}
/**
*
* The signaling URL.
*
*
* @return The signaling URL.
*/
public final String signalingUrl() {
return signalingUrl;
}
/**
*
* The turn control URL.
*
*
* @return The turn control URL.
*/
public final String turnControlUrl() {
return turnControlUrl;
}
/**
*
* The event ingestion URL to which you send client meeting events.
*
*
* @return The event ingestion URL to which you send client meeting events.
*/
public final String eventIngestionUrl() {
return eventIngestionUrl;
}
@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(audioHostUrl());
hashCode = 31 * hashCode + Objects.hashCode(audioFallbackUrl());
hashCode = 31 * hashCode + Objects.hashCode(signalingUrl());
hashCode = 31 * hashCode + Objects.hashCode(turnControlUrl());
hashCode = 31 * hashCode + Objects.hashCode(eventIngestionUrl());
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 MediaPlacement)) {
return false;
}
MediaPlacement other = (MediaPlacement) obj;
return Objects.equals(audioHostUrl(), other.audioHostUrl())
&& Objects.equals(audioFallbackUrl(), other.audioFallbackUrl())
&& Objects.equals(signalingUrl(), other.signalingUrl())
&& Objects.equals(turnControlUrl(), other.turnControlUrl())
&& Objects.equals(eventIngestionUrl(), other.eventIngestionUrl());
}
/**
* 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("MediaPlacement").add("AudioHostUrl", audioHostUrl()).add("AudioFallbackUrl", audioFallbackUrl())
.add("SignalingUrl", signalingUrl()).add("TurnControlUrl", turnControlUrl())
.add("EventIngestionUrl", eventIngestionUrl()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "AudioHostUrl":
return Optional.ofNullable(clazz.cast(audioHostUrl()));
case "AudioFallbackUrl":
return Optional.ofNullable(clazz.cast(audioFallbackUrl()));
case "SignalingUrl":
return Optional.ofNullable(clazz.cast(signalingUrl()));
case "TurnControlUrl":
return Optional.ofNullable(clazz.cast(turnControlUrl()));
case "EventIngestionUrl":
return Optional.ofNullable(clazz.cast(eventIngestionUrl()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function