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

com.segment.analytics.messages.AutoValue_Batch Maven / Gradle / Ivy

The newest version!
package com.segment.analytics.messages;

import java.util.Date;
import java.util.List;
import java.util.Map;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_Batch extends Batch {

  private final List batch;

  private final Date sentAt;

  private final Map context;

  private final int sequence;

  private final String writeKey;

  AutoValue_Batch(
      List batch,
      Date sentAt,
      Map context,
      int sequence,
      String writeKey) {
    if (batch == null) {
      throw new NullPointerException("Null batch");
    }
    this.batch = batch;
    if (sentAt == null) {
      throw new NullPointerException("Null sentAt");
    }
    this.sentAt = sentAt;
    if (context == null) {
      throw new NullPointerException("Null context");
    }
    this.context = context;
    this.sequence = sequence;
    if (writeKey == null) {
      throw new NullPointerException("Null writeKey");
    }
    this.writeKey = writeKey;
  }

  @Override
  public List batch() {
    return batch;
  }

  @Override
  public Date sentAt() {
    return sentAt;
  }

  @Override
  public Map context() {
    return context;
  }

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

  @Override
  public String writeKey() {
    return writeKey;
  }

  @Override
  public String toString() {
    return "Batch{"
        + "batch=" + batch + ", "
        + "sentAt=" + sentAt + ", "
        + "context=" + context + ", "
        + "sequence=" + sequence + ", "
        + "writeKey=" + writeKey
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Batch) {
      Batch that = (Batch) o;
      return this.batch.equals(that.batch())
          && this.sentAt.equals(that.sentAt())
          && this.context.equals(that.context())
          && this.sequence == that.sequence()
          && this.writeKey.equals(that.writeKey());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= batch.hashCode();
    h$ *= 1000003;
    h$ ^= sentAt.hashCode();
    h$ *= 1000003;
    h$ ^= context.hashCode();
    h$ *= 1000003;
    h$ ^= sequence;
    h$ *= 1000003;
    h$ ^= writeKey.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy