
commonMain.aws.sdk.kotlin.services.ivs.model.UpdatePlaybackRestrictionPolicyRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ivs.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdatePlaybackRestrictionPolicyRequest private constructor(builder: Builder) {
/**
* A list of country codes that control geoblocking restriction. Allowed values are the officially assigned [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes. Default: All countries (an empty array).
*/
public val allowedCountries: List? = builder.allowedCountries
/**
* A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin header defined at [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin). Default: All origins (an empty array).
*/
public val allowedOrigins: List? = builder.allowedOrigins
/**
* ARN of the playback-restriction-policy to be updated.
*/
public val arn: kotlin.String? = builder.arn
/**
* Whether channel playback is constrained by origin site. Default: `false`.
*/
public val enableStrictOriginEnforcement: kotlin.Boolean? = builder.enableStrictOriginEnforcement
/**
* Playback-restriction-policy name. The value does not need to be unique.
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ivs.model.UpdatePlaybackRestrictionPolicyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdatePlaybackRestrictionPolicyRequest(")
append("allowedCountries=$allowedCountries,")
append("allowedOrigins=$allowedOrigins,")
append("arn=$arn,")
append("enableStrictOriginEnforcement=$enableStrictOriginEnforcement,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = allowedCountries?.hashCode() ?: 0
result = 31 * result + (allowedOrigins?.hashCode() ?: 0)
result = 31 * result + (arn?.hashCode() ?: 0)
result = 31 * result + (enableStrictOriginEnforcement?.hashCode() ?: 0)
result = 31 * result + (name?.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 UpdatePlaybackRestrictionPolicyRequest
if (allowedCountries != other.allowedCountries) return false
if (allowedOrigins != other.allowedOrigins) return false
if (arn != other.arn) return false
if (enableStrictOriginEnforcement != other.enableStrictOriginEnforcement) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ivs.model.UpdatePlaybackRestrictionPolicyRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of country codes that control geoblocking restriction. Allowed values are the officially assigned [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes. Default: All countries (an empty array).
*/
public var allowedCountries: List? = null
/**
* A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin header defined at [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin). Default: All origins (an empty array).
*/
public var allowedOrigins: List? = null
/**
* ARN of the playback-restriction-policy to be updated.
*/
public var arn: kotlin.String? = null
/**
* Whether channel playback is constrained by origin site. Default: `false`.
*/
public var enableStrictOriginEnforcement: kotlin.Boolean? = null
/**
* Playback-restriction-policy name. The value does not need to be unique.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ivs.model.UpdatePlaybackRestrictionPolicyRequest) : this() {
this.allowedCountries = x.allowedCountries
this.allowedOrigins = x.allowedOrigins
this.arn = x.arn
this.enableStrictOriginEnforcement = x.enableStrictOriginEnforcement
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ivs.model.UpdatePlaybackRestrictionPolicyRequest = UpdatePlaybackRestrictionPolicyRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy