All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.chrome.devtools.client.core.log.LogEntry Maven / Gradle / Ivy

package com.hubspot.chrome.devtools.client.core.log;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hubspot.chrome.devtools.client.core.network.RequestId;
import com.hubspot.chrome.devtools.client.core.runtime.RemoteObject;
import com.hubspot.chrome.devtools.client.core.runtime.StackTrace;
import com.hubspot.chrome.devtools.client.core.runtime.Timestamp;
import java.util.List;

/**
 * Log entry.
 */
public final class LogEntry {
  private String source;

  private String level;

  private String text;

  private Timestamp timestamp;

  private String url;

  private Integer lineNumber;

  private StackTrace stackTrace;

  private RequestId networkRequestId;

  private String workerId;

  private List args;

  @JsonCreator
  public LogEntry(@JsonProperty("source") String source, @JsonProperty("level") String level,
      @JsonProperty("text") String text, @JsonProperty("timestamp") Timestamp timestamp,
      @JsonProperty("url") String url, @JsonProperty("lineNumber") Integer lineNumber,
      @JsonProperty("stackTrace") StackTrace stackTrace,
      @JsonProperty("networkRequestId") RequestId networkRequestId,
      @JsonProperty("workerId") String workerId, @JsonProperty("args") List args) {
    this.source = source;
    this.level = level;
    this.text = text;
    this.timestamp = timestamp;
    this.url = url;
    this.lineNumber = lineNumber;
    this.stackTrace = stackTrace;
    this.networkRequestId = networkRequestId;
    this.workerId = workerId;
    this.args = args;
  }

  public String getSource() {
    return source;
  }

  public String getLevel() {
    return level;
  }

  public String getText() {
    return text;
  }

  public Timestamp getTimestamp() {
    return timestamp;
  }

  public String getUrl() {
    return url;
  }

  public Integer getLineNumber() {
    return lineNumber;
  }

  public StackTrace getStackTrace() {
    return stackTrace;
  }

  public RequestId getNetworkRequestId() {
    return networkRequestId;
  }

  public String getWorkerId() {
    return workerId;
  }

  public List getArgs() {
    return args;
  }

  public static LogEntry.Builder builder() {
    return new LogEntry.Builder();
  }

  public static final class Builder {
    private String source;

    private String level;

    private String text;

    private Timestamp timestamp;

    private String url;

    private Integer lineNumber;

    private StackTrace stackTrace;

    private RequestId networkRequestId;

    private String workerId;

    private List args;

    private Builder() {
    }

    public LogEntry.Builder setSource(String source) {
      this.source = source;
      return this;
    }

    public LogEntry.Builder setLevel(String level) {
      this.level = level;
      return this;
    }

    public LogEntry.Builder setText(String text) {
      this.text = text;
      return this;
    }

    public LogEntry.Builder setTimestamp(Timestamp timestamp) {
      this.timestamp = timestamp;
      return this;
    }

    public LogEntry.Builder setUrl(String url) {
      this.url = url;
      return this;
    }

    public LogEntry.Builder setLineNumber(Integer lineNumber) {
      this.lineNumber = lineNumber;
      return this;
    }

    public LogEntry.Builder setStackTrace(StackTrace stackTrace) {
      this.stackTrace = stackTrace;
      return this;
    }

    public LogEntry.Builder setNetworkRequestId(RequestId networkRequestId) {
      this.networkRequestId = networkRequestId;
      return this;
    }

    public LogEntry.Builder setWorkerId(String workerId) {
      this.workerId = workerId;
      return this;
    }

    public LogEntry.Builder setArgs(List args) {
      this.args = args;
      return this;
    }

    public LogEntry build() {
      return new LogEntry(source, level, text, timestamp, url, lineNumber, stackTrace, networkRequestId, workerId, args);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy