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

commonMain.aws.sdk.kotlin.services.applicationsignals.model.Interval.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.applicationsignals.model



/**
 * The time period used to evaluate the SLO. It can be either a calendar interval or rolling interval.
 */
public sealed class Interval {
    /**
     * If the interval is a calendar interval, this structure contains the interval specifications.
     */
    public data class CalendarInterval(val value: aws.sdk.kotlin.services.applicationsignals.model.CalendarInterval) : aws.sdk.kotlin.services.applicationsignals.model.Interval() {
    }

    /**
     * If the interval is a rolling interval, this structure contains the interval specifications.
     */
    public data class RollingInterval(val value: aws.sdk.kotlin.services.applicationsignals.model.RollingInterval) : aws.sdk.kotlin.services.applicationsignals.model.Interval() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.applicationsignals.model.Interval() {
    }

    /**
     * Casts this [Interval] as a [CalendarInterval] and retrieves its [aws.sdk.kotlin.services.applicationsignals.model.CalendarInterval] value. Throws an exception if the [Interval] is not a
     * [CalendarInterval].
     */
    public fun asCalendarInterval(): aws.sdk.kotlin.services.applicationsignals.model.CalendarInterval = (this as Interval.CalendarInterval).value

    /**
     * Casts this [Interval] as a [CalendarInterval] and retrieves its [aws.sdk.kotlin.services.applicationsignals.model.CalendarInterval] value. Returns null if the [Interval] is not a [CalendarInterval].
     */
    public fun asCalendarIntervalOrNull(): aws.sdk.kotlin.services.applicationsignals.model.CalendarInterval? = (this as? Interval.CalendarInterval)?.value

    /**
     * Casts this [Interval] as a [RollingInterval] and retrieves its [aws.sdk.kotlin.services.applicationsignals.model.RollingInterval] value. Throws an exception if the [Interval] is not a
     * [RollingInterval].
     */
    public fun asRollingInterval(): aws.sdk.kotlin.services.applicationsignals.model.RollingInterval = (this as Interval.RollingInterval).value

    /**
     * Casts this [Interval] as a [RollingInterval] and retrieves its [aws.sdk.kotlin.services.applicationsignals.model.RollingInterval] value. Returns null if the [Interval] is not a [RollingInterval].
     */
    public fun asRollingIntervalOrNull(): aws.sdk.kotlin.services.applicationsignals.model.RollingInterval? = (this as? Interval.RollingInterval)?.value
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy