All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.kinesisvideo.model.SingleMasterChannelEndpointConfiguration.kt Maven / Gradle / Ivy

There is a newer version: 1.3.34
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.kinesisvideo.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * An object that contains the endpoint configuration for the `SINGLE_MASTER` channel type.
 */
public class SingleMasterChannelEndpointConfiguration private constructor(builder: Builder) {
    /**
     * This property is used to determine the nature of communication over this `SINGLE_MASTER` signaling channel. If `WSS` is specified, this API returns a websocket endpoint. If `HTTPS` is specified, this API returns an `HTTPS` endpoint.
     */
    public val protocols: List? = builder.protocols
    /**
     * This property is used to determine messaging permissions in this `SINGLE_MASTER` signaling channel. If `MASTER` is specified, this API returns an endpoint that a client can use to receive offers from and send answers to any of the viewers on this signaling channel. If `VIEWER` is specified, this API returns an endpoint that a client can use only to send offers to another `MASTER` client on this signaling channel.
     */
    public val role: aws.sdk.kotlin.services.kinesisvideo.model.ChannelRole? = builder.role

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesisvideo.model.SingleMasterChannelEndpointConfiguration = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("SingleMasterChannelEndpointConfiguration(")
        append("protocols=$protocols,")
        append("role=$role")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = protocols?.hashCode() ?: 0
        result = 31 * result + (role?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as SingleMasterChannelEndpointConfiguration

        if (protocols != other.protocols) return false
        if (role != other.role) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesisvideo.model.SingleMasterChannelEndpointConfiguration = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * This property is used to determine the nature of communication over this `SINGLE_MASTER` signaling channel. If `WSS` is specified, this API returns a websocket endpoint. If `HTTPS` is specified, this API returns an `HTTPS` endpoint.
         */
        public var protocols: List? = null
        /**
         * This property is used to determine messaging permissions in this `SINGLE_MASTER` signaling channel. If `MASTER` is specified, this API returns an endpoint that a client can use to receive offers from and send answers to any of the viewers on this signaling channel. If `VIEWER` is specified, this API returns an endpoint that a client can use only to send offers to another `MASTER` client on this signaling channel.
         */
        public var role: aws.sdk.kotlin.services.kinesisvideo.model.ChannelRole? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kinesisvideo.model.SingleMasterChannelEndpointConfiguration) : this() {
            this.protocols = x.protocols
            this.role = x.role
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.kinesisvideo.model.SingleMasterChannelEndpointConfiguration = SingleMasterChannelEndpointConfiguration(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy