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

com.adyen.model.balanceplatform.InvalidField 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.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;


/**
 * InvalidField
 */
@JsonPropertyOrder({
  InvalidField.JSON_PROPERTY_MESSAGE,
  InvalidField.JSON_PROPERTY_NAME,
  InvalidField.JSON_PROPERTY_VALUE
})

public class InvalidField {
  public static final String JSON_PROPERTY_MESSAGE = "message";
  private String message;

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

  public static final String JSON_PROPERTY_VALUE = "value";
  private String value;

  public InvalidField() { 
  }

  public InvalidField message(String message) {
    this.message = message;
    return this;
  }

   /**
   * Description of the validation error.
   * @return message
  **/
  @ApiModelProperty(required = true, value = "Description of the validation error.")
  @JsonProperty(JSON_PROPERTY_MESSAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getMessage() {
    return message;
  }


 /**
  * Description of the validation error.
  *
  * @param message
  */ 
  @JsonProperty(JSON_PROPERTY_MESSAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMessage(String message) {
    this.message = message;
  }


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

   /**
   * The field that has an invalid value.
   * @return name
  **/
  @ApiModelProperty(required = true, value = "The field that has an invalid value.")
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getName() {
    return name;
  }


 /**
  * The field that has an invalid value.
  *
  * @param name
  */ 
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setName(String name) {
    this.name = name;
  }


  public InvalidField value(String value) {
    this.value = value;
    return this;
  }

   /**
   * The invalid value.
   * @return value
  **/
  @ApiModelProperty(required = true, value = "The invalid value.")
  @JsonProperty(JSON_PROPERTY_VALUE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getValue() {
    return value;
  }


 /**
  * The invalid value.
  *
  * @param value
  */ 
  @JsonProperty(JSON_PROPERTY_VALUE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setValue(String value) {
    this.value = value;
  }


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

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

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy