
commonMain.aws.sdk.kotlin.services.chimesdkmessaging.model.PushNotificationPreferences.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.chimesdkmessaging.model
/**
* The channel membership preferences for push notification.
*/
public class PushNotificationPreferences private constructor(builder: Builder) {
/**
* Enum value that indicates which push notifications to send to the requested member of a channel. `ALL` sends all push notifications, `NONE` sends no push notifications, `FILTERED` sends only filtered push notifications.
*/
public val allowNotifications: aws.sdk.kotlin.services.chimesdkmessaging.model.AllowNotifications = requireNotNull(builder.allowNotifications) { "A non-null value must be provided for allowNotifications" }
/**
* The simple JSON object used to send a subset of a push notification to the requested member.
*/
public val filterRule: kotlin.String? = builder.filterRule
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.chimesdkmessaging.model.PushNotificationPreferences = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PushNotificationPreferences(")
append("allowNotifications=$allowNotifications,")
append("filterRule=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = allowNotifications.hashCode()
result = 31 * result + (filterRule?.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 PushNotificationPreferences
if (allowNotifications != other.allowNotifications) return false
if (filterRule != other.filterRule) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.chimesdkmessaging.model.PushNotificationPreferences = Builder(this).apply(block).build()
public class Builder {
/**
* Enum value that indicates which push notifications to send to the requested member of a channel. `ALL` sends all push notifications, `NONE` sends no push notifications, `FILTERED` sends only filtered push notifications.
*/
public var allowNotifications: aws.sdk.kotlin.services.chimesdkmessaging.model.AllowNotifications? = null
/**
* The simple JSON object used to send a subset of a push notification to the requested member.
*/
public var filterRule: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.chimesdkmessaging.model.PushNotificationPreferences) : this() {
this.allowNotifications = x.allowNotifications
this.filterRule = x.filterRule
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.chimesdkmessaging.model.PushNotificationPreferences = PushNotificationPreferences(this)
internal fun correctErrors(): Builder {
if (allowNotifications == null) allowNotifications = AllowNotifications.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy