com.pulumi.gcp.cloudscheduler.kotlin.outputs.JobHttpTarget.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.cloudscheduler.kotlin.outputs
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
/**
*
* @property body HTTP request body.
* A request body is allowed only if the HTTP method is POST, PUT, or PATCH.
* It is an error to set body on a job with an incompatible HttpMethod.
* A base64-encoded string.
* @property headers This map contains the header field names and values.
* Repeated headers are not supported, but a header value can contain commas.
* @property httpMethod Which HTTP method to use for the request.
* @property oauthToken Contains information needed for generating an OAuth token.
* This type of authorization should be used when sending requests to a GCP endpoint.
* Structure is documented below.
* @property oidcToken Contains information needed for generating an OpenID Connect token.
* This type of authorization should be used when sending requests to third party endpoints or Cloud Run.
* Structure is documented below.
* @property uri The full URI path that the request will be sent to.
*/
public data class JobHttpTarget(
public val body: String? = null,
public val headers: Map? = null,
public val httpMethod: String? = null,
public val oauthToken: JobHttpTargetOauthToken? = null,
public val oidcToken: JobHttpTargetOidcToken? = null,
public val uri: String,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.gcp.cloudscheduler.outputs.JobHttpTarget): JobHttpTarget = JobHttpTarget(
body = javaType.body().map({ args0 -> args0 }).orElse(null),
headers = javaType.headers().map({ args0 -> args0.key.to(args0.value) }).toMap(),
httpMethod = javaType.httpMethod().map({ args0 -> args0 }).orElse(null),
oauthToken = javaType.oauthToken().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.cloudscheduler.kotlin.outputs.JobHttpTargetOauthToken.Companion.toKotlin(args0)
})
}).orElse(null),
oidcToken = javaType.oidcToken().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.cloudscheduler.kotlin.outputs.JobHttpTargetOidcToken.Companion.toKotlin(args0)
})
}).orElse(null),
uri = javaType.uri(),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy