// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.kubernetes.core.v1.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.kubernetes.core.v1.outputs.EventSeries;
import com.pulumi.kubernetes.core.v1.outputs.EventSource;
import com.pulumi.kubernetes.core.v1.outputs.ObjectReference;
import com.pulumi.kubernetes.meta.v1.outputs.ObjectMeta;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class Event {
    /**
     * @return What action was taken/failed regarding to the Regarding object.
     * 
     */
    private @Nullable String action;
    /**
     * @return 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
     * 
     */
    private @Nullable String apiVersion;
    /**
     * @return The number of times this event has occurred.
     * 
     */
    private @Nullable Integer count;
    /**
     * @return Time when this Event was first observed.
     * 
     */
    private @Nullable String eventTime;
    /**
     * @return The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
     * 
     */
    private @Nullable String firstTimestamp;
    /**
     * @return The object that this event is about.
     * 
     */
    private ObjectReference involvedObject;
    /**
     * @return 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
     * 
     */
    private @Nullable String kind;
    /**
     * @return The time at which the most recent occurrence of this event was recorded.
     * 
     */
    private @Nullable String lastTimestamp;
    /**
     * @return A human-readable description of the status of this operation.
     * 
     */
    private @Nullable String message;
    /**
     * @return Standard object&#39;s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
     * 
     */
    private ObjectMeta metadata;
    /**
     * @return This should be a short, machine understandable string that gives the reason for the transition into the object&#39;s current status.
     * 
     */
    private @Nullable String reason;
    /**
     * @return Optional secondary object for more complex actions.
     * 
     */
    private @Nullable ObjectReference related;
    /**
     * @return Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
     * 
     */
    private @Nullable String reportingComponent;
    /**
     * @return ID of the controller instance, e.g. `kubelet-xyzf`.
     * 
     */
    private @Nullable String reportingInstance;
    /**
     * @return Data about the Event series this event represents or nil if it&#39;s a singleton Event.
     * 
     */
    private @Nullable EventSeries series;
    /**
     * @return The component reporting this event. Should be a short machine understandable string.
     * 
     */
    private @Nullable EventSource source;
    /**
     * @return Type of this event (Normal, Warning), new types could be added in the future
     * 
     */
    private @Nullable String type;

    private Event() {}
    /**
     * @return What action was taken/failed regarding to the Regarding object.
     * 
     */
    public Optional<String> action() {
        return Optional.ofNullable(this.action);
    }
    /**
     * @return 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
     * 
     */
    public Optional<String> apiVersion() {
        return Optional.ofNullable(this.apiVersion);
    }
    /**
     * @return The number of times this event has occurred.
     * 
     */
    public Optional<Integer> count() {
        return Optional.ofNullable(this.count);
    }
    /**
     * @return Time when this Event was first observed.
     * 
     */
    public Optional<String> eventTime() {
        return Optional.ofNullable(this.eventTime);
    }
    /**
     * @return The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
     * 
     */
    public Optional<String> firstTimestamp() {
        return Optional.ofNullable(this.firstTimestamp);
    }
    /**
     * @return The object that this event is about.
     * 
     */
    public ObjectReference involvedObject() {
        return this.involvedObject;
    }
    /**
     * @return 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
     * 
     */
    public Optional<String> kind() {
        return Optional.ofNullable(this.kind);
    }
    /**
     * @return The time at which the most recent occurrence of this event was recorded.
     * 
     */
    public Optional<String> lastTimestamp() {
        return Optional.ofNullable(this.lastTimestamp);
    }
    /**
     * @return A human-readable description of the status of this operation.
     * 
     */
    public Optional<String> message() {
        return Optional.ofNullable(this.message);
    }
    /**
     * @return Standard object&#39;s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
     * 
     */
    public ObjectMeta metadata() {
        return this.metadata;
    }
    /**
     * @return This should be a short, machine understandable string that gives the reason for the transition into the object&#39;s current status.
     * 
     */
    public Optional<String> reason() {
        return Optional.ofNullable(this.reason);
    }
    /**
     * @return Optional secondary object for more complex actions.
     * 
     */
    public Optional<ObjectReference> related() {
        return Optional.ofNullable(this.related);
    }
    /**
     * @return Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
     * 
     */
    public Optional<String> reportingComponent() {
        return Optional.ofNullable(this.reportingComponent);
    }
    /**
     * @return ID of the controller instance, e.g. `kubelet-xyzf`.
     * 
     */
    public Optional<String> reportingInstance() {
        return Optional.ofNullable(this.reportingInstance);
    }
    /**
     * @return Data about the Event series this event represents or nil if it&#39;s a singleton Event.
     * 
     */
    public Optional<EventSeries> series() {
        return Optional.ofNullable(this.series);
    }
    /**
     * @return The component reporting this event. Should be a short machine understandable string.
     * 
     */
    public Optional<EventSource> source() {
        return Optional.ofNullable(this.source);
    }
    /**
     * @return Type of this event (Normal, Warning), new types could be added in the future
     * 
     */
    public Optional<String> type() {
        return Optional.ofNullable(this.type);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(Event defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String action;
        private @Nullable String apiVersion;
        private @Nullable Integer count;
        private @Nullable String eventTime;
        private @Nullable String firstTimestamp;
        private ObjectReference involvedObject;
        private @Nullable String kind;
        private @Nullable String lastTimestamp;
        private @Nullable String message;
        private ObjectMeta metadata;
        private @Nullable String reason;
        private @Nullable ObjectReference related;
        private @Nullable String reportingComponent;
        private @Nullable String reportingInstance;
        private @Nullable EventSeries series;
        private @Nullable EventSource source;
        private @Nullable String type;
        public Builder() {}
        public Builder(Event defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.action = defaults.action;
    	      this.apiVersion = defaults.apiVersion;
    	      this.count = defaults.count;
    	      this.eventTime = defaults.eventTime;
    	      this.firstTimestamp = defaults.firstTimestamp;
    	      this.involvedObject = defaults.involvedObject;
    	      this.kind = defaults.kind;
    	      this.lastTimestamp = defaults.lastTimestamp;
    	      this.message = defaults.message;
    	      this.metadata = defaults.metadata;
    	      this.reason = defaults.reason;
    	      this.related = defaults.related;
    	      this.reportingComponent = defaults.reportingComponent;
    	      this.reportingInstance = defaults.reportingInstance;
    	      this.series = defaults.series;
    	      this.source = defaults.source;
    	      this.type = defaults.type;
        }

        @CustomType.Setter
        public Builder action(@Nullable String action) {
            this.action = action;
            return this;
        }
        @CustomType.Setter
        public Builder apiVersion(@Nullable String apiVersion) {
            this.apiVersion = apiVersion;
            return this;
        }
        @CustomType.Setter
        public Builder count(@Nullable Integer count) {
            this.count = count;
            return this;
        }
        @CustomType.Setter
        public Builder eventTime(@Nullable String eventTime) {
            this.eventTime = eventTime;
            return this;
        }
        @CustomType.Setter
        public Builder firstTimestamp(@Nullable String firstTimestamp) {
            this.firstTimestamp = firstTimestamp;
            return this;
        }
        @CustomType.Setter
        public Builder involvedObject(ObjectReference involvedObject) {
            this.involvedObject = Objects.requireNonNull(involvedObject);
            return this;
        }
        @CustomType.Setter
        public Builder kind(@Nullable String kind) {
            this.kind = kind;
            return this;
        }
        @CustomType.Setter
        public Builder lastTimestamp(@Nullable String lastTimestamp) {
            this.lastTimestamp = lastTimestamp;
            return this;
        }
        @CustomType.Setter
        public Builder message(@Nullable String message) {
            this.message = message;
            return this;
        }
        @CustomType.Setter
        public Builder metadata(ObjectMeta metadata) {
            this.metadata = Objects.requireNonNull(metadata);
            return this;
        }
        @CustomType.Setter
        public Builder reason(@Nullable String reason) {
            this.reason = reason;
            return this;
        }
        @CustomType.Setter
        public Builder related(@Nullable ObjectReference related) {
            this.related = related;
            return this;
        }
        @CustomType.Setter
        public Builder reportingComponent(@Nullable String reportingComponent) {
            this.reportingComponent = reportingComponent;
            return this;
        }
        @CustomType.Setter
        public Builder reportingInstance(@Nullable String reportingInstance) {
            this.reportingInstance = reportingInstance;
            return this;
        }
        @CustomType.Setter
        public Builder series(@Nullable EventSeries series) {
            this.series = series;
            return this;
        }
        @CustomType.Setter
        public Builder source(@Nullable EventSource source) {
            this.source = source;
            return this;
        }
        @CustomType.Setter
        public Builder type(@Nullable String type) {
            this.type = type;
            return this;
        }
        public Event build() {
            final var o = new Event();
            o.action = action;
            o.apiVersion = apiVersion;
            o.count = count;
            o.eventTime = eventTime;
            o.firstTimestamp = firstTimestamp;
            o.involvedObject = involvedObject;
            o.kind = kind;
            o.lastTimestamp = lastTimestamp;
            o.message = message;
            o.metadata = metadata;
            o.reason = reason;
            o.related = related;
            o.reportingComponent = reportingComponent;
            o.reportingInstance = reportingInstance;
            o.series = series;
            o.source = source;
            o.type = type;
            return o;
        }
    }
}
