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

org.jclouds.profitbricks.domain.AutoValue_Snapshot_Request_CreatePayload Maven / Gradle / Ivy

The newest version!

package org.jclouds.profitbricks.domain;

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

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_Snapshot_Request_CreatePayload extends Snapshot.Request.CreatePayload {

  private final String storageId;
  private final String name;
  private final String description;

  private AutoValue_Snapshot_Request_CreatePayload(
      String storageId,
      String name,
      @Nullable String description) {
    this.storageId = storageId;
    this.name = name;
    this.description = description;
  }

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

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

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

  @Override
  public String toString() {
    return "CreatePayload{"
        + "storageId=" + storageId + ", "
        + "name=" + name + ", "
        + "description=" + description
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Snapshot.Request.CreatePayload) {
      Snapshot.Request.CreatePayload that = (Snapshot.Request.CreatePayload) o;
      return (this.storageId.equals(that.storageId()))
           && (this.name.equals(that.name()))
           && ((this.description == null) ? (that.description() == null) : this.description.equals(that.description()));
    }
    return false;
  }

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

  static final class Builder extends Snapshot.Request.CreatePayload.Builder {
    private String storageId;
    private String name;
    private String description;
    Builder() {
    }
    @Override
    public Snapshot.Request.CreatePayload.Builder storageId(String storageId) {
      if (storageId == null) {
        throw new NullPointerException("Null storageId");
      }
      this.storageId = storageId;
      return this;
    }
    @Override
    public Snapshot.Request.CreatePayload.Builder name(String name) {
      if (name == null) {
        throw new NullPointerException("Null name");
      }
      this.name = name;
      return this;
    }
    @Override
    public Snapshot.Request.CreatePayload.Builder description(@Nullable String description) {
      this.description = description;
      return this;
    }
    @Override
    public Snapshot.Request.CreatePayload build() {
      String missing = "";
      if (this.storageId == null) {
        missing += " storageId";
      }
      if (this.name == null) {
        missing += " name";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_Snapshot_Request_CreatePayload(
          this.storageId,
          this.name,
          this.description);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy