commonMain.aws.sdk.kotlin.services.chimesdkmediapipelines.model.StreamConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chimesdkmediapipelines-jvm Show documentation
Show all versions of chimesdkmediapipelines-jvm Show documentation
The AWS SDK for Kotlin client for Chime SDK Media Pipelines
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.chimesdkmediapipelines.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The configuration settings for a stream.
*/
public class StreamConfiguration private constructor(builder: Builder) {
/**
* The unique identifier of the fragment to begin processing.
*/
public val fragmentNumber: kotlin.String? = builder.fragmentNumber
/**
* The ARN of the stream.
*/
public val streamArn: kotlin.String = requireNotNull(builder.streamArn) { "A non-null value must be provided for streamArn" }
/**
* The streaming channel definition in the stream configuration.
*/
public val streamChannelDefinition: aws.sdk.kotlin.services.chimesdkmediapipelines.model.StreamChannelDefinition? = builder.streamChannelDefinition
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.chimesdkmediapipelines.model.StreamConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StreamConfiguration(")
append("fragmentNumber=$fragmentNumber,")
append("streamArn=$streamArn,")
append("streamChannelDefinition=$streamChannelDefinition")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = fragmentNumber?.hashCode() ?: 0
result = 31 * result + (streamArn.hashCode())
result = 31 * result + (streamChannelDefinition?.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 StreamConfiguration
if (fragmentNumber != other.fragmentNumber) return false
if (streamArn != other.streamArn) return false
if (streamChannelDefinition != other.streamChannelDefinition) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.chimesdkmediapipelines.model.StreamConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique identifier of the fragment to begin processing.
*/
public var fragmentNumber: kotlin.String? = null
/**
* The ARN of the stream.
*/
public var streamArn: kotlin.String? = null
/**
* The streaming channel definition in the stream configuration.
*/
public var streamChannelDefinition: aws.sdk.kotlin.services.chimesdkmediapipelines.model.StreamChannelDefinition? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.chimesdkmediapipelines.model.StreamConfiguration) : this() {
this.fragmentNumber = x.fragmentNumber
this.streamArn = x.streamArn
this.streamChannelDefinition = x.streamChannelDefinition
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.chimesdkmediapipelines.model.StreamConfiguration = StreamConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.chimesdkmediapipelines.model.StreamChannelDefinition] inside the given [block]
*/
public fun streamChannelDefinition(block: aws.sdk.kotlin.services.chimesdkmediapipelines.model.StreamChannelDefinition.Builder.() -> kotlin.Unit) {
this.streamChannelDefinition = aws.sdk.kotlin.services.chimesdkmediapipelines.model.StreamChannelDefinition.invoke(block)
}
internal fun correctErrors(): Builder {
if (streamArn == null) streamArn = ""
return this
}
}
}