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.*;
  import java.util.ArrayList;
  import java.util.List;
  
  /** NetworkTokenTransactionRulesResult */
  @JsonPropertyOrder({
    NetworkTokenTransactionRulesResult.JSON_PROPERTY_ADVICE,
    NetworkTokenTransactionRulesResult.JSON_PROPERTY_ALL_HARD_BLOCK_RULES_PASSED,
    NetworkTokenTransactionRulesResult.JSON_PROPERTY_SCORE,
    NetworkTokenTransactionRulesResult.JSON_PROPERTY_TRIGGERED_TRANSACTION_RULES
  })
  public class NetworkTokenTransactionRulesResult {
    public static final String JSON_PROPERTY_ADVICE = "advice";
    private String advice;
  
    public static final String JSON_PROPERTY_ALL_HARD_BLOCK_RULES_PASSED = "allHardBlockRulesPassed";
    private Boolean allHardBlockRulesPassed;
  
    public static final String JSON_PROPERTY_SCORE = "score";
    private Integer score;
  
    public static final String JSON_PROPERTY_TRIGGERED_TRANSACTION_RULES =
        "triggeredTransactionRules";
    private List<NetworkTokenTriggeredRiskRule> triggeredTransactionRules;
  
    public NetworkTokenTransactionRulesResult() {}
  
    /**
     * The advice given by the Risk analysis.
     *
     * @param advice The advice given by the Risk analysis.
     * @return the current {@code NetworkTokenTransactionRulesResult} instance, allowing for method
     *     chaining
     */
    public NetworkTokenTransactionRulesResult advice(String advice) {
      this.advice = advice;
      return this;
    }
  
    /**
     * The advice given by the Risk analysis.
     *
     * @return advice The advice given by the Risk analysis.
     */
    @JsonProperty(JSON_PROPERTY_ADVICE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getAdvice() {
      return advice;
    }
  
    /**
     * The advice given by the Risk analysis.
     *
     * @param advice The advice given by the Risk analysis.
     */
    @JsonProperty(JSON_PROPERTY_ADVICE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAdvice(String advice) {
      this.advice = advice;
    }
  
    /**
     * Indicates whether the transaction passed all rules with &#x60;outcomeType&#x60; **hardBlock**.
     *
     * @param allHardBlockRulesPassed Indicates whether the transaction passed all rules with
     *     &#x60;outcomeType&#x60; **hardBlock**.
     * @return the current {@code NetworkTokenTransactionRulesResult} instance, allowing for method
     *     chaining
     */
    public NetworkTokenTransactionRulesResult allHardBlockRulesPassed(
        Boolean allHardBlockRulesPassed) {
      this.allHardBlockRulesPassed = allHardBlockRulesPassed;
      return this;
    }
  
    /**
     * Indicates whether the transaction passed all rules with &#x60;outcomeType&#x60; **hardBlock**.
     *
     * @return allHardBlockRulesPassed Indicates whether the transaction passed all rules with
     *     &#x60;outcomeType&#x60; **hardBlock**.
     */
    @JsonProperty(JSON_PROPERTY_ALL_HARD_BLOCK_RULES_PASSED)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Boolean getAllHardBlockRulesPassed() {
      return allHardBlockRulesPassed;
    }
  
    /**
     * Indicates whether the transaction passed all rules with &#x60;outcomeType&#x60; **hardBlock**.
     *
     * @param allHardBlockRulesPassed Indicates whether the transaction passed all rules with
     *     &#x60;outcomeType&#x60; **hardBlock**.
     */
    @JsonProperty(JSON_PROPERTY_ALL_HARD_BLOCK_RULES_PASSED)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAllHardBlockRulesPassed(Boolean allHardBlockRulesPassed) {
      this.allHardBlockRulesPassed = allHardBlockRulesPassed;
    }
  
    /**
     * The score of the Risk analysis.
     *
     * @param score The score of the Risk analysis.
     * @return the current {@code NetworkTokenTransactionRulesResult} instance, allowing for method
     *     chaining
     */
    public NetworkTokenTransactionRulesResult score(Integer score) {
      this.score = score;
      return this;
    }
  
    /**
     * The score of the Risk analysis.
     *
     * @return score The score of the Risk analysis.
     */
    @JsonProperty(JSON_PROPERTY_SCORE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Integer getScore() {
      return score;
    }
  
    /**
     * The score of the Risk analysis.
     *
     * @param score The score of the Risk analysis.
     */
    @JsonProperty(JSON_PROPERTY_SCORE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setScore(Integer score) {
      this.score = score;
    }
  
    /**
     * Contains a list of all triggered transaction rules and the corresponding data.
     *
     * @param triggeredTransactionRules Contains a list of all triggered transaction rules and the
     *     corresponding data.
     * @return the current {@code NetworkTokenTransactionRulesResult} instance, allowing for method
     *     chaining
     */
    public NetworkTokenTransactionRulesResult triggeredTransactionRules(
        List<NetworkTokenTriggeredRiskRule> triggeredTransactionRules) {
      this.triggeredTransactionRules = triggeredTransactionRules;
      return this;
    }
  
    public NetworkTokenTransactionRulesResult addTriggeredTransactionRulesItem(
        NetworkTokenTriggeredRiskRule triggeredTransactionRulesItem) {
      if (this.triggeredTransactionRules == null) {
        this.triggeredTransactionRules = new ArrayList<>();
      }
      this.triggeredTransactionRules.add(triggeredTransactionRulesItem);
      return this;
    }
  
    /**
     * Contains a list of all triggered transaction rules and the corresponding data.
     *
     * @return triggeredTransactionRules Contains a list of all triggered transaction rules and the
     *     corresponding data.
     */
    @JsonProperty(JSON_PROPERTY_TRIGGERED_TRANSACTION_RULES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<NetworkTokenTriggeredRiskRule> getTriggeredTransactionRules() {
      return triggeredTransactionRules;
    }
  
    /**
     * Contains a list of all triggered transaction rules and the corresponding data.
     *
     * @param triggeredTransactionRules Contains a list of all triggered transaction rules and the
     *     corresponding data.
     */
    @JsonProperty(JSON_PROPERTY_TRIGGERED_TRANSACTION_RULES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setTriggeredTransactionRules(
        List<NetworkTokenTriggeredRiskRule> triggeredTransactionRules) {
      this.triggeredTransactionRules = triggeredTransactionRules;
    }
  
    /** Return true if this NetworkTokenTransactionRulesResult object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      NetworkTokenTransactionRulesResult networkTokenTransactionRulesResult =
          (NetworkTokenTransactionRulesResult) o;
      return Objects.equals(this.advice, networkTokenTransactionRulesResult.advice)
          && Objects.equals(
              this.allHardBlockRulesPassed,
              networkTokenTransactionRulesResult.allHardBlockRulesPassed)
          && Objects.equals(this.score, networkTokenTransactionRulesResult.score)
          && Objects.equals(
              this.triggeredTransactionRules,
              networkTokenTransactionRulesResult.triggeredTransactionRules);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(advice, allHardBlockRulesPassed, score, triggeredTransactionRules);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class NetworkTokenTransactionRulesResult {\n");
      sb.append("    advice: ").append(toIndentedString(advice)).append("\n");
      sb.append("    allHardBlockRulesPassed: ")
          .append(toIndentedString(allHardBlockRulesPassed))
          .append("\n");
      sb.append("    score: ").append(toIndentedString(score)).append("\n");
      sb.append("    triggeredTransactionRules: ")
          .append(toIndentedString(triggeredTransactionRules))
          .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 NetworkTokenTransactionRulesResult given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of NetworkTokenTransactionRulesResult
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     NetworkTokenTransactionRulesResult
     */
    public static NetworkTokenTransactionRulesResult fromJson(String jsonString)
        throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, NetworkTokenTransactionRulesResult.class);
    }
  
    /**
     * Convert an instance of NetworkTokenTransactionRulesResult to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  