io.fabric8.kubernetes.api.model.Event Maven / Gradle / Ivy
The newest version!
package io.fabric8.kubernetes.api.model;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
*
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
"apiVersion",
"count",
"firstTimestamp",
"involvedObject",
"kind",
"lastTimestamp",
"message",
"metadata",
"reason",
"source"
})
@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
public class Event implements HasMetadata
{
/**
*
* (Required)
*
*/
@JsonProperty("apiVersion")
@NotNull
private Event.ApiVersion apiVersion = Event.ApiVersion.fromValue("v1");
/**
* the number of times this event has occurred
*
*/
@JsonProperty("count")
private Integer count;
/**
* the time at which the event was first recorded
*
*/
@JsonProperty("firstTimestamp")
private String firstTimestamp;
/**
*
*
*/
@JsonProperty("involvedObject")
@Valid
private ObjectReference involvedObject;
/**
*
* (Required)
*
*/
@JsonProperty("kind")
@NotNull
private String kind = "Event";
/**
* the time at which the most recent occurance of this event was recorded
*
*/
@JsonProperty("lastTimestamp")
private String lastTimestamp;
/**
* human-readable description of the status of this operation
*
*/
@JsonProperty("message")
private String message;
/**
*
*
*/
@JsonProperty("metadata")
@Valid
private ObjectMeta metadata;
/**
* short
*
*/
@JsonProperty("reason")
private String reason;
/**
*
*
*/
@JsonProperty("source")
@Valid
private EventSource source;
@JsonIgnore
private Map additionalProperties = new HashMap();
/**
* No args constructor for use in serialization
*
*/
public Event() {
}
/**
*
* @param message
* @param apiVersion
* @param source
* @param count
* @param reason
* @param lastTimestamp
* @param kind
* @param involvedObject
* @param firstTimestamp
* @param metadata
*/
public Event(Event.ApiVersion apiVersion, Integer count, String firstTimestamp, ObjectReference involvedObject, String kind, String lastTimestamp, String message, ObjectMeta metadata, String reason, EventSource source) {
this.apiVersion = apiVersion;
this.count = count;
this.firstTimestamp = firstTimestamp;
this.involvedObject = involvedObject;
this.kind = kind;
this.lastTimestamp = lastTimestamp;
this.message = message;
this.metadata = metadata;
this.reason = reason;
this.source = source;
}
/**
*
* (Required)
*
* @return
* The apiVersion
*/
@JsonProperty("apiVersion")
public Event.ApiVersion getApiVersion() {
return apiVersion;
}
/**
*
* (Required)
*
* @param apiVersion
* The apiVersion
*/
@JsonProperty("apiVersion")
public void setApiVersion(Event.ApiVersion apiVersion) {
this.apiVersion = apiVersion;
}
/**
* the number of times this event has occurred
*
* @return
* The count
*/
@JsonProperty("count")
public Integer getCount() {
return count;
}
/**
* the number of times this event has occurred
*
* @param count
* The count
*/
@JsonProperty("count")
public void setCount(Integer count) {
this.count = count;
}
/**
* the time at which the event was first recorded
*
* @return
* The firstTimestamp
*/
@JsonProperty("firstTimestamp")
public String getFirstTimestamp() {
return firstTimestamp;
}
/**
* the time at which the event was first recorded
*
* @param firstTimestamp
* The firstTimestamp
*/
@JsonProperty("firstTimestamp")
public void setFirstTimestamp(String firstTimestamp) {
this.firstTimestamp = firstTimestamp;
}
/**
*
*
* @return
* The involvedObject
*/
@JsonProperty("involvedObject")
public ObjectReference getInvolvedObject() {
return involvedObject;
}
/**
*
*
* @param involvedObject
* The involvedObject
*/
@JsonProperty("involvedObject")
public void setInvolvedObject(ObjectReference involvedObject) {
this.involvedObject = involvedObject;
}
/**
*
* (Required)
*
* @return
* The kind
*/
@JsonProperty("kind")
public String getKind() {
return kind;
}
/**
*
* (Required)
*
* @param kind
* The kind
*/
@JsonProperty("kind")
public void setKind(String kind) {
this.kind = kind;
}
/**
* the time at which the most recent occurance of this event was recorded
*
* @return
* The lastTimestamp
*/
@JsonProperty("lastTimestamp")
public String getLastTimestamp() {
return lastTimestamp;
}
/**
* the time at which the most recent occurance of this event was recorded
*
* @param lastTimestamp
* The lastTimestamp
*/
@JsonProperty("lastTimestamp")
public void setLastTimestamp(String lastTimestamp) {
this.lastTimestamp = lastTimestamp;
}
/**
* human-readable description of the status of this operation
*
* @return
* The message
*/
@JsonProperty("message")
public String getMessage() {
return message;
}
/**
* human-readable description of the status of this operation
*
* @param message
* The message
*/
@JsonProperty("message")
public void setMessage(String message) {
this.message = message;
}
/**
*
*
* @return
* The metadata
*/
@JsonProperty("metadata")
public ObjectMeta getMetadata() {
return metadata;
}
/**
*
*
* @param metadata
* The metadata
*/
@JsonProperty("metadata")
public void setMetadata(ObjectMeta metadata) {
this.metadata = metadata;
}
/**
* short
*
* @return
* The reason
*/
@JsonProperty("reason")
public String getReason() {
return reason;
}
/**
* short
*
* @param reason
* The reason
*/
@JsonProperty("reason")
public void setReason(String reason) {
this.reason = reason;
}
/**
*
*
* @return
* The source
*/
@JsonProperty("source")
public EventSource getSource() {
return source;
}
/**
*
*
* @param source
* The source
*/
@JsonProperty("source")
public void setSource(EventSource source) {
this.source = source;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(apiVersion).append(count).append(firstTimestamp).append(involvedObject).append(kind).append(lastTimestamp).append(message).append(metadata).append(reason).append(source).append(additionalProperties).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof Event) == false) {
return false;
}
Event rhs = ((Event) other);
return new EqualsBuilder().append(apiVersion, rhs.apiVersion).append(count, rhs.count).append(firstTimestamp, rhs.firstTimestamp).append(involvedObject, rhs.involvedObject).append(kind, rhs.kind).append(lastTimestamp, rhs.lastTimestamp).append(message, rhs.message).append(metadata, rhs.metadata).append(reason, rhs.reason).append(source, rhs.source).append(additionalProperties, rhs.additionalProperties).isEquals();
}
@Generated("org.jsonschema2pojo")
public static enum ApiVersion {
V_1("v1");
private final String value;
private static Map constants = new HashMap();
static {
for (Event.ApiVersion c: values()) {
constants.put(c.value, c);
}
}
private ApiVersion(String value) {
this.value = value;
}
@JsonValue
@Override
public String toString() {
return this.value;
}
@JsonCreator
public static Event.ApiVersion fromValue(String value) {
Event.ApiVersion constant = constants.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy