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

com.adyen.model.management.DataCenter 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.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;


/**
 * DataCenter
 */
@JsonPropertyOrder({
  DataCenter.JSON_PROPERTY_LIVE_PREFIX,
  DataCenter.JSON_PROPERTY_NAME
})

public class DataCenter {
  public static final String JSON_PROPERTY_LIVE_PREFIX = "livePrefix";
  private String livePrefix;

  public static final String JSON_PROPERTY_NAME = "name";
  private String name;

  public DataCenter() { 
  }

  public DataCenter livePrefix(String livePrefix) {
    this.livePrefix = livePrefix;
    return this;
  }

   /**
   * The unique [live URL prefix](https://docs.adyen.com/development-resources/live-endpoints#live-url-prefix) for your live endpoint. Each data center has its own live URL prefix.  This field is empty for requests made in the test environment.
   * @return livePrefix
  **/
  @ApiModelProperty(value = "The unique [live URL prefix](https://docs.adyen.com/development-resources/live-endpoints#live-url-prefix) for your live endpoint. Each data center has its own live URL prefix.  This field is empty for requests made in the test environment.")
  @JsonProperty(JSON_PROPERTY_LIVE_PREFIX)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getLivePrefix() {
    return livePrefix;
  }


 /**
  * The unique [live URL prefix](https://docs.adyen.com/development-resources/live-endpoints#live-url-prefix) for your live endpoint. Each data center has its own live URL prefix.  This field is empty for requests made in the test environment.
  *
  * @param livePrefix
  */ 
  @JsonProperty(JSON_PROPERTY_LIVE_PREFIX)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLivePrefix(String livePrefix) {
    this.livePrefix = livePrefix;
  }


  public DataCenter name(String name) {
    this.name = name;
    return this;
  }

   /**
   * The name assigned to a data center, for example **EU** for the European data center. Possible values are:  * **default**: the European data center. This value is always returned in the test environment.  * **AU** * **EU** * **US**
   * @return name
  **/
  @ApiModelProperty(value = "The name assigned to a data center, for example **EU** for the European data center. Possible values are:  * **default**: the European data center. This value is always returned in the test environment.  * **AU** * **EU** * **US**")
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getName() {
    return name;
  }


 /**
  * The name assigned to a data center, for example **EU** for the European data center. Possible values are:  * **default**: the European data center. This value is always returned in the test environment.  * **AU** * **EU** * **US**
  *
  * @param name
  */ 
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setName(String name) {
    this.name = name;
  }


  /**
   * Return true if this DataCenter object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DataCenter dataCenter = (DataCenter) o;
    return Objects.equals(this.livePrefix, dataCenter.livePrefix) &&
        Objects.equals(this.name, dataCenter.name);
  }

  @Override
  public int hashCode() {
    return Objects.hash(livePrefix, name);
  }

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy