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

com.pulumi.kubernetes.events.v1.kotlin.EventPatchArgs.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: 4.18.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.events.v1.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.core.v1.kotlin.inputs.EventSourcePatchArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.EventSourcePatchArgsBuilder
import com.pulumi.kubernetes.core.v1.kotlin.inputs.ObjectReferencePatchArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.ObjectReferencePatchArgsBuilder
import com.pulumi.kubernetes.events.v1.EventPatchArgs.builder
import com.pulumi.kubernetes.events.v1.kotlin.inputs.EventSeriesPatchArgs
import com.pulumi.kubernetes.events.v1.kotlin.inputs.EventSeriesPatchArgsBuilder
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.ObjectMetaPatchArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.ObjectMetaPatchArgsBuilder
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Patch resources are used to modify existing Kubernetes resources by using
 * Server-Side Apply updates. The name of the resource must be specified, but all other properties are optional. More than
 * one patch may be applied to the same resource, and a random FieldManager name will be used for each Patch resource.
 * Conflicts will result in an error by default, but can be forced using the "pulumi.com/patchForce" annotation. See the
 * [Server-Side Apply Docs](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/) for
 * additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi.
 * Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time.  Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason.  Events should be treated as informative, best-effort, supplemental data.
 * @property action action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.
 * @property apiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 * @property deprecatedCount deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
 * @property deprecatedFirstTimestamp deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
 * @property deprecatedLastTimestamp deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
 * @property deprecatedSource deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
 * @property eventTime eventTime is the time when this Event was first observed. It is required.
 * @property kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 * @property metadata Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
 * @property note note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
 * @property reason reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.
 * @property regarding regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
 * @property related related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
 * @property reportingController reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.
 * @property reportingInstance reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.
 * @property series series is data about the Event series this event represents or nil if it's a singleton Event.
 * @property type type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.
 */
public data class EventPatchArgs(
    public val action: Output? = null,
    public val apiVersion: Output? = null,
    public val deprecatedCount: Output? = null,
    public val deprecatedFirstTimestamp: Output? = null,
    public val deprecatedLastTimestamp: Output? = null,
    public val deprecatedSource: Output? = null,
    public val eventTime: Output? = null,
    public val kind: Output? = null,
    public val metadata: Output? = null,
    public val note: Output? = null,
    public val reason: Output? = null,
    public val regarding: Output? = null,
    public val related: Output? = null,
    public val reportingController: Output? = null,
    public val reportingInstance: Output? = null,
    public val series: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.events.v1.EventPatchArgs =
        com.pulumi.kubernetes.events.v1.EventPatchArgs.builder()
            .action(action?.applyValue({ args0 -> args0 }))
            .apiVersion(apiVersion?.applyValue({ args0 -> args0 }))
            .deprecatedCount(deprecatedCount?.applyValue({ args0 -> args0 }))
            .deprecatedFirstTimestamp(deprecatedFirstTimestamp?.applyValue({ args0 -> args0 }))
            .deprecatedLastTimestamp(deprecatedLastTimestamp?.applyValue({ args0 -> args0 }))
            .deprecatedSource(deprecatedSource?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .eventTime(eventTime?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .metadata(metadata?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .note(note?.applyValue({ args0 -> args0 }))
            .reason(reason?.applyValue({ args0 -> args0 }))
            .regarding(regarding?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .related(related?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .reportingController(reportingController?.applyValue({ args0 -> args0 }))
            .reportingInstance(reportingInstance?.applyValue({ args0 -> args0 }))
            .series(series?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [EventPatchArgs].
 */
@PulumiTagMarker
public class EventPatchArgsBuilder internal constructor() {
    private var action: Output? = null

    private var apiVersion: Output? = null

    private var deprecatedCount: Output? = null

    private var deprecatedFirstTimestamp: Output? = null

    private var deprecatedLastTimestamp: Output? = null

    private var deprecatedSource: Output? = null

    private var eventTime: Output? = null

    private var kind: Output? = null

    private var metadata: Output? = null

    private var note: Output? = null

    private var reason: Output? = null

    private var regarding: Output? = null

    private var related: Output? = null

    private var reportingController: Output? = null

    private var reportingInstance: Output? = null

    private var series: Output? = null

    private var type: Output? = null

    /**
     * @param value action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.
     */
    @JvmName("kyjmbyeysdunewyk")
    public suspend fun action(`value`: Output) {
        this.action = value
    }

    /**
     * @param value APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
     */
    @JvmName("lnqonlnyagrwlogy")
    public suspend fun apiVersion(`value`: Output) {
        this.apiVersion = value
    }

    /**
     * @param value deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
     */
    @JvmName("goklxxbacdalhfya")
    public suspend fun deprecatedCount(`value`: Output) {
        this.deprecatedCount = value
    }

    /**
     * @param value deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
     */
    @JvmName("etqkrldekinshudb")
    public suspend fun deprecatedFirstTimestamp(`value`: Output) {
        this.deprecatedFirstTimestamp = value
    }

    /**
     * @param value deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
     */
    @JvmName("kxlbthlxoqtilxty")
    public suspend fun deprecatedLastTimestamp(`value`: Output) {
        this.deprecatedLastTimestamp = value
    }

    /**
     * @param value deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
     */
    @JvmName("lbqntpvavldekwgq")
    public suspend fun deprecatedSource(`value`: Output) {
        this.deprecatedSource = value
    }

    /**
     * @param value eventTime is the time when this Event was first observed. It is required.
     */
    @JvmName("qsfapwmufqxnivet")
    public suspend fun eventTime(`value`: Output) {
        this.eventTime = value
    }

    /**
     * @param value Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
     */
    @JvmName("gkgtavjsdwoxijov")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
     */
    @JvmName("vmckqsocuwoqxgid")
    public suspend fun metadata(`value`: Output) {
        this.metadata = value
    }

    /**
     * @param value note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
     */
    @JvmName("jcmhuqxrjxtlyqac")
    public suspend fun note(`value`: Output) {
        this.note = value
    }

    /**
     * @param value reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.
     */
    @JvmName("dqtiknkypqbxrlik")
    public suspend fun reason(`value`: Output) {
        this.reason = value
    }

    /**
     * @param value regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
     */
    @JvmName("qeeeebwwxdyliurh")
    public suspend fun regarding(`value`: Output) {
        this.regarding = value
    }

    /**
     * @param value related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
     */
    @JvmName("yadohgeyikybsfbt")
    public suspend fun related(`value`: Output) {
        this.related = value
    }

    /**
     * @param value reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.
     */
    @JvmName("mjrskvycwvjnvxno")
    public suspend fun reportingController(`value`: Output) {
        this.reportingController = value
    }

    /**
     * @param value reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.
     */
    @JvmName("wgbhpspsouhmusyo")
    public suspend fun reportingInstance(`value`: Output) {
        this.reportingInstance = value
    }

    /**
     * @param value series is data about the Event series this event represents or nil if it's a singleton Event.
     */
    @JvmName("oeaqbbkjerbmhmqv")
    public suspend fun series(`value`: Output) {
        this.series = value
    }

    /**
     * @param value type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.
     */
    @JvmName("sduwmracxufdewxx")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.
     */
    @JvmName("txjcdvuixnmjmkjd")
    public suspend fun action(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param value APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
     */
    @JvmName("dtvckewcocwqjipk")
    public suspend fun apiVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiVersion = mapped
    }

    /**
     * @param value deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
     */
    @JvmName("ehwgvsbdetoetogh")
    public suspend fun deprecatedCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deprecatedCount = mapped
    }

    /**
     * @param value deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
     */
    @JvmName("hqmcnvyueyvytcyl")
    public suspend fun deprecatedFirstTimestamp(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deprecatedFirstTimestamp = mapped
    }

    /**
     * @param value deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
     */
    @JvmName("wwbyobuporqwiwnr")
    public suspend fun deprecatedLastTimestamp(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deprecatedLastTimestamp = mapped
    }

    /**
     * @param value deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
     */
    @JvmName("rpfttuebryxanxuh")
    public suspend fun deprecatedSource(`value`: EventSourcePatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deprecatedSource = mapped
    }

    /**
     * @param argument deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
     */
    @JvmName("npilkkclesyeiowl")
    public suspend fun deprecatedSource(argument: suspend EventSourcePatchArgsBuilder.() -> Unit) {
        val toBeMapped = EventSourcePatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.deprecatedSource = mapped
    }

    /**
     * @param value eventTime is the time when this Event was first observed. It is required.
     */
    @JvmName("mjhdnivcvluyhpvx")
    public suspend fun eventTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventTime = mapped
    }

    /**
     * @param value Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
     */
    @JvmName("egowqclnduonrdjq")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
     */
    @JvmName("uwsmlwdlsotuirwm")
    public suspend fun metadata(`value`: ObjectMetaPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param argument Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
     */
    @JvmName("ygalicpwxhdjmtol")
    public suspend fun metadata(argument: suspend ObjectMetaPatchArgsBuilder.() -> Unit) {
        val toBeMapped = ObjectMetaPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.metadata = mapped
    }

    /**
     * @param value note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
     */
    @JvmName("qkqufavtucdburin")
    public suspend fun note(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.note = mapped
    }

    /**
     * @param value reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.
     */
    @JvmName("ltqkbxqgobcoqpmu")
    public suspend fun reason(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reason = mapped
    }

    /**
     * @param value regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
     */
    @JvmName("qcwmiahhwnvtperv")
    public suspend fun regarding(`value`: ObjectReferencePatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regarding = mapped
    }

    /**
     * @param argument regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
     */
    @JvmName("dtpfvmnfvbudrknx")
    public suspend fun regarding(argument: suspend ObjectReferencePatchArgsBuilder.() -> Unit) {
        val toBeMapped = ObjectReferencePatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.regarding = mapped
    }

    /**
     * @param value related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
     */
    @JvmName("maxtnfycpxpvxvsi")
    public suspend fun related(`value`: ObjectReferencePatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.related = mapped
    }

    /**
     * @param argument related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
     */
    @JvmName("yllemitykuugsbup")
    public suspend fun related(argument: suspend ObjectReferencePatchArgsBuilder.() -> Unit) {
        val toBeMapped = ObjectReferencePatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.related = mapped
    }

    /**
     * @param value reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.
     */
    @JvmName("cwmjfshhubmkcwwu")
    public suspend fun reportingController(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reportingController = mapped
    }

    /**
     * @param value reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.
     */
    @JvmName("upiwoabcixowufud")
    public suspend fun reportingInstance(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reportingInstance = mapped
    }

    /**
     * @param value series is data about the Event series this event represents or nil if it's a singleton Event.
     */
    @JvmName("nyqxaoinhkgoswkv")
    public suspend fun series(`value`: EventSeriesPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.series = mapped
    }

    /**
     * @param argument series is data about the Event series this event represents or nil if it's a singleton Event.
     */
    @JvmName("tdvtopqxnbppytgv")
    public suspend fun series(argument: suspend EventSeriesPatchArgsBuilder.() -> Unit) {
        val toBeMapped = EventSeriesPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.series = mapped
    }

    /**
     * @param value type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.
     */
    @JvmName("qqjgdhhjoycnyvac")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): EventPatchArgs = EventPatchArgs(
        action = action,
        apiVersion = apiVersion,
        deprecatedCount = deprecatedCount,
        deprecatedFirstTimestamp = deprecatedFirstTimestamp,
        deprecatedLastTimestamp = deprecatedLastTimestamp,
        deprecatedSource = deprecatedSource,
        eventTime = eventTime,
        kind = kind,
        metadata = metadata,
        note = note,
        reason = reason,
        regarding = regarding,
        related = related,
        reportingController = reportingController,
        reportingInstance = reportingInstance,
        series = series,
        type = type,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy