content: /*
   * Configuration webhooks
   *
   * 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.configurationwebhooks;
  
  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.*;
  
  /** NetworkTokenRiskRuleSource */
  @JsonPropertyOrder({
    NetworkTokenRiskRuleSource.JSON_PROPERTY_ID,
    NetworkTokenRiskRuleSource.JSON_PROPERTY_TYPE
  })
  public class NetworkTokenRiskRuleSource {
    public static final String JSON_PROPERTY_ID = "id";
    private String id;
  
    public static final String JSON_PROPERTY_TYPE = "type";
    private String type;
  
    public NetworkTokenRiskRuleSource() {}
  
    /**
     * The unique identifier of the resource to which the transaction rule applies.
     *
     * @param id The unique identifier of the resource to which the transaction rule applies.
     * @return the current {@code NetworkTokenRiskRuleSource} instance, allowing for method chaining
     */
    public NetworkTokenRiskRuleSource id(String id) {
      this.id = id;
      return this;
    }
  
    /**
     * The unique identifier of the resource to which the transaction rule applies.
     *
     * @return id The unique identifier of the resource to which the transaction rule applies.
     */
    @JsonProperty(JSON_PROPERTY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getId() {
      return id;
    }
  
    /**
     * The unique identifier of the resource to which the transaction rule applies.
     *
     * @param id The unique identifier of the resource to which the transaction rule applies.
     */
    @JsonProperty(JSON_PROPERTY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setId(String id) {
      this.id = id;
    }
  
    /**
     * Indicates the type of resource for which the transaction rule is defined. Possible values: *
     * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** *
     * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule
     * imposed by Adyen.
     *
     * @param type Indicates the type of resource for which the transaction rule is defined. Possible
     *     values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** *
     *     **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide
     *     rule imposed by Adyen.
     * @return the current {@code NetworkTokenRiskRuleSource} instance, allowing for method chaining
     */
    public NetworkTokenRiskRuleSource type(String type) {
      this.type = type;
      return this;
    }
  
    /**
     * Indicates the type of resource for which the transaction rule is defined. Possible values: *
     * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** *
     * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule
     * imposed by Adyen.
     *
     * @return type Indicates the type of resource for which the transaction rule is defined. Possible
     *     values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** *
     *     **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide
     *     rule imposed by Adyen.
     */
    @JsonProperty(JSON_PROPERTY_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getType() {
      return type;
    }
  
    /**
     * Indicates the type of resource for which the transaction rule is defined. Possible values: *
     * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** *
     * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule
     * imposed by Adyen.
     *
     * @param type Indicates the type of resource for which the transaction rule is defined. Possible
     *     values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** *
     *     **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide
     *     rule imposed by Adyen.
     */
    @JsonProperty(JSON_PROPERTY_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setType(String type) {
      this.type = type;
    }
  
    /** Return true if this NetworkTokenRiskRuleSource object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      NetworkTokenRiskRuleSource networkTokenRiskRuleSource = (NetworkTokenRiskRuleSource) o;
      return Objects.equals(this.id, networkTokenRiskRuleSource.id)
          && Objects.equals(this.type, networkTokenRiskRuleSource.type);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(id, type);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class NetworkTokenRiskRuleSource {\n");
      sb.append("    id: ").append(toIndentedString(id)).append("\n");
      sb.append("    type: ").append(toIndentedString(type)).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 NetworkTokenRiskRuleSource given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of NetworkTokenRiskRuleSource
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     NetworkTokenRiskRuleSource
     */
    public static NetworkTokenRiskRuleSource fromJson(String jsonString)
        throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, NetworkTokenRiskRuleSource.class);
    }
  
    /**
     * Convert an instance of NetworkTokenRiskRuleSource to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  