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

com.adyen.model.management.MerchantLinks Maven / Gradle / Ivy

/*
 * Management API
 *
 * The version of the OpenAPI document: 3
 * 
 *
 * 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.management;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.management.LinksElement;
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;


/**
 * MerchantLinks
 */
@JsonPropertyOrder({
  MerchantLinks.JSON_PROPERTY_API_CREDENTIALS,
  MerchantLinks.JSON_PROPERTY_SELF,
  MerchantLinks.JSON_PROPERTY_USERS,
  MerchantLinks.JSON_PROPERTY_WEBHOOKS
})

public class MerchantLinks {
  public static final String JSON_PROPERTY_API_CREDENTIALS = "apiCredentials";
  private LinksElement apiCredentials;

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

  public static final String JSON_PROPERTY_USERS = "users";
  private LinksElement users;

  public static final String JSON_PROPERTY_WEBHOOKS = "webhooks";
  private LinksElement webhooks;

  public MerchantLinks() { 
  }

  public MerchantLinks apiCredentials(LinksElement apiCredentials) {
    this.apiCredentials = apiCredentials;
    return this;
  }

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

  public LinksElement getApiCredentials() {
    return apiCredentials;
  }


 /**
  * apiCredentials
  *
  * @param apiCredentials
  */ 
  @JsonProperty(JSON_PROPERTY_API_CREDENTIALS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setApiCredentials(LinksElement apiCredentials) {
    this.apiCredentials = apiCredentials;
  }


  public MerchantLinks self(LinksElement self) {
    this.self = self;
    return this;
  }

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

  public LinksElement getSelf() {
    return self;
  }


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


  public MerchantLinks users(LinksElement users) {
    this.users = users;
    return this;
  }

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

  public LinksElement getUsers() {
    return users;
  }


 /**
  * users
  *
  * @param users
  */ 
  @JsonProperty(JSON_PROPERTY_USERS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setUsers(LinksElement users) {
    this.users = users;
  }


  public MerchantLinks webhooks(LinksElement webhooks) {
    this.webhooks = webhooks;
    return this;
  }

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

  public LinksElement getWebhooks() {
    return webhooks;
  }


 /**
  * webhooks
  *
  * @param webhooks
  */ 
  @JsonProperty(JSON_PROPERTY_WEBHOOKS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setWebhooks(LinksElement webhooks) {
    this.webhooks = webhooks;
  }


  /**
   * Return true if this MerchantLinks object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    MerchantLinks merchantLinks = (MerchantLinks) o;
    return Objects.equals(this.apiCredentials, merchantLinks.apiCredentials) &&
        Objects.equals(this.self, merchantLinks.self) &&
        Objects.equals(this.users, merchantLinks.users) &&
        Objects.equals(this.webhooks, merchantLinks.webhooks);
  }

  @Override
  public int hashCode() {
    return Objects.hash(apiCredentials, self, users, webhooks);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class MerchantLinks {\n");
    sb.append("    apiCredentials: ").append(toIndentedString(apiCredentials)).append("\n");
    sb.append("    self: ").append(toIndentedString(self)).append("\n");
    sb.append("    users: ").append(toIndentedString(users)).append("\n");
    sb.append("    webhooks: ").append(toIndentedString(webhooks)).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 MerchantLinks given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of MerchantLinks
   * @throws JsonProcessingException if the JSON string is invalid with respect to MerchantLinks
   */
  public static MerchantLinks fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, MerchantLinks.class);
  }
/**
  * Convert an instance of MerchantLinks to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy