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

com.pulumi.kubernetes.events.v1beta1.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.v1beta1.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.v1beta1.EventPatchArgs.builder
import com.pulumi.kubernetes.events.v1beta1.kotlin.inputs.EventSeriesPatchArgs
import com.pulumi.kubernetes.events.v1beta1.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.
 * @property action What action was taken/failed regarding to the regarding object.
 * @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 Deprecated field assuring backward compatibility with core.v1 Event type
 * @property deprecatedFirstTimestamp Deprecated field assuring backward compatibility with core.v1 Event type
 * @property deprecatedLastTimestamp Deprecated field assuring backward compatibility with core.v1 Event type
 * @property deprecatedSource Deprecated field assuring backward compatibility with core.v1 Event type
 * @property eventTime Required. Time when this Event was first observed.
 * @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
 * @property note Optional. 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 Why the action was taken.
 * @property regarding 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 Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
 * @property reportingController Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
 * @property reportingInstance ID of the controller instance, e.g. `kubelet-xyzf`.
 * @property series Data about the Event series this event represents or nil if it's a singleton Event.
 * @property type Type of this event (Normal, Warning), new types could be added in the future.
 */
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.v1beta1.EventPatchArgs =
        com.pulumi.kubernetes.events.v1beta1.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 What action was taken/failed regarding to the regarding object.
     */
    @JvmName("fqfgmbcbuvmujenm")
    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("ycqsgqolyjysvtfi")
    public suspend fun apiVersion(`value`: Output) {
        this.apiVersion = value
    }

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

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

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

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

    /**
     * @param value Required. Time when this Event was first observed.
     */
    @JvmName("oqdngtkxpnbtavbt")
    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("qdffxqhncxfqarmx")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value
     */
    @JvmName("mknfdmmqykrhcqag")
    public suspend fun metadata(`value`: Output) {
        this.metadata = value
    }

    /**
     * @param value Optional. 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("ujmosxhlvtuuumrt")
    public suspend fun note(`value`: Output) {
        this.note = value
    }

    /**
     * @param value Why the action was taken.
     */
    @JvmName("lcjpogxikijpcsmr")
    public suspend fun reason(`value`: Output) {
        this.reason = value
    }

    /**
     * @param value 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("sajlfllgpsoqiqqf")
    public suspend fun regarding(`value`: Output) {
        this.regarding = value
    }

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

    /**
     * @param value Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
     */
    @JvmName("tohqutoqjjejggie")
    public suspend fun reportingController(`value`: Output) {
        this.reportingController = value
    }

    /**
     * @param value ID of the controller instance, e.g. `kubelet-xyzf`.
     */
    @JvmName("ncdcphvsekdxqejh")
    public suspend fun reportingInstance(`value`: Output) {
        this.reportingInstance = value
    }

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

    /**
     * @param value Type of this event (Normal, Warning), new types could be added in the future.
     */
    @JvmName("locewggoiwxkqkyd")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value What action was taken/failed regarding to the regarding object.
     */
    @JvmName("mxnrbqxtoousrgqc")
    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("mgqrmbpaahtdwdtg")
    public suspend fun apiVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiVersion = mapped
    }

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

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

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

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

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

    /**
     * @param value Required. Time when this Event was first observed.
     */
    @JvmName("pdqbyppnargaqake")
    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("unubvsurovflovrs")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value
     */
    @JvmName("wgjrwmdkygtiylxr")
    public suspend fun metadata(`value`: ObjectMetaPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param argument
     */
    @JvmName("vkeajunhnwirgoff")
    public suspend fun metadata(argument: suspend ObjectMetaPatchArgsBuilder.() -> Unit) {
        val toBeMapped = ObjectMetaPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.metadata = mapped
    }

    /**
     * @param value Optional. 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("dofvapkincijqcvg")
    public suspend fun note(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.note = mapped
    }

    /**
     * @param value Why the action was taken.
     */
    @JvmName("tlhfklcevmtvkuro")
    public suspend fun reason(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reason = mapped
    }

    /**
     * @param value 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("doviwidqgjpdethj")
    public suspend fun regarding(`value`: ObjectReferencePatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regarding = mapped
    }

    /**
     * @param argument 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("omfucqkpynbpfbap")
    public suspend fun regarding(argument: suspend ObjectReferencePatchArgsBuilder.() -> Unit) {
        val toBeMapped = ObjectReferencePatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.regarding = mapped
    }

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

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

    /**
     * @param value Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
     */
    @JvmName("deyrufolajhmnxwp")
    public suspend fun reportingController(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reportingController = mapped
    }

    /**
     * @param value ID of the controller instance, e.g. `kubelet-xyzf`.
     */
    @JvmName("wryvmrouunhvkexi")
    public suspend fun reportingInstance(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reportingInstance = mapped
    }

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

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

    /**
     * @param value Type of this event (Normal, Warning), new types could be added in the future.
     */
    @JvmName("ovuobdyofaeigqnm")
    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