Class Event

  • All Implemented Interfaces:
    com.marcnuri.yakc.model.Model

    public class Event
    extends java.lang.Object
    implements com.marcnuri.yakc.model.Model
    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.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Event.Builder  
    • Constructor Summary

      Constructors 
      Constructor Description
      Event()  
      Event​(java.lang.String action, java.lang.String apiVersion, java.lang.Number deprecatedCount, java.time.OffsetDateTime deprecatedFirstTimestamp, java.time.OffsetDateTime deprecatedLastTimestamp, EventSource deprecatedSource, @NonNull java.time.OffsetDateTime eventTime, java.lang.String kind, ObjectMeta metadata, java.lang.String note, java.lang.String reason, ObjectReference regarding, ObjectReference related, java.lang.String reportingController, java.lang.String reportingInstance, EventSeries series, java.lang.String type)  
    • Constructor Detail

      • Event

        public Event​(java.lang.String action,
                     java.lang.String apiVersion,
                     java.lang.Number deprecatedCount,
                     java.time.OffsetDateTime deprecatedFirstTimestamp,
                     java.time.OffsetDateTime deprecatedLastTimestamp,
                     EventSource deprecatedSource,
                     @NonNull
                     @NonNull java.time.OffsetDateTime eventTime,
                     java.lang.String kind,
                     ObjectMeta metadata,
                     java.lang.String note,
                     java.lang.String reason,
                     ObjectReference regarding,
                     ObjectReference related,
                     java.lang.String reportingController,
                     java.lang.String reportingInstance,
                     EventSeries series,
                     java.lang.String type)
      • Event

        public Event()
    • Method Detail

      • getAction

        public java.lang.String getAction()
        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.
      • getApiVersion

        public java.lang.String getApiVersion()
        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
      • getDeprecatedCount

        public java.lang.Number getDeprecatedCount()
        deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
      • getDeprecatedFirstTimestamp

        public java.time.OffsetDateTime getDeprecatedFirstTimestamp()
      • getDeprecatedLastTimestamp

        public java.time.OffsetDateTime getDeprecatedLastTimestamp()
      • getDeprecatedSource

        public EventSource getDeprecatedSource()
      • getEventTime

        @NonNull
        public @NonNull java.time.OffsetDateTime getEventTime()
      • getKind

        public java.lang.String getKind()
        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
      • getNote

        public java.lang.String getNote()
        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.
      • getReason

        public java.lang.String getReason()
        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.
      • getReportingController

        public java.lang.String getReportingController()
        reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.
      • getReportingInstance

        public java.lang.String getReportingInstance()
        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.
      • getType

        public java.lang.String getType()
        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.
      • setAction

        public void setAction​(java.lang.String 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.
      • setApiVersion

        public void setApiVersion​(java.lang.String 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
      • setDeprecatedCount

        public void setDeprecatedCount​(java.lang.Number deprecatedCount)
        deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
      • setDeprecatedFirstTimestamp

        public void setDeprecatedFirstTimestamp​(java.time.OffsetDateTime deprecatedFirstTimestamp)
      • setDeprecatedLastTimestamp

        public void setDeprecatedLastTimestamp​(java.time.OffsetDateTime deprecatedLastTimestamp)
      • setDeprecatedSource

        public void setDeprecatedSource​(EventSource deprecatedSource)
      • setEventTime

        public void setEventTime​(@NonNull
                                 @NonNull java.time.OffsetDateTime eventTime)
      • setKind

        public void setKind​(java.lang.String 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
      • setMetadata

        public void setMetadata​(ObjectMeta metadata)
      • setNote

        public void setNote​(java.lang.String 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.
      • setReason

        public void setReason​(java.lang.String 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.
      • setReportingController

        public void setReportingController​(java.lang.String 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.
      • setReportingInstance

        public void setReportingInstance​(java.lang.String 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.
      • setSeries

        public void setSeries​(EventSeries series)
      • setType

        public void setType​(java.lang.String 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.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object