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

commonMain.aws.sdk.kotlin.services.appmesh.model.HeaderMatchMethod.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.appmesh.model



/**
 * An object that represents the method and value to match with the header value sent in a request. Specify one match method.
 */
public sealed class HeaderMatchMethod {
    /**
     * The value sent by the client must match the specified value exactly.
     */
    public data class Exact(val value: kotlin.String) : aws.sdk.kotlin.services.appmesh.model.HeaderMatchMethod() {
    }

    /**
     * The value sent by the client must begin with the specified characters.
     */
    public data class Prefix(val value: kotlin.String) : aws.sdk.kotlin.services.appmesh.model.HeaderMatchMethod() {
    }

    /**
     * An object that represents the range of values to match on.
     */
    public data class Range(val value: aws.sdk.kotlin.services.appmesh.model.MatchRange) : aws.sdk.kotlin.services.appmesh.model.HeaderMatchMethod() {
    }

    /**
     * The value sent by the client must include the specified characters.
     */
    public data class Regex(val value: kotlin.String) : aws.sdk.kotlin.services.appmesh.model.HeaderMatchMethod() {
    }

    /**
     * The value sent by the client must end with the specified characters.
     */
    public data class Suffix(val value: kotlin.String) : aws.sdk.kotlin.services.appmesh.model.HeaderMatchMethod() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.appmesh.model.HeaderMatchMethod() {
    }

    /**
     * Casts this [HeaderMatchMethod] as a [Exact] and retrieves its [kotlin.String] value. Throws an exception if the [HeaderMatchMethod] is not a
     * [Exact].
     */
    public fun asExact(): kotlin.String = (this as HeaderMatchMethod.Exact).value

    /**
     * Casts this [HeaderMatchMethod] as a [Exact] and retrieves its [kotlin.String] value. Returns null if the [HeaderMatchMethod] is not a [Exact].
     */
    public fun asExactOrNull(): kotlin.String? = (this as? HeaderMatchMethod.Exact)?.value

    /**
     * Casts this [HeaderMatchMethod] as a [Prefix] and retrieves its [kotlin.String] value. Throws an exception if the [HeaderMatchMethod] is not a
     * [Prefix].
     */
    public fun asPrefix(): kotlin.String = (this as HeaderMatchMethod.Prefix).value

    /**
     * Casts this [HeaderMatchMethod] as a [Prefix] and retrieves its [kotlin.String] value. Returns null if the [HeaderMatchMethod] is not a [Prefix].
     */
    public fun asPrefixOrNull(): kotlin.String? = (this as? HeaderMatchMethod.Prefix)?.value

    /**
     * Casts this [HeaderMatchMethod] as a [Range] and retrieves its [aws.sdk.kotlin.services.appmesh.model.MatchRange] value. Throws an exception if the [HeaderMatchMethod] is not a
     * [Range].
     */
    public fun asRange(): aws.sdk.kotlin.services.appmesh.model.MatchRange = (this as HeaderMatchMethod.Range).value

    /**
     * Casts this [HeaderMatchMethod] as a [Range] and retrieves its [aws.sdk.kotlin.services.appmesh.model.MatchRange] value. Returns null if the [HeaderMatchMethod] is not a [Range].
     */
    public fun asRangeOrNull(): aws.sdk.kotlin.services.appmesh.model.MatchRange? = (this as? HeaderMatchMethod.Range)?.value

    /**
     * Casts this [HeaderMatchMethod] as a [Regex] and retrieves its [kotlin.String] value. Throws an exception if the [HeaderMatchMethod] is not a
     * [Regex].
     */
    public fun asRegex(): kotlin.String = (this as HeaderMatchMethod.Regex).value

    /**
     * Casts this [HeaderMatchMethod] as a [Regex] and retrieves its [kotlin.String] value. Returns null if the [HeaderMatchMethod] is not a [Regex].
     */
    public fun asRegexOrNull(): kotlin.String? = (this as? HeaderMatchMethod.Regex)?.value

    /**
     * Casts this [HeaderMatchMethod] as a [Suffix] and retrieves its [kotlin.String] value. Throws an exception if the [HeaderMatchMethod] is not a
     * [Suffix].
     */
    public fun asSuffix(): kotlin.String = (this as HeaderMatchMethod.Suffix).value

    /**
     * Casts this [HeaderMatchMethod] as a [Suffix] and retrieves its [kotlin.String] value. Returns null if the [HeaderMatchMethod] is not a [Suffix].
     */
    public fun asSuffixOrNull(): kotlin.String? = (this as? HeaderMatchMethod.Suffix)?.value
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy