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

com.pulumi.gcp.projects.kotlin.outputs.ApiKeyRestrictions.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.projects.kotlin.outputs

import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property androidKeyRestrictions The Android apps that are allowed to use the key.
 * @property apiTargets A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
 * @property browserKeyRestrictions The HTTP referrers (websites) that are allowed to use the key.
 * @property iosKeyRestrictions The iOS apps that are allowed to use the key.
 * @property serverKeyRestrictions The IP addresses of callers that are allowed to use the key.
 */
public data class ApiKeyRestrictions(
    public val androidKeyRestrictions: ApiKeyRestrictionsAndroidKeyRestrictions? = null,
    public val apiTargets: List? = null,
    public val browserKeyRestrictions: ApiKeyRestrictionsBrowserKeyRestrictions? = null,
    public val iosKeyRestrictions: ApiKeyRestrictionsIosKeyRestrictions? = null,
    public val serverKeyRestrictions: ApiKeyRestrictionsServerKeyRestrictions? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.projects.outputs.ApiKeyRestrictions): ApiKeyRestrictions = ApiKeyRestrictions(
            androidKeyRestrictions = javaType.androidKeyRestrictions().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.projects.kotlin.outputs.ApiKeyRestrictionsAndroidKeyRestrictions.Companion.toKotlin(args0)
                })
            }).orElse(null),
            apiTargets = javaType.apiTargets().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.projects.kotlin.outputs.ApiKeyRestrictionsApiTarget.Companion.toKotlin(args0)
                })
            }),
            browserKeyRestrictions = javaType.browserKeyRestrictions().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.projects.kotlin.outputs.ApiKeyRestrictionsBrowserKeyRestrictions.Companion.toKotlin(args0)
                })
            }).orElse(null),
            iosKeyRestrictions = javaType.iosKeyRestrictions().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.projects.kotlin.outputs.ApiKeyRestrictionsIosKeyRestrictions.Companion.toKotlin(args0)
                })
            }).orElse(null),
            serverKeyRestrictions = javaType.serverKeyRestrictions().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.projects.kotlin.outputs.ApiKeyRestrictionsServerKeyRestrictions.Companion.toKotlin(args0)
                })
            }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy