content: /*
   * Adyen Payout API
   *
   * The version of the OpenAPI document: 68
   *
   *
   * 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.payout;
  
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import java.util.*;
  import java.util.HashMap;
  import java.util.Map;
  
  /** ModifyRequest */
  @JsonPropertyOrder({
    ModifyRequest.JSON_PROPERTY_ADDITIONAL_DATA,
    ModifyRequest.JSON_PROPERTY_MERCHANT_ACCOUNT,
    ModifyRequest.JSON_PROPERTY_ORIGINAL_REFERENCE
  })
  public class ModifyRequest {
    public static final String JSON_PROPERTY_ADDITIONAL_DATA = "additionalData";
    private Map<String, String> additionalData;
  
    public static final String JSON_PROPERTY_MERCHANT_ACCOUNT = "merchantAccount";
    private String merchantAccount;
  
    public static final String JSON_PROPERTY_ORIGINAL_REFERENCE = "originalReference";
    private String originalReference;
  
    public ModifyRequest() {}
  
    /**
     * This field contains additional data, which may be required for a particular payout request.
     *
     * @param additionalData This field contains additional data, which may be required for a
     *     particular payout request.
     * @return the current {@code ModifyRequest} instance, allowing for method chaining
     */
    public ModifyRequest additionalData(Map<String, String> additionalData) {
      this.additionalData = additionalData;
      return this;
    }
  
    public ModifyRequest putAdditionalDataItem(String key, String additionalDataItem) {
      if (this.additionalData == null) {
        this.additionalData = new HashMap<>();
      }
      this.additionalData.put(key, additionalDataItem);
      return this;
    }
  
    /**
     * This field contains additional data, which may be required for a particular payout request.
     *
     * @return additionalData This field contains additional data, which may be required for a
     *     particular payout request.
     */
    @JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Map<String, String> getAdditionalData() {
      return additionalData;
    }
  
    /**
     * This field contains additional data, which may be required for a particular payout request.
     *
     * @param additionalData This field contains additional data, which may be required for a
     *     particular payout request.
     */
    @JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAdditionalData(Map<String, String> additionalData) {
      this.additionalData = additionalData;
    }
  
    /**
     * The merchant account identifier, with which you want to process the transaction.
     *
     * @param merchantAccount The merchant account identifier, with which you want to process the
     *     transaction.
     * @return the current {@code ModifyRequest} instance, allowing for method chaining
     */
    public ModifyRequest merchantAccount(String merchantAccount) {
      this.merchantAccount = merchantAccount;
      return this;
    }
  
    /**
     * The merchant account identifier, with which you want to process the transaction.
     *
     * @return merchantAccount The merchant account identifier, with which you want to process the
     *     transaction.
     */
    @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getMerchantAccount() {
      return merchantAccount;
    }
  
    /**
     * The merchant account identifier, with which you want to process the transaction.
     *
     * @param merchantAccount The merchant account identifier, with which you want to process the
     *     transaction.
     */
    @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setMerchantAccount(String merchantAccount) {
      this.merchantAccount = merchantAccount;
    }
  
    /**
     * The PSP reference received in the &#x60;/submitThirdParty&#x60; response.
     *
     * @param originalReference The PSP reference received in the &#x60;/submitThirdParty&#x60;
     *     response.
     * @return the current {@code ModifyRequest} instance, allowing for method chaining
     */
    public ModifyRequest originalReference(String originalReference) {
      this.originalReference = originalReference;
      return this;
    }
  
    /**
     * The PSP reference received in the &#x60;/submitThirdParty&#x60; response.
     *
     * @return originalReference The PSP reference received in the &#x60;/submitThirdParty&#x60;
     *     response.
     */
    @JsonProperty(JSON_PROPERTY_ORIGINAL_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getOriginalReference() {
      return originalReference;
    }
  
    /**
     * The PSP reference received in the &#x60;/submitThirdParty&#x60; response.
     *
     * @param originalReference The PSP reference received in the &#x60;/submitThirdParty&#x60;
     *     response.
     */
    @JsonProperty(JSON_PROPERTY_ORIGINAL_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setOriginalReference(String originalReference) {
      this.originalReference = originalReference;
    }
  
    /** Return true if this ModifyRequest object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      ModifyRequest modifyRequest = (ModifyRequest) o;
      return Objects.equals(this.additionalData, modifyRequest.additionalData)
          && Objects.equals(this.merchantAccount, modifyRequest.merchantAccount)
          && Objects.equals(this.originalReference, modifyRequest.originalReference);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(additionalData, merchantAccount, originalReference);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class ModifyRequest {\n");
      sb.append("    additionalData: ").append(toIndentedString(additionalData)).append("\n");
      sb.append("    merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n");
      sb.append("    originalReference: ").append(toIndentedString(originalReference)).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 ModifyRequest given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of ModifyRequest
     * @throws JsonProcessingException if the JSON string is invalid with respect to ModifyRequest
     */
    public static ModifyRequest fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, ModifyRequest.class);
    }
  
    /**
     * Convert an instance of ModifyRequest to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  