org.openmetadata.schema.entity.events.StatusContext Maven / Gradle / Ivy
package org.openmetadata.schema.entity.events;
import java.util.List;
import java.util.Map;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* FailedEvents
*
* Status Context
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"statusCode",
"statusInfo",
"headers",
"entity",
"mediaType",
"location",
"timestamp"
})
@Generated("jsonschema2pojo")
public class StatusContext {
/**
* HTTP status code of the response
*
*/
@JsonProperty("statusCode")
@JsonPropertyDescription("HTTP status code of the response")
private Integer statusCode;
/**
* Reason phrase associated with the status code
*
*/
@JsonProperty("statusInfo")
@JsonPropertyDescription("Reason phrase associated with the status code")
private String statusInfo;
/**
* Response headers as a map
*
*/
@JsonProperty("headers")
@JsonPropertyDescription("Response headers as a map")
private Map> headers;
/**
* Response entity, if available
*
*/
@JsonProperty("entity")
@JsonPropertyDescription("Response entity, if available")
private String entity;
/**
* Media type of the response
*
*/
@JsonProperty("mediaType")
@JsonPropertyDescription("Media type of the response")
private String mediaType;
/**
* Location URI from the response
*
*/
@JsonProperty("location")
@JsonPropertyDescription("Location URI from the response")
private String location;
/**
* Timestamp in Unix epoch time milliseconds.@om-field-type
*
*/
@JsonProperty("timestamp")
@JsonPropertyDescription("Timestamp in Unix epoch time milliseconds.")
private Long timestamp;
/**
* HTTP status code of the response
*
*/
@JsonProperty("statusCode")
public Integer getStatusCode() {
return statusCode;
}
/**
* HTTP status code of the response
*
*/
@JsonProperty("statusCode")
public void setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
}
public StatusContext withStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
/**
* Reason phrase associated with the status code
*
*/
@JsonProperty("statusInfo")
public String getStatusInfo() {
return statusInfo;
}
/**
* Reason phrase associated with the status code
*
*/
@JsonProperty("statusInfo")
public void setStatusInfo(String statusInfo) {
this.statusInfo = statusInfo;
}
public StatusContext withStatusInfo(String statusInfo) {
this.statusInfo = statusInfo;
return this;
}
/**
* Response headers as a map
*
*/
@JsonProperty("headers")
public Map> getHeaders() {
return headers;
}
/**
* Response headers as a map
*
*/
@JsonProperty("headers")
public void setHeaders(Map> headers) {
this.headers = headers;
}
public StatusContext withHeaders(Map> headers) {
this.headers = headers;
return this;
}
/**
* Response entity, if available
*
*/
@JsonProperty("entity")
public String getEntity() {
return entity;
}
/**
* Response entity, if available
*
*/
@JsonProperty("entity")
public void setEntity(String entity) {
this.entity = entity;
}
public StatusContext withEntity(String entity) {
this.entity = entity;
return this;
}
/**
* Media type of the response
*
*/
@JsonProperty("mediaType")
public String getMediaType() {
return mediaType;
}
/**
* Media type of the response
*
*/
@JsonProperty("mediaType")
public void setMediaType(String mediaType) {
this.mediaType = mediaType;
}
public StatusContext withMediaType(String mediaType) {
this.mediaType = mediaType;
return this;
}
/**
* Location URI from the response
*
*/
@JsonProperty("location")
public String getLocation() {
return location;
}
/**
* Location URI from the response
*
*/
@JsonProperty("location")
public void setLocation(String location) {
this.location = location;
}
public StatusContext withLocation(String location) {
this.location = location;
return this;
}
/**
* Timestamp in Unix epoch time milliseconds.@om-field-type
*
*/
@JsonProperty("timestamp")
public Long getTimestamp() {
return timestamp;
}
/**
* Timestamp in Unix epoch time milliseconds.@om-field-type
*
*/
@JsonProperty("timestamp")
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
public StatusContext withTimestamp(Long timestamp) {
this.timestamp = timestamp;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(StatusContext.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("statusCode");
sb.append('=');
sb.append(((this.statusCode == null)?"":this.statusCode));
sb.append(',');
sb.append("statusInfo");
sb.append('=');
sb.append(((this.statusInfo == null)?"":this.statusInfo));
sb.append(',');
sb.append("headers");
sb.append('=');
sb.append(((this.headers == null)?"":this.headers));
sb.append(',');
sb.append("entity");
sb.append('=');
sb.append(((this.entity == null)?"":this.entity));
sb.append(',');
sb.append("mediaType");
sb.append('=');
sb.append(((this.mediaType == null)?"":this.mediaType));
sb.append(',');
sb.append("location");
sb.append('=');
sb.append(((this.location == null)?"":this.location));
sb.append(',');
sb.append("timestamp");
sb.append('=');
sb.append(((this.timestamp == null)?"":this.timestamp));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.headers == null)? 0 :this.headers.hashCode()));
result = ((result* 31)+((this.statusInfo == null)? 0 :this.statusInfo.hashCode()));
result = ((result* 31)+((this.mediaType == null)? 0 :this.mediaType.hashCode()));
result = ((result* 31)+((this.location == null)? 0 :this.location.hashCode()));
result = ((result* 31)+((this.entity == null)? 0 :this.entity.hashCode()));
result = ((result* 31)+((this.statusCode == null)? 0 :this.statusCode.hashCode()));
result = ((result* 31)+((this.timestamp == null)? 0 :this.timestamp.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof StatusContext) == false) {
return false;
}
StatusContext rhs = ((StatusContext) other);
return ((((((((this.headers == rhs.headers)||((this.headers!= null)&&this.headers.equals(rhs.headers)))&&((this.statusInfo == rhs.statusInfo)||((this.statusInfo!= null)&&this.statusInfo.equals(rhs.statusInfo))))&&((this.mediaType == rhs.mediaType)||((this.mediaType!= null)&&this.mediaType.equals(rhs.mediaType))))&&((this.location == rhs.location)||((this.location!= null)&&this.location.equals(rhs.location))))&&((this.entity == rhs.entity)||((this.entity!= null)&&this.entity.equals(rhs.entity))))&&((this.statusCode == rhs.statusCode)||((this.statusCode!= null)&&this.statusCode.equals(rhs.statusCode))))&&((this.timestamp == rhs.timestamp)||((this.timestamp!= null)&&this.timestamp.equals(rhs.timestamp))));
}
}