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

org.jclouds.openstack.neutron.v2.domain.AutoValue_FirewallPolicy Maven / Gradle / Ivy

The newest version!

package org.jclouds.openstack.neutron.v2.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_FirewallPolicy extends FirewallPolicy {

  private final String id;
  private final String tenantId;
  private final String name;
  private final String description;
  private final boolean shared;
  private final List firewallRules;
  private final boolean audited;

  AutoValue_FirewallPolicy(
      String id,
      String tenantId,
      String name,
      @Nullable String description,
      boolean shared,
      @Nullable List firewallRules,
      boolean audited) {
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
    if (tenantId == null) {
      throw new NullPointerException("Null tenantId");
    }
    this.tenantId = tenantId;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    this.description = description;
    this.shared = shared;
    this.firewallRules = firewallRules;
    this.audited = audited;
  }

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

  @Override
  public String getTenantId() {
    return tenantId;
  }

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

  @Nullable
  @Override
  public String getDescription() {
    return description;
  }

  @Override
  public boolean isShared() {
    return shared;
  }

  @Nullable
  @Override
  public List getFirewallRules() {
    return firewallRules;
  }

  @Override
  public boolean isAudited() {
    return audited;
  }

  @Override
  public String toString() {
    return "FirewallPolicy{"
        + "id=" + id + ", "
        + "tenantId=" + tenantId + ", "
        + "name=" + name + ", "
        + "description=" + description + ", "
        + "shared=" + shared + ", "
        + "firewallRules=" + firewallRules + ", "
        + "audited=" + audited
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof FirewallPolicy) {
      FirewallPolicy that = (FirewallPolicy) o;
      return (this.id.equals(that.getId()))
           && (this.tenantId.equals(that.getTenantId()))
           && (this.name.equals(that.getName()))
           && ((this.description == null) ? (that.getDescription() == null) : this.description.equals(that.getDescription()))
           && (this.shared == that.isShared())
           && ((this.firewallRules == null) ? (that.getFirewallRules() == null) : this.firewallRules.equals(that.getFirewallRules()))
           && (this.audited == that.isAudited());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.id.hashCode();
    h *= 1000003;
    h ^= this.tenantId.hashCode();
    h *= 1000003;
    h ^= this.name.hashCode();
    h *= 1000003;
    h ^= (description == null) ? 0 : this.description.hashCode();
    h *= 1000003;
    h ^= this.shared ? 1231 : 1237;
    h *= 1000003;
    h ^= (firewallRules == null) ? 0 : this.firewallRules.hashCode();
    h *= 1000003;
    h ^= this.audited ? 1231 : 1237;
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy