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

com.pulumi.kubernetes.events.v1.kotlin.outputs.Event.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.kubernetes.core.v1.kotlin.outputs.EventSource
import com.pulumi.kubernetes.core.v1.kotlin.outputs.ObjectReference
import com.pulumi.kubernetes.meta.v1.kotlin.outputs.ObjectMeta
import kotlin.Int
import kotlin.String
import kotlin.Suppress

/**
 * 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 Event(
    public val action: String? = null,
    public val apiVersion: String? = null,
    public val deprecatedCount: Int? = null,
    public val deprecatedFirstTimestamp: String? = null,
    public val deprecatedLastTimestamp: String? = null,
    public val deprecatedSource: EventSource? = null,
    public val eventTime: String,
    public val kind: String? = null,
    public val metadata: ObjectMeta? = null,
    public val note: String? = null,
    public val reason: String? = null,
    public val regarding: ObjectReference? = null,
    public val related: ObjectReference? = null,
    public val reportingController: String? = null,
    public val reportingInstance: String? = null,
    public val series: EventSeries? = null,
    public val type: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.events.v1.outputs.Event): Event = Event(
            action = javaType.action().map({ args0 -> args0 }).orElse(null),
            apiVersion = javaType.apiVersion().map({ args0 -> args0 }).orElse(null),
            deprecatedCount = javaType.deprecatedCount().map({ args0 -> args0 }).orElse(null),
            deprecatedFirstTimestamp = javaType.deprecatedFirstTimestamp().map({ args0 -> args0 }).orElse(null),
            deprecatedLastTimestamp = javaType.deprecatedLastTimestamp().map({ args0 -> args0 }).orElse(null),
            deprecatedSource = javaType.deprecatedSource().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.core.v1.kotlin.outputs.EventSource.Companion.toKotlin(args0)
                })
            }).orElse(null),
            eventTime = javaType.eventTime(),
            kind = javaType.kind().map({ args0 -> args0 }).orElse(null),
            metadata = javaType.metadata().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.meta.v1.kotlin.outputs.ObjectMeta.Companion.toKotlin(args0)
                })
            }).orElse(null),
            note = javaType.note().map({ args0 -> args0 }).orElse(null),
            reason = javaType.reason().map({ args0 -> args0 }).orElse(null),
            regarding = javaType.regarding().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.core.v1.kotlin.outputs.ObjectReference.Companion.toKotlin(args0)
                })
            }).orElse(null),
            related = javaType.related().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.core.v1.kotlin.outputs.ObjectReference.Companion.toKotlin(args0)
                })
            }).orElse(null),
            reportingController = javaType.reportingController().map({ args0 -> args0 }).orElse(null),
            reportingInstance = javaType.reportingInstance().map({ args0 -> args0 }).orElse(null),
            series = javaType.series().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.events.v1.kotlin.outputs.EventSeries.Companion.toKotlin(args0)
                })
            }).orElse(null),
            type = javaType.type().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy