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

zipkin.reporter.local.AutoValue_LocalSender Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version

package zipkin.reporter.local;

import javax.annotation.Generated;
import zipkin.storage.StorageComponent;

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

  private final int messageMaxBytes;
  private final StorageComponent storage;

  private AutoValue_LocalSender(
      int messageMaxBytes,
      StorageComponent storage) {
    this.messageMaxBytes = messageMaxBytes;
    this.storage = storage;
  }

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

  @Override
  StorageComponent storage() {
    return storage;
  }

  @Override
  public String toString() {
    return "LocalSender{"
        + "messageMaxBytes=" + messageMaxBytes + ", "
        + "storage=" + storage
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof LocalSender) {
      LocalSender that = (LocalSender) o;
      return (this.messageMaxBytes == that.messageMaxBytes())
           && (this.storage.equals(that.storage()));
    }
    return false;
  }

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

  static final class Builder implements LocalSender.Builder {
    private Integer messageMaxBytes;
    private StorageComponent storage;
    Builder() {
    }
    Builder(LocalSender source) {
      this.messageMaxBytes = source.messageMaxBytes();
      this.storage = source.storage();
    }
    @Override
    public LocalSender.Builder messageMaxBytes(int messageMaxBytes) {
      this.messageMaxBytes = messageMaxBytes;
      return this;
    }
    @Override
    public LocalSender.Builder storage(StorageComponent storage) {
      this.storage = storage;
      return this;
    }
    @Override
    public LocalSender build() {
      String missing = "";
      if (messageMaxBytes == null) {
        missing += " messageMaxBytes";
      }
      if (storage == null) {
        missing += " storage";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_LocalSender(
          this.messageMaxBytes,
          this.storage);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy