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

zipkin.reporter.libthrift.AutoValue_LibthriftSender Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version

package zipkin.reporter.libthrift;

import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_LibthriftSender extends LibthriftSender {

  private final int messageMaxBytes;
  private final String host;
  private final int port;
  private final int socketTimeout;
  private final int connectTimeout;

  private AutoValue_LibthriftSender(
      int messageMaxBytes,
      String host,
      int port,
      int socketTimeout,
      int connectTimeout) {
    this.messageMaxBytes = messageMaxBytes;
    this.host = host;
    this.port = port;
    this.socketTimeout = socketTimeout;
    this.connectTimeout = connectTimeout;
  }

  @Override
  public int messageMaxBytes() {
    return messageMaxBytes;
  }

  @Override
  String host() {
    return host;
  }

  @Override
  int port() {
    return port;
  }

  @Override
  int socketTimeout() {
    return socketTimeout;
  }

  @Override
  int connectTimeout() {
    return connectTimeout;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof LibthriftSender) {
      LibthriftSender that = (LibthriftSender) o;
      return (this.messageMaxBytes == that.messageMaxBytes())
           && (this.host.equals(that.host()))
           && (this.port == that.port())
           && (this.socketTimeout == that.socketTimeout())
           && (this.connectTimeout == that.connectTimeout());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.messageMaxBytes;
    h *= 1000003;
    h ^= this.host.hashCode();
    h *= 1000003;
    h ^= this.port;
    h *= 1000003;
    h ^= this.socketTimeout;
    h *= 1000003;
    h ^= this.connectTimeout;
    return h;
  }

  @Override
  public LibthriftSender.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder implements LibthriftSender.Builder {
    private Integer messageMaxBytes;
    private String host;
    private Integer port;
    private Integer socketTimeout;
    private Integer connectTimeout;
    Builder() {
    }
    private Builder(LibthriftSender source) {
      this.messageMaxBytes = source.messageMaxBytes();
      this.host = source.host();
      this.port = source.port();
      this.socketTimeout = source.socketTimeout();
      this.connectTimeout = source.connectTimeout();
    }
    @Override
    public LibthriftSender.Builder messageMaxBytes(int messageMaxBytes) {
      this.messageMaxBytes = messageMaxBytes;
      return this;
    }
    @Override
    public LibthriftSender.Builder host(String host) {
      if (host == null) {
        throw new NullPointerException("Null host");
      }
      this.host = host;
      return this;
    }
    @Override
    public LibthriftSender.Builder port(int port) {
      this.port = port;
      return this;
    }
    @Override
    public LibthriftSender.Builder socketTimeout(int socketTimeout) {
      this.socketTimeout = socketTimeout;
      return this;
    }
    @Override
    public LibthriftSender.Builder connectTimeout(int connectTimeout) {
      this.connectTimeout = connectTimeout;
      return this;
    }
    @Override
    public LibthriftSender build() {
      String missing = "";
      if (this.messageMaxBytes == null) {
        missing += " messageMaxBytes";
      }
      if (this.host == null) {
        missing += " host";
      }
      if (this.port == null) {
        missing += " port";
      }
      if (this.socketTimeout == null) {
        missing += " socketTimeout";
      }
      if (this.connectTimeout == null) {
        missing += " connectTimeout";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_LibthriftSender(
          this.messageMaxBytes,
          this.host,
          this.port,
          this.socketTimeout,
          this.connectTimeout);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy