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

com.pulumi.gcp.memcache.kotlin.inputs.InstanceMaintenancePolicyArgs.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.memcache.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.memcache.inputs.InstanceMaintenancePolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property createTime (Output)
 * Output only. The time when the policy was created.
 * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond
 * resolution and up to nine fractional digits
 * @property description Optional. Description of what this policy is for.
 * Create/Update methods return INVALID_ARGUMENT if the
 * length is greater than 512.
 * @property updateTime (Output)
 * Output only. The time when the policy was updated.
 * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond
 * resolution and up to nine fractional digits.
 * @property weeklyMaintenanceWindows Required. Maintenance window that is applied to resources covered by this policy.
 * Minimum 1. For the current version, the maximum number of weekly_maintenance_windows
 * is expected to be one.
 * Structure is documented below.
 */
public data class InstanceMaintenancePolicyArgs(
    public val createTime: Output? = null,
    public val description: Output? = null,
    public val updateTime: Output? = null,
    public val weeklyMaintenanceWindows: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.memcache.inputs.InstanceMaintenancePolicyArgs =
        com.pulumi.gcp.memcache.inputs.InstanceMaintenancePolicyArgs.builder()
            .createTime(createTime?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .updateTime(updateTime?.applyValue({ args0 -> args0 }))
            .weeklyMaintenanceWindows(
                weeklyMaintenanceWindows.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [InstanceMaintenancePolicyArgs].
 */
@PulumiTagMarker
public class InstanceMaintenancePolicyArgsBuilder internal constructor() {
    private var createTime: Output? = null

    private var description: Output? = null

    private var updateTime: Output? = null

    private var weeklyMaintenanceWindows:
        Output>? = null

    /**
     * @param value (Output)
     * Output only. The time when the policy was created.
     * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond
     * resolution and up to nine fractional digits
     */
    @JvmName("cokmirflskysrbya")
    public suspend fun createTime(`value`: Output) {
        this.createTime = value
    }

    /**
     * @param value Optional. Description of what this policy is for.
     * Create/Update methods return INVALID_ARGUMENT if the
     * length is greater than 512.
     */
    @JvmName("ekasgkpwpmmfvhsr")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value (Output)
     * Output only. The time when the policy was updated.
     * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond
     * resolution and up to nine fractional digits.
     */
    @JvmName("dschlogqaaewjrmx")
    public suspend fun updateTime(`value`: Output) {
        this.updateTime = value
    }

    /**
     * @param value Required. Maintenance window that is applied to resources covered by this policy.
     * Minimum 1. For the current version, the maximum number of weekly_maintenance_windows
     * is expected to be one.
     * Structure is documented below.
     */
    @JvmName("ewfimwrblxwhxkcd")
    public suspend fun weeklyMaintenanceWindows(`value`: Output>) {
        this.weeklyMaintenanceWindows = value
    }

    @JvmName("qfirdfppowhieorn")
    public suspend fun weeklyMaintenanceWindows(vararg values: Output) {
        this.weeklyMaintenanceWindows = Output.all(values.asList())
    }

    /**
     * @param values Required. Maintenance window that is applied to resources covered by this policy.
     * Minimum 1. For the current version, the maximum number of weekly_maintenance_windows
     * is expected to be one.
     * Structure is documented below.
     */
    @JvmName("dawjrvdjbnqemvdx")
    public suspend fun weeklyMaintenanceWindows(values: List>) {
        this.weeklyMaintenanceWindows = Output.all(values)
    }

    /**
     * @param value (Output)
     * Output only. The time when the policy was created.
     * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond
     * resolution and up to nine fractional digits
     */
    @JvmName("xhgpqajbldeaheja")
    public suspend fun createTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.createTime = mapped
    }

    /**
     * @param value Optional. Description of what this policy is for.
     * Create/Update methods return INVALID_ARGUMENT if the
     * length is greater than 512.
     */
    @JvmName("iqrqayhdqposobqd")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value (Output)
     * Output only. The time when the policy was updated.
     * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond
     * resolution and up to nine fractional digits.
     */
    @JvmName("lnpipthxfcwanyvu")
    public suspend fun updateTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.updateTime = mapped
    }

    /**
     * @param value Required. Maintenance window that is applied to resources covered by this policy.
     * Minimum 1. For the current version, the maximum number of weekly_maintenance_windows
     * is expected to be one.
     * Structure is documented below.
     */
    @JvmName("dqniuemrujjlxykf")
    public suspend fun weeklyMaintenanceWindows(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.weeklyMaintenanceWindows = mapped
    }

    /**
     * @param argument Required. Maintenance window that is applied to resources covered by this policy.
     * Minimum 1. For the current version, the maximum number of weekly_maintenance_windows
     * is expected to be one.
     * Structure is documented below.
     */
    @JvmName("nttvswnrotnbxpoj")
    public suspend fun weeklyMaintenanceWindows(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InstanceMaintenancePolicyWeeklyMaintenanceWindowArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.weeklyMaintenanceWindows = mapped
    }

    /**
     * @param argument Required. Maintenance window that is applied to resources covered by this policy.
     * Minimum 1. For the current version, the maximum number of weekly_maintenance_windows
     * is expected to be one.
     * Structure is documented below.
     */
    @JvmName("vxvfstmldbixpqts")
    public suspend fun weeklyMaintenanceWindows(vararg argument: suspend InstanceMaintenancePolicyWeeklyMaintenanceWindowArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InstanceMaintenancePolicyWeeklyMaintenanceWindowArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.weeklyMaintenanceWindows = mapped
    }

    /**
     * @param argument Required. Maintenance window that is applied to resources covered by this policy.
     * Minimum 1. For the current version, the maximum number of weekly_maintenance_windows
     * is expected to be one.
     * Structure is documented below.
     */
    @JvmName("vkhtfvxcusekprwg")
    public suspend fun weeklyMaintenanceWindows(argument: suspend InstanceMaintenancePolicyWeeklyMaintenanceWindowArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                InstanceMaintenancePolicyWeeklyMaintenanceWindowArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.weeklyMaintenanceWindows = mapped
    }

    /**
     * @param values Required. Maintenance window that is applied to resources covered by this policy.
     * Minimum 1. For the current version, the maximum number of weekly_maintenance_windows
     * is expected to be one.
     * Structure is documented below.
     */
    @JvmName("bjmseryqjktoocqc")
    public suspend fun weeklyMaintenanceWindows(vararg values: InstanceMaintenancePolicyWeeklyMaintenanceWindowArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.weeklyMaintenanceWindows = mapped
    }

    internal fun build(): InstanceMaintenancePolicyArgs = InstanceMaintenancePolicyArgs(
        createTime = createTime,
        description = description,
        updateTime = updateTime,
        weeklyMaintenanceWindows = weeklyMaintenanceWindows ?: throw
            PulumiNullFieldException("weeklyMaintenanceWindows"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy