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

org.jclouds.packet.domain.AutoValue_Facility Maven / Gradle / Ivy

The newest version!

package org.jclouds.packet.domain;

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

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

  private final String id;
  private final String name;
  private final String code;
  private final List features;
  private final Href address;

  AutoValue_Facility(
      String id,
      String name,
      String code,
      List features,
      @Nullable Href address) {
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (code == null) {
      throw new NullPointerException("Null code");
    }
    this.code = code;
    if (features == null) {
      throw new NullPointerException("Null features");
    }
    this.features = features;
    this.address = address;
  }

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

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

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

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

  @Nullable
  @Override
  public Href address() {
    return address;
  }

  @Override
  public String toString() {
    return "Facility{"
        + "id=" + id + ", "
        + "name=" + name + ", "
        + "code=" + code + ", "
        + "features=" + features + ", "
        + "address=" + address
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Facility) {
      Facility that = (Facility) o;
      return (this.id.equals(that.id()))
           && (this.name.equals(that.name()))
           && (this.code.equals(that.code()))
           && (this.features.equals(that.features()))
           && ((this.address == null) ? (that.address() == null) : this.address.equals(that.address()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.id.hashCode();
    h *= 1000003;
    h ^= this.name.hashCode();
    h *= 1000003;
    h ^= this.code.hashCode();
    h *= 1000003;
    h ^= this.features.hashCode();
    h *= 1000003;
    h ^= (address == null) ? 0 : this.address.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy