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

org.jclouds.softlayer.domain.AutoValue_Network Maven / Gradle / Ivy

The newest version!

package org.jclouds.softlayer.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_Network extends Network {

  private final long accountId;
  private final long id;
  private final int cidr;
  private final String networkIdentifier;
  private final String name;
  private final String notes;
  private final List subnets;

  AutoValue_Network(
      long accountId,
      long id,
      int cidr,
      String networkIdentifier,
      @Nullable String name,
      @Nullable String notes,
      @Nullable List subnets) {
    this.accountId = accountId;
    this.id = id;
    this.cidr = cidr;
    if (networkIdentifier == null) {
      throw new NullPointerException("Null networkIdentifier");
    }
    this.networkIdentifier = networkIdentifier;
    this.name = name;
    this.notes = notes;
    this.subnets = subnets;
  }

  @Override
  public long accountId() {
    return accountId;
  }

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

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

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

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

  @Nullable
  @Override
  public String notes() {
    return notes;
  }

  @Nullable
  @Override
  public List subnets() {
    return subnets;
  }

  @Override
  public String toString() {
    return "Network{"
        + "accountId=" + accountId + ", "
        + "id=" + id + ", "
        + "cidr=" + cidr + ", "
        + "networkIdentifier=" + networkIdentifier + ", "
        + "name=" + name + ", "
        + "notes=" + notes + ", "
        + "subnets=" + subnets
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Network) {
      Network that = (Network) o;
      return (this.accountId == that.accountId())
           && (this.id == that.id())
           && (this.cidr == that.cidr())
           && (this.networkIdentifier.equals(that.networkIdentifier()))
           && ((this.name == null) ? (that.name() == null) : this.name.equals(that.name()))
           && ((this.notes == null) ? (that.notes() == null) : this.notes.equals(that.notes()))
           && ((this.subnets == null) ? (that.subnets() == null) : this.subnets.equals(that.subnets()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= (this.accountId >>> 32) ^ this.accountId;
    h *= 1000003;
    h ^= (this.id >>> 32) ^ this.id;
    h *= 1000003;
    h ^= this.cidr;
    h *= 1000003;
    h ^= this.networkIdentifier.hashCode();
    h *= 1000003;
    h ^= (name == null) ? 0 : this.name.hashCode();
    h *= 1000003;
    h ^= (notes == null) ? 0 : this.notes.hashCode();
    h *= 1000003;
    h ^= (subnets == null) ? 0 : this.subnets.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy