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

org.jclouds.googlecomputeengine.domain.AutoValue_Instance_NetworkInterface Maven / Gradle / Ivy

The newest version!

package org.jclouds.googlecomputeengine.domain;

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

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_Instance_NetworkInterface extends Instance.NetworkInterface {

  private final String name;
  private final URI network;
  private final String networkIP;
  private final List accessConfigs;

  AutoValue_Instance_NetworkInterface(
      String name,
      URI network,
      @Nullable String networkIP,
      List accessConfigs) {
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (network == null) {
      throw new NullPointerException("Null network");
    }
    this.network = network;
    this.networkIP = networkIP;
    if (accessConfigs == null) {
      throw new NullPointerException("Null accessConfigs");
    }
    this.accessConfigs = accessConfigs;
  }

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

  @Override
  public URI network() {
    return network;
  }

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

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

  @Override
  public String toString() {
    return "NetworkInterface{"
        + "name=" + name + ", "
        + "network=" + network + ", "
        + "networkIP=" + networkIP + ", "
        + "accessConfigs=" + accessConfigs
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Instance.NetworkInterface) {
      Instance.NetworkInterface that = (Instance.NetworkInterface) o;
      return (this.name.equals(that.name()))
           && (this.network.equals(that.network()))
           && ((this.networkIP == null) ? (that.networkIP() == null) : this.networkIP.equals(that.networkIP()))
           && (this.accessConfigs.equals(that.accessConfigs()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.name.hashCode();
    h *= 1000003;
    h ^= this.network.hashCode();
    h *= 1000003;
    h ^= (networkIP == null) ? 0 : this.networkIP.hashCode();
    h *= 1000003;
    h ^= this.accessConfigs.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy