content: /*
   * POS Terminal Management API
   *
   * The version of the OpenAPI document: 1
   *
   *
   * 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.posterminalmanagement;
  
  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 io.swagger.annotations.ApiModelProperty;
  import java.util.HashMap;
  import java.util.Map;
  import java.util.Objects;
  
  /** AssignTerminalsResponse */
  @JsonPropertyOrder({AssignTerminalsResponse.JSON_PROPERTY_RESULTS})
  public class AssignTerminalsResponse {
    public static final String JSON_PROPERTY_RESULTS = "results";
    private Map<String, String> results = new HashMap<>();
  
    public AssignTerminalsResponse() {}
  
    /**
     * Array that returns a list of the terminals, and for each terminal the result of assigning it to
     * an account or store. The results can be: - &#x60;Done&#x60;: The terminal has been assigned. -
     * &#x60;AssignmentScheduled&#x60;: The terminal will be assigned asynschronously. -
     * &#x60;RemoveConfigScheduled&#x60;: The terminal was previously assigned and boarded. Wait for
     * the terminal to synchronize with the Adyen platform. For more information, refer to
     * [Reassigning boarded
     * terminals](https://docs.adyen.com/point-of-sale/managing-terminals/assign-terminals#reassign-boarded-terminals).
     * - &#x60;Error&#x60;: There was an error when assigning the terminal.
     *
     * @param results
     * @return the current {@code AssignTerminalsResponse} instance, allowing for method chaining
     */
    public AssignTerminalsResponse results(Map<String, String> results) {
      this.results = results;
      return this;
    }
  
    public AssignTerminalsResponse putResultsItem(String key, String resultsItem) {
      this.results.put(key, resultsItem);
      return this;
    }
  
    /**
     * Array that returns a list of the terminals, and for each terminal the result of assigning it to
     * an account or store. The results can be: - &#x60;Done&#x60;: The terminal has been assigned. -
     * &#x60;AssignmentScheduled&#x60;: The terminal will be assigned asynschronously. -
     * &#x60;RemoveConfigScheduled&#x60;: The terminal was previously assigned and boarded. Wait for
     * the terminal to synchronize with the Adyen platform. For more information, refer to
     * [Reassigning boarded
     * terminals](https://docs.adyen.com/point-of-sale/managing-terminals/assign-terminals#reassign-boarded-terminals).
     * - &#x60;Error&#x60;: There was an error when assigning the terminal.
     *
     * @return results
     */
    @ApiModelProperty(
        required = true,
        value =
            "Array that returns a list of the terminals, and for each terminal the result of assigning it to an account or store.  The results can be:    - `Done`: The terminal has been assigned.   - `AssignmentScheduled`: The terminal will be assigned asynschronously.   - `RemoveConfigScheduled`: The terminal was previously assigned and boarded. Wait for the terminal to synchronize with the Adyen platform. For more information, refer to [Reassigning boarded terminals](https://docs.adyen.com/point-of-sale/managing-terminals/assign-terminals#reassign-boarded-terminals).   - `Error`: There was an error when assigning the terminal. ")
    @JsonProperty(JSON_PROPERTY_RESULTS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Map<String, String> getResults() {
      return results;
    }
  
    /**
     * Array that returns a list of the terminals, and for each terminal the result of assigning it to
     * an account or store. The results can be: - &#x60;Done&#x60;: The terminal has been assigned. -
     * &#x60;AssignmentScheduled&#x60;: The terminal will be assigned asynschronously. -
     * &#x60;RemoveConfigScheduled&#x60;: The terminal was previously assigned and boarded. Wait for
     * the terminal to synchronize with the Adyen platform. For more information, refer to
     * [Reassigning boarded
     * terminals](https://docs.adyen.com/point-of-sale/managing-terminals/assign-terminals#reassign-boarded-terminals).
     * - &#x60;Error&#x60;: There was an error when assigning the terminal.
     *
     * @param results
     */
    @JsonProperty(JSON_PROPERTY_RESULTS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setResults(Map<String, String> results) {
      this.results = results;
    }
  
    /** Return true if this AssignTerminalsResponse object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      AssignTerminalsResponse assignTerminalsResponse = (AssignTerminalsResponse) o;
      return Objects.equals(this.results, assignTerminalsResponse.results);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(results);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class AssignTerminalsResponse {\n");
      sb.append("    results: ").append(toIndentedString(results)).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 AssignTerminalsResponse given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of AssignTerminalsResponse
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     AssignTerminalsResponse
     */
    public static AssignTerminalsResponse fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, AssignTerminalsResponse.class);
    }
  
    /**
     * Convert an instance of AssignTerminalsResponse to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  