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

com.google.cloud.pubsublite.beam.AutoValue_UuidDeduplicationOptions 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.proto.SequencedMessage;
import javax.annotation.Generated;
import org.apache.beam.sdk.transforms.Deduplicate;
import org.apache.beam.sdk.transforms.SerializableFunction;

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

  private final SerializableFunction uuidExtractor;

  private final Deduplicate.KeyedValues deduplicate;

  private AutoValue_UuidDeduplicationOptions(
      SerializableFunction uuidExtractor,
      Deduplicate.KeyedValues deduplicate) {
    this.uuidExtractor = uuidExtractor;
    this.deduplicate = deduplicate;
  }

  @Override
  public SerializableFunction uuidExtractor() {
    return uuidExtractor;
  }

  @Override
  public Deduplicate.KeyedValues deduplicate() {
    return deduplicate;
  }

  @Override
  public String toString() {
    return "UuidDeduplicationOptions{"
        + "uuidExtractor=" + uuidExtractor + ", "
        + "deduplicate=" + deduplicate
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof UuidDeduplicationOptions) {
      UuidDeduplicationOptions that = (UuidDeduplicationOptions) o;
      return this.uuidExtractor.equals(that.uuidExtractor())
          && this.deduplicate.equals(that.deduplicate());
    }
    return false;
  }

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

  private static final long serialVersionUID = 9837489720893L;

  static final class Builder extends UuidDeduplicationOptions.Builder {
    private SerializableFunction uuidExtractor;
    private Deduplicate.KeyedValues deduplicate;
    Builder() {
    }
    @Override
    public UuidDeduplicationOptions.Builder setUuidExtractor(SerializableFunction uuidExtractor) {
      if (uuidExtractor == null) {
        throw new NullPointerException("Null uuidExtractor");
      }
      this.uuidExtractor = uuidExtractor;
      return this;
    }
    @Override
    public UuidDeduplicationOptions.Builder setDeduplicate(Deduplicate.KeyedValues deduplicate) {
      if (deduplicate == null) {
        throw new NullPointerException("Null deduplicate");
      }
      this.deduplicate = deduplicate;
      return this;
    }
    @Override
    public UuidDeduplicationOptions build() {
      String missing = "";
      if (this.uuidExtractor == null) {
        missing += " uuidExtractor";
      }
      if (this.deduplicate == null) {
        missing += " deduplicate";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_UuidDeduplicationOptions(
          this.uuidExtractor,
          this.deduplicate);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy