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

com.google.cloud.pubsublite.beam.AutoValue_SubscriptionPartition 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.SubscriptionPath;
import javax.annotation.Generated;

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

  private final SubscriptionPath subscription;

  private final Partition partition;

  AutoValue_SubscriptionPartition(
      SubscriptionPath subscription,
      Partition partition) {
    if (subscription == null) {
      throw new NullPointerException("Null subscription");
    }
    this.subscription = subscription;
    if (partition == null) {
      throw new NullPointerException("Null partition");
    }
    this.partition = partition;
  }

  @Override
  SubscriptionPath subscription() {
    return subscription;
  }

  @Override
  Partition partition() {
    return partition;
  }

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

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy