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

org.jclouds.digitalocean2.domain.AutoValue_Key Maven / Gradle / Ivy

The newest version!

package org.jclouds.digitalocean2.domain;

import java.security.PublicKey;
import javax.annotation.Generated;

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

  private final int id;
  private final String name;
  private final String fingerprint;
  private final PublicKey publicKey;

  AutoValue_Key(
      int id,
      String name,
      String fingerprint,
      PublicKey publicKey) {
    this.id = id;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (fingerprint == null) {
      throw new NullPointerException("Null fingerprint");
    }
    this.fingerprint = fingerprint;
    if (publicKey == null) {
      throw new NullPointerException("Null publicKey");
    }
    this.publicKey = publicKey;
  }

  @Override
  public int id() {
    return id;
  }

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

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

  @Override
  public PublicKey publicKey() {
    return publicKey;
  }

  @Override
  public String toString() {
    return "Key{"
        + "id=" + id + ", "
        + "name=" + name + ", "
        + "fingerprint=" + fingerprint + ", "
        + "publicKey=" + publicKey
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Key) {
      Key that = (Key) o;
      return (this.id == that.id())
           && (this.name.equals(that.name()))
           && (this.fingerprint.equals(that.fingerprint()))
           && (this.publicKey.equals(that.publicKey()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.id;
    h *= 1000003;
    h ^= this.name.hashCode();
    h *= 1000003;
    h ^= this.fingerprint.hashCode();
    h *= 1000003;
    h ^= this.publicKey.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy