commonMain.aws.sdk.kotlin.services.cognitosync.model.CognitoStreams.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cognitosync-jvm Show documentation
Show all versions of cognitosync-jvm Show documentation
The AWS SDK for Kotlin client for Cognito Sync
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cognitosync.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Configuration options for configure Cognito streams.
*/
public class CognitoStreams private constructor(builder: Builder) {
/**
* The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.
*/
public val streamName: kotlin.String? = builder.streamName
/**
* Status of the Cognito streams. Valid values are: ENABLED - Streaming of updates to identity pool is enabled.
*
* DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.
*/
public val streamingStatus: aws.sdk.kotlin.services.cognitosync.model.StreamingStatus? = builder.streamingStatus
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cognitosync.model.CognitoStreams = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CognitoStreams(")
append("roleArn=$roleArn,")
append("streamName=$streamName,")
append("streamingStatus=$streamingStatus")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = roleArn?.hashCode() ?: 0
result = 31 * result + (streamName?.hashCode() ?: 0)
result = 31 * result + (streamingStatus?.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 CognitoStreams
if (roleArn != other.roleArn) return false
if (streamName != other.streamName) return false
if (streamingStatus != other.streamingStatus) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cognitosync.model.CognitoStreams = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.
*/
public var roleArn: kotlin.String? = null
/**
* The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.
*/
public var streamName: kotlin.String? = null
/**
* Status of the Cognito streams. Valid values are: ENABLED - Streaming of updates to identity pool is enabled.
*
* DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.
*/
public var streamingStatus: aws.sdk.kotlin.services.cognitosync.model.StreamingStatus? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cognitosync.model.CognitoStreams) : this() {
this.roleArn = x.roleArn
this.streamName = x.streamName
this.streamingStatus = x.streamingStatus
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cognitosync.model.CognitoStreams = CognitoStreams(this)
internal fun correctErrors(): Builder {
return this
}
}
}