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

com.google.cloud.bigquery.AutoValue_TableConstraints Maven / Gradle / Ivy

There is a newer version: 2.44.0
Show newest version
package com.google.cloud.bigquery;

import java.util.List;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  @Nullable
  private final List foreignKeys;

  @Nullable
  private final PrimaryKey primaryKey;

  private AutoValue_TableConstraints(
      @Nullable List foreignKeys,
      @Nullable PrimaryKey primaryKey) {
    this.foreignKeys = foreignKeys;
    this.primaryKey = primaryKey;
  }

  @Nullable
  @Override
  public List getForeignKeys() {
    return foreignKeys;
  }

  @Nullable
  @Override
  public PrimaryKey getPrimaryKey() {
    return primaryKey;
  }

  @Override
  public String toString() {
    return "TableConstraints{"
        + "foreignKeys=" + foreignKeys + ", "
        + "primaryKey=" + primaryKey
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof TableConstraints) {
      TableConstraints that = (TableConstraints) o;
      return (this.foreignKeys == null ? that.getForeignKeys() == null : this.foreignKeys.equals(that.getForeignKeys()))
          && (this.primaryKey == null ? that.getPrimaryKey() == null : this.primaryKey.equals(that.getPrimaryKey()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (foreignKeys == null) ? 0 : foreignKeys.hashCode();
    h$ *= 1000003;
    h$ ^= (primaryKey == null) ? 0 : primaryKey.hashCode();
    return h$;
  }

  @Override
  public TableConstraints.Builder toBuilder() {
    return new AutoValue_TableConstraints.Builder(this);
  }

  static final class Builder extends TableConstraints.Builder {
    private List foreignKeys;
    private PrimaryKey primaryKey;
    Builder() {
    }
    Builder(TableConstraints source) {
      this.foreignKeys = source.getForeignKeys();
      this.primaryKey = source.getPrimaryKey();
    }
    @Override
    public TableConstraints.Builder setForeignKeys(List foreignKeys) {
      this.foreignKeys = foreignKeys;
      return this;
    }
    @Override
    public TableConstraints.Builder setPrimaryKey(PrimaryKey primaryKey) {
      this.primaryKey = primaryKey;
      return this;
    }
    @Override
    public TableConstraints build() {
      return new AutoValue_TableConstraints(
          this.foreignKeys,
          this.primaryKey);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy