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

com.hubspot.chrome.devtools.client.core.database.Error Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Database error.
 */
public final class Error {
  private String message;

  private Integer code;

  @JsonCreator
  public Error(@JsonProperty("message") String message, @JsonProperty("code") Integer code) {
    this.message = message;
    this.code = code;
  }

  public String getMessage() {
    return message;
  }

  public Integer getCode() {
    return code;
  }

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

  public static final class Builder {
    private String message;

    private Integer code;

    private Builder() {
    }

    public Error.Builder setMessage(String message) {
      this.message = message;
      return this;
    }

    public Error.Builder setCode(Integer code) {
      this.code = code;
      return this;
    }

    public Error build() {
      return new Error(message, code);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy