com.logicmonitor.logs.model.LogResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lm-logs-sdk-java Show documentation
Show all versions of lm-logs-sdk-java Show documentation
Sends logs to LogicMonitor log ingestion endpoint.
/*
* LM Logs API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.logicmonitor.logs.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.logicmonitor.logs.model.LogError;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* LogResponse
*/
@JsonPropertyOrder({
LogResponse.JSON_PROPERTY_SUCCESS,
LogResponse.JSON_PROPERTY_MESSAGE,
LogResponse.JSON_PROPERTY_ERRORS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-08-12T13:44:06.676505+02:00[Europe/Warsaw]")
public class LogResponse {
public static final String JSON_PROPERTY_SUCCESS = "success";
private Boolean success;
public static final String JSON_PROPERTY_MESSAGE = "message";
private String message;
public static final String JSON_PROPERTY_ERRORS = "errors";
private List errors = null;
public LogResponse success(Boolean success) {
this.success = success;
return this;
}
/**
* Get success
* @return success
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_SUCCESS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getSuccess() {
return success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public LogResponse message(String message) {
this.message = message;
return this;
}
/**
* Get message
* @return message
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public LogResponse errors(List errors) {
this.errors = errors;
return this;
}
public LogResponse addErrorsItem(LogError errorsItem) {
if (this.errors == null) {
this.errors = new ArrayList<>();
}
this.errors.add(errorsItem);
return this;
}
/**
* Get errors
* @return errors
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ERRORS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getErrors() {
return errors;
}
public void setErrors(List errors) {
this.errors = errors;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
LogResponse logResponse = (LogResponse) o;
return Objects.equals(this.success, logResponse.success) &&
Objects.equals(this.message, logResponse.message) &&
Objects.equals(this.errors, logResponse.errors);
}
@Override
public int hashCode() {
return Objects.hash(success, message, errors);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LogResponse {\n");
sb.append(" success: ").append(toIndentedString(success)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" errors: ").append(toIndentedString(errors)).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 ");
}
}