/*
 * Kubernetes
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: v1.10.4
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package io.kubernetes.client.models;

import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.kubernetes.client.models.V1EventSource;
import io.kubernetes.client.models.V1ObjectMeta;
import io.kubernetes.client.models.V1ObjectReference;
import io.kubernetes.client.models.V1beta1EventSeries;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.joda.time.DateTime;

/**
 * Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
 */
@ApiModel(description = "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.")

public class V1beta1Event {
  @SerializedName("action")
  private String action = null;

  @SerializedName("apiVersion")
  private String apiVersion = null;

  @SerializedName("deprecatedCount")
  private Integer deprecatedCount = null;

  @SerializedName("deprecatedFirstTimestamp")
  private DateTime deprecatedFirstTimestamp = null;

  @SerializedName("deprecatedLastTimestamp")
  private DateTime deprecatedLastTimestamp = null;

  @SerializedName("deprecatedSource")
  private V1EventSource deprecatedSource = null;

  @SerializedName("eventTime")
  private DateTime eventTime = null;

  @SerializedName("kind")
  private String kind = null;

  @SerializedName("metadata")
  private V1ObjectMeta metadata = null;

  @SerializedName("note")
  private String note = null;

  @SerializedName("reason")
  private String reason = null;

  @SerializedName("regarding")
  private V1ObjectReference regarding = null;

  @SerializedName("related")
  private V1ObjectReference related = null;

  @SerializedName("reportingController")
  private String reportingController = null;

  @SerializedName("reportingInstance")
  private String reportingInstance = null;

  @SerializedName("series")
  private V1beta1EventSeries series = null;

  @SerializedName("type")
  private String type = null;

  public V1beta1Event action(String action) {
    this.action = action;
    return this;
  }

   /**
   * What action was taken/failed regarding to the regarding object.
   * @return action
  **/
  @ApiModelProperty(value = "What action was taken/failed regarding to the regarding object.")
  public String getAction() {
    return action;
  }

  public void setAction(String action) {
    this.action = action;
  }

  public V1beta1Event apiVersion(String apiVersion) {
    this.apiVersion = apiVersion;
    return this;
  }

   /**
   * 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/api-conventions.md#resources
   * @return apiVersion
  **/
  @ApiModelProperty(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/api-conventions.md#resources")
  public String getApiVersion() {
    return apiVersion;
  }

  public void setApiVersion(String apiVersion) {
    this.apiVersion = apiVersion;
  }

  public V1beta1Event deprecatedCount(Integer deprecatedCount) {
    this.deprecatedCount = deprecatedCount;
    return this;
  }

   /**
   * Deprecated field assuring backward compatibility with core.v1 Event type
   * @return deprecatedCount
  **/
  @ApiModelProperty(value = "Deprecated field assuring backward compatibility with core.v1 Event type")
  public Integer getDeprecatedCount() {
    return deprecatedCount;
  }

  public void setDeprecatedCount(Integer deprecatedCount) {
    this.deprecatedCount = deprecatedCount;
  }

  public V1beta1Event deprecatedFirstTimestamp(DateTime deprecatedFirstTimestamp) {
    this.deprecatedFirstTimestamp = deprecatedFirstTimestamp;
    return this;
  }

   /**
   * Deprecated field assuring backward compatibility with core.v1 Event type
   * @return deprecatedFirstTimestamp
  **/
  @ApiModelProperty(value = "Deprecated field assuring backward compatibility with core.v1 Event type")
  public DateTime getDeprecatedFirstTimestamp() {
    return deprecatedFirstTimestamp;
  }

  public void setDeprecatedFirstTimestamp(DateTime deprecatedFirstTimestamp) {
    this.deprecatedFirstTimestamp = deprecatedFirstTimestamp;
  }

  public V1beta1Event deprecatedLastTimestamp(DateTime deprecatedLastTimestamp) {
    this.deprecatedLastTimestamp = deprecatedLastTimestamp;
    return this;
  }

   /**
   * Deprecated field assuring backward compatibility with core.v1 Event type
   * @return deprecatedLastTimestamp
  **/
  @ApiModelProperty(value = "Deprecated field assuring backward compatibility with core.v1 Event type")
  public DateTime getDeprecatedLastTimestamp() {
    return deprecatedLastTimestamp;
  }

  public void setDeprecatedLastTimestamp(DateTime deprecatedLastTimestamp) {
    this.deprecatedLastTimestamp = deprecatedLastTimestamp;
  }

  public V1beta1Event deprecatedSource(V1EventSource deprecatedSource) {
    this.deprecatedSource = deprecatedSource;
    return this;
  }

   /**
   * Deprecated field assuring backward compatibility with core.v1 Event type
   * @return deprecatedSource
  **/
  @ApiModelProperty(value = "Deprecated field assuring backward compatibility with core.v1 Event type")
  public V1EventSource getDeprecatedSource() {
    return deprecatedSource;
  }

  public void setDeprecatedSource(V1EventSource deprecatedSource) {
    this.deprecatedSource = deprecatedSource;
  }

  public V1beta1Event eventTime(DateTime eventTime) {
    this.eventTime = eventTime;
    return this;
  }

   /**
   * Required. Time when this Event was first observed.
   * @return eventTime
  **/
  @ApiModelProperty(required = true, value = "Required. Time when this Event was first observed.")
  public DateTime getEventTime() {
    return eventTime;
  }

  public void setEventTime(DateTime eventTime) {
    this.eventTime = eventTime;
  }

  public V1beta1Event kind(String kind) {
    this.kind = kind;
    return this;
  }

   /**
   * 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/api-conventions.md#types-kinds
   * @return kind
  **/
  @ApiModelProperty(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/api-conventions.md#types-kinds")
  public String getKind() {
    return kind;
  }

  public void setKind(String kind) {
    this.kind = kind;
  }

  public V1beta1Event metadata(V1ObjectMeta metadata) {
    this.metadata = metadata;
    return this;
  }

   /**
   * Get metadata
   * @return metadata
  **/
  @ApiModelProperty(value = "")
  public V1ObjectMeta getMetadata() {
    return metadata;
  }

  public void setMetadata(V1ObjectMeta metadata) {
    this.metadata = metadata;
  }

  public V1beta1Event note(String note) {
    this.note = note;
    return this;
  }

   /**
   * 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.
   * @return note
  **/
  @ApiModelProperty(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.")
  public String getNote() {
    return note;
  }

  public void setNote(String note) {
    this.note = note;
  }

  public V1beta1Event reason(String reason) {
    this.reason = reason;
    return this;
  }

   /**
   * Why the action was taken.
   * @return reason
  **/
  @ApiModelProperty(value = "Why the action was taken.")
  public String getReason() {
    return reason;
  }

  public void setReason(String reason) {
    this.reason = reason;
  }

  public V1beta1Event regarding(V1ObjectReference regarding) {
    this.regarding = regarding;
    return this;
  }

   /**
   * The object this Event is about. In most cases it&#39;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.
   * @return regarding
  **/
  @ApiModelProperty(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.")
  public V1ObjectReference getRegarding() {
    return regarding;
  }

  public void setRegarding(V1ObjectReference regarding) {
    this.regarding = regarding;
  }

  public V1beta1Event related(V1ObjectReference related) {
    this.related = related;
    return this;
  }

   /**
   * Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
   * @return related
  **/
  @ApiModelProperty(value = "Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.")
  public V1ObjectReference getRelated() {
    return related;
  }

  public void setRelated(V1ObjectReference related) {
    this.related = related;
  }

  public V1beta1Event reportingController(String reportingController) {
    this.reportingController = reportingController;
    return this;
  }

   /**
   * Name of the controller that emitted this Event, e.g. &#x60;kubernetes.io/kubelet&#x60;.
   * @return reportingController
  **/
  @ApiModelProperty(value = "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.")
  public String getReportingController() {
    return reportingController;
  }

  public void setReportingController(String reportingController) {
    this.reportingController = reportingController;
  }

  public V1beta1Event reportingInstance(String reportingInstance) {
    this.reportingInstance = reportingInstance;
    return this;
  }

   /**
   * ID of the controller instance, e.g. &#x60;kubelet-xyzf&#x60;.
   * @return reportingInstance
  **/
  @ApiModelProperty(value = "ID of the controller instance, e.g. `kubelet-xyzf`.")
  public String getReportingInstance() {
    return reportingInstance;
  }

  public void setReportingInstance(String reportingInstance) {
    this.reportingInstance = reportingInstance;
  }

  public V1beta1Event series(V1beta1EventSeries series) {
    this.series = series;
    return this;
  }

   /**
   * Data about the Event series this event represents or nil if it&#39;s a singleton Event.
   * @return series
  **/
  @ApiModelProperty(value = "Data about the Event series this event represents or nil if it's a singleton Event.")
  public V1beta1EventSeries getSeries() {
    return series;
  }

  public void setSeries(V1beta1EventSeries series) {
    this.series = series;
  }

  public V1beta1Event type(String type) {
    this.type = type;
    return this;
  }

   /**
   * Type of this event (Normal, Warning), new types could be added in the future.
   * @return type
  **/
  @ApiModelProperty(value = "Type of this event (Normal, Warning), new types could be added in the future.")
  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1beta1Event v1beta1Event = (V1beta1Event) o;
    return Objects.equals(this.action, v1beta1Event.action) &&
        Objects.equals(this.apiVersion, v1beta1Event.apiVersion) &&
        Objects.equals(this.deprecatedCount, v1beta1Event.deprecatedCount) &&
        Objects.equals(this.deprecatedFirstTimestamp, v1beta1Event.deprecatedFirstTimestamp) &&
        Objects.equals(this.deprecatedLastTimestamp, v1beta1Event.deprecatedLastTimestamp) &&
        Objects.equals(this.deprecatedSource, v1beta1Event.deprecatedSource) &&
        Objects.equals(this.eventTime, v1beta1Event.eventTime) &&
        Objects.equals(this.kind, v1beta1Event.kind) &&
        Objects.equals(this.metadata, v1beta1Event.metadata) &&
        Objects.equals(this.note, v1beta1Event.note) &&
        Objects.equals(this.reason, v1beta1Event.reason) &&
        Objects.equals(this.regarding, v1beta1Event.regarding) &&
        Objects.equals(this.related, v1beta1Event.related) &&
        Objects.equals(this.reportingController, v1beta1Event.reportingController) &&
        Objects.equals(this.reportingInstance, v1beta1Event.reportingInstance) &&
        Objects.equals(this.series, v1beta1Event.series) &&
        Objects.equals(this.type, v1beta1Event.type);
  }

  @Override
  public int hashCode() {
    return Objects.hash(action, apiVersion, deprecatedCount, deprecatedFirstTimestamp, deprecatedLastTimestamp, deprecatedSource, eventTime, kind, metadata, note, reason, regarding, related, reportingController, reportingInstance, series, type);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1beta1Event {\n");
    
    sb.append("    action: ").append(toIndentedString(action)).append("\n");
    sb.append("    apiVersion: ").append(toIndentedString(apiVersion)).append("\n");
    sb.append("    deprecatedCount: ").append(toIndentedString(deprecatedCount)).append("\n");
    sb.append("    deprecatedFirstTimestamp: ").append(toIndentedString(deprecatedFirstTimestamp)).append("\n");
    sb.append("    deprecatedLastTimestamp: ").append(toIndentedString(deprecatedLastTimestamp)).append("\n");
    sb.append("    deprecatedSource: ").append(toIndentedString(deprecatedSource)).append("\n");
    sb.append("    eventTime: ").append(toIndentedString(eventTime)).append("\n");
    sb.append("    kind: ").append(toIndentedString(kind)).append("\n");
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
    sb.append("    note: ").append(toIndentedString(note)).append("\n");
    sb.append("    reason: ").append(toIndentedString(reason)).append("\n");
    sb.append("    regarding: ").append(toIndentedString(regarding)).append("\n");
    sb.append("    related: ").append(toIndentedString(related)).append("\n");
    sb.append("    reportingController: ").append(toIndentedString(reportingController)).append("\n");
    sb.append("    reportingInstance: ").append(toIndentedString(reportingInstance)).append("\n");
    sb.append("    series: ").append(toIndentedString(series)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

