content: /*
   * Adyen Recurring 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.recurring;
  
  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.*;
  
  /** DisableRequest */
  @JsonPropertyOrder({
    DisableRequest.JSON_PROPERTY_CONTRACT,
    DisableRequest.JSON_PROPERTY_MERCHANT_ACCOUNT,
    DisableRequest.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE,
    DisableRequest.JSON_PROPERTY_SHOPPER_REFERENCE
  })
  public class DisableRequest {
    public static final String JSON_PROPERTY_CONTRACT = "contract";
    private String contract;
  
    public static final String JSON_PROPERTY_MERCHANT_ACCOUNT = "merchantAccount";
    private String merchantAccount;
  
    public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
    private String recurringDetailReference;
  
    public static final String JSON_PROPERTY_SHOPPER_REFERENCE = "shopperReference";
    private String shopperReference;
  
    public DisableRequest() {}
  
    /**
     * Specify the contract if you only want to disable a specific use. This field can be set to one
     * of the following values, or to their combination (comma-separated): * ONECLICK * RECURRING *
     * PAYOUT
     *
     * @param contract Specify the contract if you only want to disable a specific use. This field can
     *     be set to one of the following values, or to their combination (comma-separated): *
     *     ONECLICK * RECURRING * PAYOUT
     * @return the current {@code DisableRequest} instance, allowing for method chaining
     */
    public DisableRequest contract(String contract) {
      this.contract = contract;
      return this;
    }
  
    /**
     * Specify the contract if you only want to disable a specific use. This field can be set to one
     * of the following values, or to their combination (comma-separated): * ONECLICK * RECURRING *
     * PAYOUT
     *
     * @return contract Specify the contract if you only want to disable a specific use. This field
     *     can be set to one of the following values, or to their combination (comma-separated): *
     *     ONECLICK * RECURRING * PAYOUT
     */
    @JsonProperty(JSON_PROPERTY_CONTRACT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getContract() {
      return contract;
    }
  
    /**
     * Specify the contract if you only want to disable a specific use. This field can be set to one
     * of the following values, or to their combination (comma-separated): * ONECLICK * RECURRING *
     * PAYOUT
     *
     * @param contract Specify the contract if you only want to disable a specific use. This field can
     *     be set to one of the following values, or to their combination (comma-separated): *
     *     ONECLICK * RECURRING * PAYOUT
     */
    @JsonProperty(JSON_PROPERTY_CONTRACT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setContract(String contract) {
      this.contract = contract;
    }
  
    /**
     * 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 DisableRequest} instance, allowing for method chaining
     */
    public DisableRequest 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 ID that uniquely identifies the recurring detail reference. If it is not provided, the
     * whole recurring contract of the &#x60;shopperReference&#x60; will be disabled, which includes
     * all recurring details.
     *
     * @param recurringDetailReference The ID that uniquely identifies the recurring detail reference.
     *     If it is not provided, the whole recurring contract of the &#x60;shopperReference&#x60;
     *     will be disabled, which includes all recurring details.
     * @return the current {@code DisableRequest} instance, allowing for method chaining
     */
    public DisableRequest recurringDetailReference(String recurringDetailReference) {
      this.recurringDetailReference = recurringDetailReference;
      return this;
    }
  
    /**
     * The ID that uniquely identifies the recurring detail reference. If it is not provided, the
     * whole recurring contract of the &#x60;shopperReference&#x60; will be disabled, which includes
     * all recurring details.
     *
     * @return recurringDetailReference The ID that uniquely identifies the recurring detail
     *     reference. If it is not provided, the whole recurring contract of the
     *     &#x60;shopperReference&#x60; will be disabled, which includes all recurring details.
     */
    @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getRecurringDetailReference() {
      return recurringDetailReference;
    }
  
    /**
     * The ID that uniquely identifies the recurring detail reference. If it is not provided, the
     * whole recurring contract of the &#x60;shopperReference&#x60; will be disabled, which includes
     * all recurring details.
     *
     * @param recurringDetailReference The ID that uniquely identifies the recurring detail reference.
     *     If it is not provided, the whole recurring contract of the &#x60;shopperReference&#x60;
     *     will be disabled, which includes all recurring details.
     */
    @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setRecurringDetailReference(String recurringDetailReference) {
      this.recurringDetailReference = recurringDetailReference;
    }
  
    /**
     * The ID that uniquely identifies the shopper. This &#x60;shopperReference&#x60; must be the same
     * as the &#x60;shopperReference&#x60; used in the initial payment.
     *
     * @param shopperReference The ID that uniquely identifies the shopper. This
     *     &#x60;shopperReference&#x60; must be the same as the &#x60;shopperReference&#x60; used in
     *     the initial payment.
     * @return the current {@code DisableRequest} instance, allowing for method chaining
     */
    public DisableRequest shopperReference(String shopperReference) {
      this.shopperReference = shopperReference;
      return this;
    }
  
    /**
     * The ID that uniquely identifies the shopper. This &#x60;shopperReference&#x60; must be the same
     * as the &#x60;shopperReference&#x60; used in the initial payment.
     *
     * @return shopperReference The ID that uniquely identifies the shopper. This
     *     &#x60;shopperReference&#x60; must be the same as the &#x60;shopperReference&#x60; used in
     *     the initial payment.
     */
    @JsonProperty(JSON_PROPERTY_SHOPPER_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getShopperReference() {
      return shopperReference;
    }
  
    /**
     * The ID that uniquely identifies the shopper. This &#x60;shopperReference&#x60; must be the same
     * as the &#x60;shopperReference&#x60; used in the initial payment.
     *
     * @param shopperReference The ID that uniquely identifies the shopper. This
     *     &#x60;shopperReference&#x60; must be the same as the &#x60;shopperReference&#x60; used in
     *     the initial payment.
     */
    @JsonProperty(JSON_PROPERTY_SHOPPER_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setShopperReference(String shopperReference) {
      this.shopperReference = shopperReference;
    }
  
    /** Return true if this DisableRequest object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      DisableRequest disableRequest = (DisableRequest) o;
      return Objects.equals(this.contract, disableRequest.contract)
          && Objects.equals(this.merchantAccount, disableRequest.merchantAccount)
          && Objects.equals(this.recurringDetailReference, disableRequest.recurringDetailReference)
          && Objects.equals(this.shopperReference, disableRequest.shopperReference);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(contract, merchantAccount, recurringDetailReference, shopperReference);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class DisableRequest {\n");
      sb.append("    contract: ").append(toIndentedString(contract)).append("\n");
      sb.append("    merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n");
      sb.append("    recurringDetailReference: ")
          .append(toIndentedString(recurringDetailReference))
          .append("\n");
      sb.append("    shopperReference: ").append(toIndentedString(shopperReference)).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 DisableRequest given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of DisableRequest
     * @throws JsonProcessingException if the JSON string is invalid with respect to DisableRequest
     */
    public static DisableRequest fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, DisableRequest.class);
    }
  
    /**
     * Convert an instance of DisableRequest to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  