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

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

The newest version!

package org.jclouds.openstack.neutron.v2.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 tenantId;
  private final String name;
  private final String description;
  private final String firewallPolicyId;
  private final boolean shared;
  private final String protocol;
  private final IpVersion ipVersion;
  private final String sourceIpAddress;
  private final String destinationIpAddress;
  private final String sourcePort;
  private final String destinationPort;
  private final Integer position;
  private final String action;
  private final boolean enabled;

  AutoValue_FirewallRule(
      String id,
      String tenantId,
      String name,
      @Nullable String description,
      @Nullable String firewallPolicyId,
      boolean shared,
      @Nullable String protocol,
      @Nullable IpVersion ipVersion,
      @Nullable String sourceIpAddress,
      @Nullable String destinationIpAddress,
      @Nullable String sourcePort,
      @Nullable String destinationPort,
      @Nullable Integer position,
      @Nullable String action,
      boolean enabled) {
    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.firewallPolicyId = firewallPolicyId;
    this.shared = shared;
    this.protocol = protocol;
    this.ipVersion = ipVersion;
    this.sourceIpAddress = sourceIpAddress;
    this.destinationIpAddress = destinationIpAddress;
    this.sourcePort = sourcePort;
    this.destinationPort = destinationPort;
    this.position = position;
    this.action = action;
    this.enabled = enabled;
  }

  @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;
  }

  @Nullable
  @Override
  public String getFirewallPolicyId() {
    return firewallPolicyId;
  }

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

  @Nullable
  @Override
  public String getProtocol() {
    return protocol;
  }

  @Nullable
  @Override
  public IpVersion getIpVersion() {
    return ipVersion;
  }

  @Nullable
  @Override
  public String getSourceIpAddress() {
    return sourceIpAddress;
  }

  @Nullable
  @Override
  public String getDestinationIpAddress() {
    return destinationIpAddress;
  }

  @Nullable
  @Override
  public String getSourcePort() {
    return sourcePort;
  }

  @Nullable
  @Override
  public String getDestinationPort() {
    return destinationPort;
  }

  @Nullable
  @Override
  public Integer getPosition() {
    return position;
  }

  @Nullable
  @Override
  public String getAction() {
    return action;
  }

  @Override
  public boolean isEnabled() {
    return enabled;
  }

  @Override
  public String toString() {
    return "FirewallRule{"
        + "id=" + id + ", "
        + "tenantId=" + tenantId + ", "
        + "name=" + name + ", "
        + "description=" + description + ", "
        + "firewallPolicyId=" + firewallPolicyId + ", "
        + "shared=" + shared + ", "
        + "protocol=" + protocol + ", "
        + "ipVersion=" + ipVersion + ", "
        + "sourceIpAddress=" + sourceIpAddress + ", "
        + "destinationIpAddress=" + destinationIpAddress + ", "
        + "sourcePort=" + sourcePort + ", "
        + "destinationPort=" + destinationPort + ", "
        + "position=" + position + ", "
        + "action=" + action + ", "
        + "enabled=" + enabled
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof FirewallRule) {
      FirewallRule that = (FirewallRule) 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.firewallPolicyId == null) ? (that.getFirewallPolicyId() == null) : this.firewallPolicyId.equals(that.getFirewallPolicyId()))
           && (this.shared == that.isShared())
           && ((this.protocol == null) ? (that.getProtocol() == null) : this.protocol.equals(that.getProtocol()))
           && ((this.ipVersion == null) ? (that.getIpVersion() == null) : this.ipVersion.equals(that.getIpVersion()))
           && ((this.sourceIpAddress == null) ? (that.getSourceIpAddress() == null) : this.sourceIpAddress.equals(that.getSourceIpAddress()))
           && ((this.destinationIpAddress == null) ? (that.getDestinationIpAddress() == null) : this.destinationIpAddress.equals(that.getDestinationIpAddress()))
           && ((this.sourcePort == null) ? (that.getSourcePort() == null) : this.sourcePort.equals(that.getSourcePort()))
           && ((this.destinationPort == null) ? (that.getDestinationPort() == null) : this.destinationPort.equals(that.getDestinationPort()))
           && ((this.position == null) ? (that.getPosition() == null) : this.position.equals(that.getPosition()))
           && ((this.action == null) ? (that.getAction() == null) : this.action.equals(that.getAction()))
           && (this.enabled == that.isEnabled());
    }
    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 ^= (firewallPolicyId == null) ? 0 : this.firewallPolicyId.hashCode();
    h *= 1000003;
    h ^= this.shared ? 1231 : 1237;
    h *= 1000003;
    h ^= (protocol == null) ? 0 : this.protocol.hashCode();
    h *= 1000003;
    h ^= (ipVersion == null) ? 0 : this.ipVersion.hashCode();
    h *= 1000003;
    h ^= (sourceIpAddress == null) ? 0 : this.sourceIpAddress.hashCode();
    h *= 1000003;
    h ^= (destinationIpAddress == null) ? 0 : this.destinationIpAddress.hashCode();
    h *= 1000003;
    h ^= (sourcePort == null) ? 0 : this.sourcePort.hashCode();
    h *= 1000003;
    h ^= (destinationPort == null) ? 0 : this.destinationPort.hashCode();
    h *= 1000003;
    h ^= (position == null) ? 0 : this.position.hashCode();
    h *= 1000003;
    h ^= (action == null) ? 0 : this.action.hashCode();
    h *= 1000003;
    h ^= this.enabled ? 1231 : 1237;
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy