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

org.apache.jclouds.profitbricks.rest.domain.AutoValue_FirewallRule Maven / Gradle / Ivy

The newest version!

package org.apache.jclouds.profitbricks.rest.domain;

import javax.annotation.Generated;
import org.jclouds.javax.annotation.Nullable;

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

  private final String id;
  private final String dataCenterId;
  private final String serverId;
  private final String nicId;
  private final String type;
  private final String href;
  private final Metadata metadata;
  private final FirewallRule.Properties properties;

  AutoValue_FirewallRule(
      String id,
      @Nullable String dataCenterId,
      @Nullable String serverId,
      @Nullable String nicId,
      String type,
      String href,
      @Nullable Metadata metadata,
      @Nullable FirewallRule.Properties properties) {
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
    this.dataCenterId = dataCenterId;
    this.serverId = serverId;
    this.nicId = nicId;
    if (type == null) {
      throw new NullPointerException("Null type");
    }
    this.type = type;
    if (href == null) {
      throw new NullPointerException("Null href");
    }
    this.href = href;
    this.metadata = metadata;
    this.properties = properties;
  }

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

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

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

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

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

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

  @Nullable
  @Override
  public Metadata metadata() {
    return metadata;
  }

  @Nullable
  @Override
  public FirewallRule.Properties properties() {
    return properties;
  }

  @Override
  public String toString() {
    return "FirewallRule{"
        + "id=" + id + ", "
        + "dataCenterId=" + dataCenterId + ", "
        + "serverId=" + serverId + ", "
        + "nicId=" + nicId + ", "
        + "type=" + type + ", "
        + "href=" + href + ", "
        + "metadata=" + metadata + ", "
        + "properties=" + properties
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof FirewallRule) {
      FirewallRule that = (FirewallRule) o;
      return (this.id.equals(that.id()))
           && ((this.dataCenterId == null) ? (that.dataCenterId() == null) : this.dataCenterId.equals(that.dataCenterId()))
           && ((this.serverId == null) ? (that.serverId() == null) : this.serverId.equals(that.serverId()))
           && ((this.nicId == null) ? (that.nicId() == null) : this.nicId.equals(that.nicId()))
           && (this.type.equals(that.type()))
           && (this.href.equals(that.href()))
           && ((this.metadata == null) ? (that.metadata() == null) : this.metadata.equals(that.metadata()))
           && ((this.properties == null) ? (that.properties() == null) : this.properties.equals(that.properties()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.id.hashCode();
    h *= 1000003;
    h ^= (dataCenterId == null) ? 0 : this.dataCenterId.hashCode();
    h *= 1000003;
    h ^= (serverId == null) ? 0 : this.serverId.hashCode();
    h *= 1000003;
    h ^= (nicId == null) ? 0 : this.nicId.hashCode();
    h *= 1000003;
    h ^= this.type.hashCode();
    h *= 1000003;
    h ^= this.href.hashCode();
    h *= 1000003;
    h ^= (metadata == null) ? 0 : this.metadata.hashCode();
    h *= 1000003;
    h ^= (properties == null) ? 0 : this.properties.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy