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

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

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

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



/**
 * An object representing the method header to be matched.
 */
public sealed class GrpcMetadataMatchMethod {
    /**
     * The exact method header to be matched on.
     */
    public data class Exact(val value: kotlin.String) : aws.sdk.kotlin.services.appmesh.model.GrpcMetadataMatchMethod() {
    }

    /**
     * The specified beginning characters of the method header to be matched on.
     */
    public data class Prefix(val value: kotlin.String) : aws.sdk.kotlin.services.appmesh.model.GrpcMetadataMatchMethod() {
    }

    /**
     * An object that represents the range of values to match on. The first character of the range is included in the range, though the last character is not. For example, if the range specified were 1-100, only values 1-99 would be matched.
     */
    public data class Range(val value: aws.sdk.kotlin.services.appmesh.model.MatchRange) : aws.sdk.kotlin.services.appmesh.model.GrpcMetadataMatchMethod() {
    }

    /**
     * The regex used to match the method header.
     */
    public data class Regex(val value: kotlin.String) : aws.sdk.kotlin.services.appmesh.model.GrpcMetadataMatchMethod() {
    }

    /**
     * The specified ending characters of the method header to match on.
     */
    public data class Suffix(val value: kotlin.String) : aws.sdk.kotlin.services.appmesh.model.GrpcMetadataMatchMethod() {
    }

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

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

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

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

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

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

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy