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

com.google.cloud.pubsublite.beam.AutoValue_TopicBacklogReaderSettings Maven / Gradle / Ivy

There is a newer version: 0.23.0
Show newest version
package com.google.cloud.pubsublite.beam;

import com.google.cloud.pubsublite.Partition;
import com.google.cloud.pubsublite.TopicPath;
import javax.annotation.Generated;

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

  private final TopicPath topicPath;

  private final Partition partition;

  private AutoValue_TopicBacklogReaderSettings(
      TopicPath topicPath,
      Partition partition) {
    this.topicPath = topicPath;
    this.partition = partition;
  }

  @Override
  TopicPath topicPath() {
    return topicPath;
  }

  @Override
  Partition partition() {
    return partition;
  }

  @Override
  public String toString() {
    return "TopicBacklogReaderSettings{"
        + "topicPath=" + topicPath + ", "
        + "partition=" + partition
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof TopicBacklogReaderSettings) {
      TopicBacklogReaderSettings that = (TopicBacklogReaderSettings) o;
      return this.topicPath.equals(that.topicPath())
          && this.partition.equals(that.partition());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= topicPath.hashCode();
    h$ *= 1000003;
    h$ ^= partition.hashCode();
    return h$;
  }

  private static final long serialVersionUID = -4001752066450248673L;

  static final class Builder extends TopicBacklogReaderSettings.Builder {
    private TopicPath topicPath;
    private Partition partition;
    Builder() {
    }
    @Override
    TopicBacklogReaderSettings.Builder setTopicPath(TopicPath topicPath) {
      if (topicPath == null) {
        throw new NullPointerException("Null topicPath");
      }
      this.topicPath = topicPath;
      return this;
    }
    @Override
    TopicBacklogReaderSettings.Builder setPartition(Partition partition) {
      if (partition == null) {
        throw new NullPointerException("Null partition");
      }
      this.partition = partition;
      return this;
    }
    @Override
    TopicBacklogReaderSettings build() {
      String missing = "";
      if (this.topicPath == null) {
        missing += " topicPath";
      }
      if (this.partition == null) {
        missing += " partition";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_TopicBacklogReaderSettings(
          this.topicPath,
          this.partition);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy