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

com.pulumi.gcp.compute.kotlin.outputs.URLMapPathMatcherRouteRuleMatchRuleHeaderMatch.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin.outputs

import kotlin.Boolean
import kotlin.String
import kotlin.Suppress

/**
 *
 * @property exactMatch The value should exactly match contents of exactMatch. Only one of exactMatch,
 * prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
 * @property headerName The name of the HTTP header to match. For matching against the HTTP request's
 * authority, use a headerMatch with the header name ":authority". For matching a
 * request's method, use the headerName ":method".
 * @property invertMatch If set to false, the headerMatch is considered a match if the match criteria
 * above are met. If set to true, the headerMatch is considered a match if the
 * match criteria above are NOT met. Defaults to false.
 * @property prefixMatch The value of the header must start with the contents of prefixMatch. Only one of
 * exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch
 * must be set.
 * @property presentMatch A header with the contents of headerName must exist. The match takes place
 * whether or not the request's header has a value or not. Only one of exactMatch,
 * prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
 * @property rangeMatch The header value must be an integer and its value must be in the range specified
 * in rangeMatch. If the header does not contain an integer, number or is empty,
 * the match fails. For example for a range [-5, 0]   - -3 will match.  - 0 will
 * not match.  - 0.25 will not match.  - -3someString will not match.   Only one of
 * exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch
 * must be set.
 * Structure is documented below.
 * @property regexMatch The value of the header must match the regular expression specified in
 * regexMatch. For regular expression grammar, please see:
 * en.cppreference.com/w/cpp/regex/ecmascript  For matching against a port
 * specified in the HTTP request, use a headerMatch with headerName set to PORT and
 * a regular expression that satisfies the RFC2616 Host header's port specifier.
 * Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or
 * rangeMatch must be set.
 * @property suffixMatch The value of the header must end with the contents of suffixMatch. Only one of
 * exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch
 * must be set.
 */
public data class URLMapPathMatcherRouteRuleMatchRuleHeaderMatch(
    public val exactMatch: String? = null,
    public val headerName: String,
    public val invertMatch: Boolean? = null,
    public val prefixMatch: String? = null,
    public val presentMatch: Boolean? = null,
    public val rangeMatch: URLMapPathMatcherRouteRuleMatchRuleHeaderMatchRangeMatch? = null,
    public val regexMatch: String? = null,
    public val suffixMatch: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.compute.outputs.URLMapPathMatcherRouteRuleMatchRuleHeaderMatch): URLMapPathMatcherRouteRuleMatchRuleHeaderMatch =
            URLMapPathMatcherRouteRuleMatchRuleHeaderMatch(
                exactMatch = javaType.exactMatch().map({ args0 -> args0 }).orElse(null),
                headerName = javaType.headerName(),
                invertMatch = javaType.invertMatch().map({ args0 -> args0 }).orElse(null),
                prefixMatch = javaType.prefixMatch().map({ args0 -> args0 }).orElse(null),
                presentMatch = javaType.presentMatch().map({ args0 -> args0 }).orElse(null),
                rangeMatch = javaType.rangeMatch().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.gcp.compute.kotlin.outputs.URLMapPathMatcherRouteRuleMatchRuleHeaderMatchRangeMatch.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                regexMatch = javaType.regexMatch().map({ args0 -> args0 }).orElse(null),
                suffixMatch = javaType.suffixMatch().map({ args0 -> args0 }).orElse(null),
            )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy