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

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

The newest version!

package org.jclouds.azurecompute.arm.domain;

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

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

  private final String id;
  private final String name;
  private final String location;
  private final ImageProperties properties;
  private final Map tags;

  private AutoValue_Image(
      @Nullable String id,
      @Nullable String name,
      String location,
      ImageProperties properties,
      @Nullable Map tags) {
    this.id = id;
    this.name = name;
    this.location = location;
    this.properties = properties;
    this.tags = tags;
  }

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

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

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

  @Override
  public ImageProperties properties() {
    return properties;
  }

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

  @Override
  public String toString() {
    return "Image{"
        + "id=" + id + ", "
        + "name=" + name + ", "
        + "location=" + location + ", "
        + "properties=" + properties + ", "
        + "tags=" + tags
        + "}";
  }

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

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

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

  static final class Builder extends Image.Builder {
    private String id;
    private String name;
    private String location;
    private ImageProperties properties;
    private Map tags;
    Builder() {
    }
    private Builder(Image source) {
      this.id = source.id();
      this.name = source.name();
      this.location = source.location();
      this.properties = source.properties();
      this.tags = source.tags();
    }
    @Override
    public Image.Builder id(@Nullable String id) {
      this.id = id;
      return this;
    }
    @Override
    public Image.Builder name(@Nullable String name) {
      this.name = name;
      return this;
    }
    @Override
    public Image.Builder location(String location) {
      if (location == null) {
        throw new NullPointerException("Null location");
      }
      this.location = location;
      return this;
    }
    @Override
    public Image.Builder properties(ImageProperties properties) {
      if (properties == null) {
        throw new NullPointerException("Null properties");
      }
      this.properties = properties;
      return this;
    }
    @Override
    public Image.Builder tags(@Nullable Map tags) {
      this.tags = tags;
      return this;
    }
    @Override
    @Nullable Map tags() {
      return tags;
    }
    @Override
    Image autoBuild() {
      String missing = "";
      if (this.location == null) {
        missing += " location";
      }
      if (this.properties == null) {
        missing += " properties";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_Image(
          this.id,
          this.name,
          this.location,
          this.properties,
          this.tags);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy