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.ArrayList;
  import java.util.List;
  import java.util.Objects;
  
  /** GetStoresUnderAccountResponse */
  @JsonPropertyOrder({GetStoresUnderAccountResponse.JSON_PROPERTY_STORES})
  public class GetStoresUnderAccountResponse {
    public static final String JSON_PROPERTY_STORES = "stores";
    private List<Store> stores = null;
  
    public GetStoresUnderAccountResponse() {}
  
    /**
     * Array that returns a list of all stores for the specified merchant account, or for all merchant
     * accounts under the company account.
     *
     * @param stores
     * @return the current {@code GetStoresUnderAccountResponse} instance, allowing for method
     *     chaining
     */
    public GetStoresUnderAccountResponse stores(List<Store> stores) {
      this.stores = stores;
      return this;
    }
  
    public GetStoresUnderAccountResponse addStoresItem(Store storesItem) {
      if (this.stores == null) {
        this.stores = new ArrayList<>();
      }
      this.stores.add(storesItem);
      return this;
    }
  
    /**
     * Array that returns a list of all stores for the specified merchant account, or for all merchant
     * accounts under the company account.
     *
     * @return stores
     */
    @ApiModelProperty(
        value =
            "Array that returns a list of all stores for the specified merchant account, or for all merchant accounts under the company account.")
    @JsonProperty(JSON_PROPERTY_STORES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<Store> getStores() {
      return stores;
    }
  
    /**
     * Array that returns a list of all stores for the specified merchant account, or for all merchant
     * accounts under the company account.
     *
     * @param stores
     */
    @JsonProperty(JSON_PROPERTY_STORES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setStores(List<Store> stores) {
      this.stores = stores;
    }
  
    /** Return true if this GetStoresUnderAccountResponse object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      GetStoresUnderAccountResponse getStoresUnderAccountResponse = (GetStoresUnderAccountResponse) o;
      return Objects.equals(this.stores, getStoresUnderAccountResponse.stores);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(stores);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class GetStoresUnderAccountResponse {\n");
      sb.append("    stores: ").append(toIndentedString(stores)).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 GetStoresUnderAccountResponse given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of GetStoresUnderAccountResponse
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     GetStoresUnderAccountResponse
     */
    public static GetStoresUnderAccountResponse fromJson(String jsonString)
        throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, GetStoresUnderAccountResponse.class);
    }
  
    /**
     * Convert an instance of GetStoresUnderAccountResponse to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  