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

com.adyen.model.balanceplatform.Link Maven / Gradle / Ivy

/*
 * Configuration API
 *
 * The version of the OpenAPI document: 2
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.adyen.model.balanceplatform;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.balanceplatform.Href;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * Link
 */
@JsonPropertyOrder({
  Link.JSON_PROPERTY_FIRST,
  Link.JSON_PROPERTY_LAST,
  Link.JSON_PROPERTY_NEXT,
  Link.JSON_PROPERTY_PREVIOUS,
  Link.JSON_PROPERTY_SELF
})

public class Link {
  public static final String JSON_PROPERTY_FIRST = "first";
  private Href first;

  public static final String JSON_PROPERTY_LAST = "last";
  private Href last;

  public static final String JSON_PROPERTY_NEXT = "next";
  private Href next;

  public static final String JSON_PROPERTY_PREVIOUS = "previous";
  private Href previous;

  public static final String JSON_PROPERTY_SELF = "self";
  private Href self;

  public Link() { 
  }

  public Link first(Href first) {
    this.first = first;
    return this;
  }

   /**
   * Get first
   * @return first
  **/
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_FIRST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Href getFirst() {
    return first;
  }


 /**
  * first
  *
  * @param first
  */ 
  @JsonProperty(JSON_PROPERTY_FIRST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFirst(Href first) {
    this.first = first;
  }


  public Link last(Href last) {
    this.last = last;
    return this;
  }

   /**
   * Get last
   * @return last
  **/
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_LAST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Href getLast() {
    return last;
  }


 /**
  * last
  *
  * @param last
  */ 
  @JsonProperty(JSON_PROPERTY_LAST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLast(Href last) {
    this.last = last;
  }


  public Link next(Href next) {
    this.next = next;
    return this;
  }

   /**
   * Get next
   * @return next
  **/
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_NEXT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Href getNext() {
    return next;
  }


 /**
  * next
  *
  * @param next
  */ 
  @JsonProperty(JSON_PROPERTY_NEXT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setNext(Href next) {
    this.next = next;
  }


  public Link previous(Href previous) {
    this.previous = previous;
    return this;
  }

   /**
   * Get previous
   * @return previous
  **/
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_PREVIOUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Href getPrevious() {
    return previous;
  }


 /**
  * previous
  *
  * @param previous
  */ 
  @JsonProperty(JSON_PROPERTY_PREVIOUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setPrevious(Href previous) {
    this.previous = previous;
  }


  public Link self(Href self) {
    this.self = self;
    return this;
  }

   /**
   * Get self
   * @return self
  **/
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_SELF)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Href getSelf() {
    return self;
  }


 /**
  * self
  *
  * @param self
  */ 
  @JsonProperty(JSON_PROPERTY_SELF)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSelf(Href self) {
    this.self = self;
  }


  /**
   * Return true if this Link object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Link link = (Link) o;
    return Objects.equals(this.first, link.first) &&
        Objects.equals(this.last, link.last) &&
        Objects.equals(this.next, link.next) &&
        Objects.equals(this.previous, link.previous) &&
        Objects.equals(this.self, link.self);
  }

  @Override
  public int hashCode() {
    return Objects.hash(first, last, next, previous, self);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Link {\n");
    sb.append("    first: ").append(toIndentedString(first)).append("\n");
    sb.append("    last: ").append(toIndentedString(last)).append("\n");
    sb.append("    next: ").append(toIndentedString(next)).append("\n");
    sb.append("    previous: ").append(toIndentedString(previous)).append("\n");
    sb.append("    self: ").append(toIndentedString(self)).append("\n");
    sb.append("}");
    return sb.toString();
  }

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

/**
   * Create an instance of Link given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of Link
   * @throws JsonProcessingException if the JSON string is invalid with respect to Link
   */
  public static Link fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, Link.class);
  }
/**
  * Convert an instance of Link to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy