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

com.google.cloud.bigquery.AutoValue_ForeignKey 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_ForeignKey extends ForeignKey {

  @Nullable
  private final String name;

  @Nullable
  private final TableId referencedTable;

  @Nullable
  private final List columnReferences;

  private AutoValue_ForeignKey(
      @Nullable String name,
      @Nullable TableId referencedTable,
      @Nullable List columnReferences) {
    this.name = name;
    this.referencedTable = referencedTable;
    this.columnReferences = columnReferences;
  }

  @Nullable
  @Override
  public String getName() {
    return name;
  }

  @Nullable
  @Override
  public TableId getReferencedTable() {
    return referencedTable;
  }

  @Nullable
  @Override
  public List getColumnReferences() {
    return columnReferences;
  }

  @Override
  public String toString() {
    return "ForeignKey{"
        + "name=" + name + ", "
        + "referencedTable=" + referencedTable + ", "
        + "columnReferences=" + columnReferences
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ForeignKey) {
      ForeignKey that = (ForeignKey) o;
      return (this.name == null ? that.getName() == null : this.name.equals(that.getName()))
          && (this.referencedTable == null ? that.getReferencedTable() == null : this.referencedTable.equals(that.getReferencedTable()))
          && (this.columnReferences == null ? that.getColumnReferences() == null : this.columnReferences.equals(that.getColumnReferences()));
    }
    return false;
  }

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

  @Override
  public ForeignKey.Builder toBuilder() {
    return new AutoValue_ForeignKey.Builder(this);
  }

  static final class Builder extends ForeignKey.Builder {
    private String name;
    private TableId referencedTable;
    private List columnReferences;
    Builder() {
    }
    Builder(ForeignKey source) {
      this.name = source.getName();
      this.referencedTable = source.getReferencedTable();
      this.columnReferences = source.getColumnReferences();
    }
    @Override
    public ForeignKey.Builder setName(String name) {
      this.name = name;
      return this;
    }
    @Override
    public ForeignKey.Builder setReferencedTable(TableId referencedTable) {
      this.referencedTable = referencedTable;
      return this;
    }
    @Override
    public ForeignKey.Builder setColumnReferences(List columnReferences) {
      this.columnReferences = columnReferences;
      return this;
    }
    @Override
    public ForeignKey build() {
      return new AutoValue_ForeignKey(
          this.name,
          this.referencedTable,
          this.columnReferences);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy