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

io.proximax.xpx.model.Address Maven / Gradle / Ivy

There is a newer version: 0.1.0-beta.10
Show newest version
/*
 * Copyright 2018 ProximaX Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * Proximax P2P Storage REST API
 * Proximax P2P Storage REST API
 *
 * OpenAPI spec version: v0.0.1
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package io.proximax.xpx.model;

import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModelProperty;

import java.util.Objects;



/**
 * Address.
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-04-25T23:45:59.064-04:00")
public class Address {
  
  /** The encoded. */
  @SerializedName("encoded")
  private String encoded = null;

  /** The public key. */
  @SerializedName("publicKey")
  private PublicKey publicKey = null;

  /** The valid. */
  @SerializedName("valid")
  private Boolean valid = null;

  /** The version. */
  @SerializedName("version")
  private byte[] version = null;

  /**
   * Encoded.
   *
   * @param encoded the encoded
   * @return the address
   */
  public Address encoded(String encoded) {
    this.encoded = encoded;
    return this;
  }

   /**
    * Get encoded.
    *
    * @return encoded
    */
  @ApiModelProperty(value = "")
  public String getEncoded() {
    return encoded;
  }

  /**
   * Sets the encoded.
   *
   * @param encoded the new encoded
   */
  public void setEncoded(String encoded) {
    this.encoded = encoded;
  }

  /**
   * Public key.
   *
   * @param publicKey the public key
   * @return the address
   */
  public Address publicKey(PublicKey publicKey) {
    this.publicKey = publicKey;
    return this;
  }

   /**
    * Get publicKey.
    *
    * @return publicKey
    */
  @ApiModelProperty(value = "")
  public PublicKey getPublicKey() {
    return publicKey;
  }

  /**
   * Sets the public key.
   *
   * @param publicKey the new public key
   */
  public void setPublicKey(PublicKey publicKey) {
    this.publicKey = publicKey;
  }

  /**
   * Valid.
   *
   * @param valid the valid
   * @return the address
   */
  public Address valid(Boolean valid) {
    this.valid = valid;
    return this;
  }

   /**
    * Get valid.
    *
    * @return valid
    */
  @ApiModelProperty(value = "")
  public Boolean getValid() {
    return valid;
  }

  /**
   * Sets the valid.
   *
   * @param valid the new valid
   */
  public void setValid(Boolean valid) {
    this.valid = valid;
  }

  /**
   * Version.
   *
   * @param version the version
   * @return the address
   */
  public Address version(byte[] version) {
    this.version = version;
    return this;
  }

   /**
    * Get version.
    *
    * @return version
    */
  @ApiModelProperty(value = "")
  public byte[] getVersion() {
    return version;
  }

  /**
   * Sets the version.
   *
   * @param version the new version
   */
  public void setVersion(byte[] version) {
    this.version = version;
  }


  /* (non-Javadoc)
   * @see java.lang.Object#equals(java.lang.Object)
   */
  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Address address = (Address) o;
    return Objects.equals(this.encoded, address.encoded) &&
        Objects.equals(this.publicKey, address.publicKey) &&
        Objects.equals(this.valid, address.valid) &&
        Objects.equals(this.version, address.version);
  }

  /* (non-Javadoc)
   * @see java.lang.Object#hashCode()
   */
  @Override
  public int hashCode() {
    return Objects.hash(encoded, publicKey, valid, version);
  }


  /* (non-Javadoc)
   * @see java.lang.Object#toString()
   */
  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Address {\n");
    
    sb.append("    encoded: ").append(toIndentedString(encoded)).append("\n");
    sb.append("    publicKey: ").append(toIndentedString(publicKey)).append("\n");
    sb.append("    valid: ").append(toIndentedString(valid)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   *
   * @param o the o
   * @return the string
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
  
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy