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

org.jclouds.azurecompute.arm.domain.AutoValue_ResourceDefinition Maven / Gradle / Ivy

The newest version!

package org.jclouds.azurecompute.arm.domain;

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

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

  private final String name;
  private final String type;
  private final String location;
  private final String apiVersion;
  private final List dependsOn;
  private final Map tags;
  private final Object properties;

  private AutoValue_ResourceDefinition(
      String name,
      String type,
      String location,
      String apiVersion,
      @Nullable List dependsOn,
      @Nullable Map tags,
      @Nullable Object properties) {
    this.name = name;
    this.type = type;
    this.location = location;
    this.apiVersion = apiVersion;
    this.dependsOn = dependsOn;
    this.tags = tags;
    this.properties = properties;
  }

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

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

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

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

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

  @Nullable
  @Override
  public Map tags() {
    return tags;
  }

  @Nullable
  @Override
  public Object properties() {
    return properties;
  }

  @Override
  public String toString() {
    return "ResourceDefinition{"
        + "name=" + name + ", "
        + "type=" + type + ", "
        + "location=" + location + ", "
        + "apiVersion=" + apiVersion + ", "
        + "dependsOn=" + dependsOn + ", "
        + "tags=" + tags + ", "
        + "properties=" + properties
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ResourceDefinition) {
      ResourceDefinition that = (ResourceDefinition) o;
      return (this.name.equals(that.name()))
           && (this.type.equals(that.type()))
           && (this.location.equals(that.location()))
           && (this.apiVersion.equals(that.apiVersion()))
           && ((this.dependsOn == null) ? (that.dependsOn() == null) : this.dependsOn.equals(that.dependsOn()))
           && ((this.tags == null) ? (that.tags() == null) : this.tags.equals(that.tags()))
           && ((this.properties == null) ? (that.properties() == null) : this.properties.equals(that.properties()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.name.hashCode();
    h *= 1000003;
    h ^= this.type.hashCode();
    h *= 1000003;
    h ^= this.location.hashCode();
    h *= 1000003;
    h ^= this.apiVersion.hashCode();
    h *= 1000003;
    h ^= (dependsOn == null) ? 0 : this.dependsOn.hashCode();
    h *= 1000003;
    h ^= (tags == null) ? 0 : this.tags.hashCode();
    h *= 1000003;
    h ^= (properties == null) ? 0 : this.properties.hashCode();
    return h;
  }

  @Override
  public ResourceDefinition.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends ResourceDefinition.Builder {
    private String name;
    private String type;
    private String location;
    private String apiVersion;
    private List dependsOn;
    private Map tags;
    private Object properties;
    Builder() {
    }
    private Builder(ResourceDefinition source) {
      this.name = source.name();
      this.type = source.type();
      this.location = source.location();
      this.apiVersion = source.apiVersion();
      this.dependsOn = source.dependsOn();
      this.tags = source.tags();
      this.properties = source.properties();
    }
    @Override
    public ResourceDefinition.Builder name(String name) {
      if (name == null) {
        throw new NullPointerException("Null name");
      }
      this.name = name;
      return this;
    }
    @Override
    public ResourceDefinition.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public ResourceDefinition.Builder location(String location) {
      if (location == null) {
        throw new NullPointerException("Null location");
      }
      this.location = location;
      return this;
    }
    @Override
    public ResourceDefinition.Builder apiVersion(String apiVersion) {
      if (apiVersion == null) {
        throw new NullPointerException("Null apiVersion");
      }
      this.apiVersion = apiVersion;
      return this;
    }
    @Override
    public ResourceDefinition.Builder dependsOn(@Nullable List dependsOn) {
      this.dependsOn = dependsOn;
      return this;
    }
    @Override
    @Nullable List dependsOn() {
      return dependsOn;
    }
    @Override
    public ResourceDefinition.Builder tags(@Nullable Map tags) {
      this.tags = tags;
      return this;
    }
    @Override
    @Nullable Map tags() {
      return tags;
    }
    @Override
    public ResourceDefinition.Builder properties(@Nullable Object properties) {
      this.properties = properties;
      return this;
    }
    @Override
    ResourceDefinition autoBuild() {
      String missing = "";
      if (this.name == null) {
        missing += " name";
      }
      if (this.type == null) {
        missing += " type";
      }
      if (this.location == null) {
        missing += " location";
      }
      if (this.apiVersion == null) {
        missing += " apiVersion";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ResourceDefinition(
          this.name,
          this.type,
          this.location,
          this.apiVersion,
          this.dependsOn,
          this.tags,
          this.properties);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy