content: /*
   * Legal Entity Management API
   *
   * The version of the OpenAPI document: 4
   *
   *
   * 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.legalentitymanagement;
  
  import com.fasterxml.jackson.annotation.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.annotation.JsonValue;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import java.util.*;
  import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.List;
  import java.util.logging.Logger;
  
  /** BusinessLine */
  @JsonPropertyOrder({
    BusinessLine.JSON_PROPERTY_ID,
    BusinessLine.JSON_PROPERTY_INDUSTRY_CODE,
    BusinessLine.JSON_PROPERTY_LEGAL_ENTITY_ID,
    BusinessLine.JSON_PROPERTY_PROBLEMS,
    BusinessLine.JSON_PROPERTY_SALES_CHANNELS,
    BusinessLine.JSON_PROPERTY_SERVICE,
    BusinessLine.JSON_PROPERTY_SOURCE_OF_FUNDS,
    BusinessLine.JSON_PROPERTY_WEB_DATA,
    BusinessLine.JSON_PROPERTY_WEB_DATA_EXEMPTION
  })
  public class BusinessLine {
    public static final String JSON_PROPERTY_ID = "id";
    private String id;
  
    public static final String JSON_PROPERTY_INDUSTRY_CODE = "industryCode";
    private String industryCode;
  
    public static final String JSON_PROPERTY_LEGAL_ENTITY_ID = "legalEntityId";
    private String legalEntityId;
  
    public static final String JSON_PROPERTY_PROBLEMS = "problems";
    private List<CapabilityProblem> problems;
  
    public static final String JSON_PROPERTY_SALES_CHANNELS = "salesChannels";
    private List<String> salesChannels;
  
    /**
     * The service for which you are creating the business line. Possible values: *
     * **paymentProcessing** * **issuing** * **banking**
     */
    public enum ServiceEnum {
      PAYMENTPROCESSING(String.valueOf("paymentProcessing")),
  
      ISSUING(String.valueOf("issuing")),
  
      BANKING(String.valueOf("banking"));
  
      private static final Logger LOG = Logger.getLogger(ServiceEnum.class.getName());
  
      private String value;
  
      ServiceEnum(String value) {
        this.value = value;
      }
  
      @JsonValue
      public String getValue() {
        return value;
      }
  
      @Override
      public String toString() {
        return String.valueOf(value);
      }
  
      @JsonCreator
      public static ServiceEnum fromValue(String value) {
        for (ServiceEnum b : ServiceEnum.values()) {
          if (b.value.equals(value)) {
            return b;
          }
        }
        // handling unexpected value
        LOG.warning(
            "ServiceEnum: unexpected enum value '"
                + value
                + "' - Supported values are "
                + Arrays.toString(ServiceEnum.values()));
        return null;
      }
    }
  
    public static final String JSON_PROPERTY_SERVICE = "service";
    private ServiceEnum service;
  
    public static final String JSON_PROPERTY_SOURCE_OF_FUNDS = "sourceOfFunds";
    private SourceOfFunds sourceOfFunds;
  
    public static final String JSON_PROPERTY_WEB_DATA = "webData";
    private List<WebData> webData;
  
    public static final String JSON_PROPERTY_WEB_DATA_EXEMPTION = "webDataExemption";
    private WebDataExemption webDataExemption;
  
    public BusinessLine() {}
  
    @JsonCreator
    public BusinessLine(@JsonProperty(JSON_PROPERTY_ID) String id) {
      this();
      this.id = id;
    }
  
    /**
     * The unique identifier of the business line.
     *
     * @return id The unique identifier of the business line.
     */
    @JsonProperty(JSON_PROPERTY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getId() {
      return id;
    }
  
    /**
     * A code that represents the industry of the legal entity for
     * [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes)
     * or
     * [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes).
     * For example, **4431A** for computer software stores.
     *
     * @param industryCode A code that represents the industry of the legal entity for
     *     [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes)
     *     or
     *     [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes).
     *     For example, **4431A** for computer software stores.
     * @return the current {@code BusinessLine} instance, allowing for method chaining
     */
    public BusinessLine industryCode(String industryCode) {
      this.industryCode = industryCode;
      return this;
    }
  
    /**
     * A code that represents the industry of the legal entity for
     * [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes)
     * or
     * [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes).
     * For example, **4431A** for computer software stores.
     *
     * @return industryCode A code that represents the industry of the legal entity for
     *     [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes)
     *     or
     *     [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes).
     *     For example, **4431A** for computer software stores.
     */
    @JsonProperty(JSON_PROPERTY_INDUSTRY_CODE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getIndustryCode() {
      return industryCode;
    }
  
    /**
     * A code that represents the industry of the legal entity for
     * [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes)
     * or
     * [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes).
     * For example, **4431A** for computer software stores.
     *
     * @param industryCode A code that represents the industry of the legal entity for
     *     [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes)
     *     or
     *     [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes).
     *     For example, **4431A** for computer software stores.
     */
    @JsonProperty(JSON_PROPERTY_INDUSTRY_CODE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setIndustryCode(String industryCode) {
      this.industryCode = industryCode;
    }
  
    /**
     * Unique identifier of the [legal
     * entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id)
     * that owns the business line.
     *
     * @param legalEntityId Unique identifier of the [legal
     *     entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id)
     *     that owns the business line.
     * @return the current {@code BusinessLine} instance, allowing for method chaining
     */
    public BusinessLine legalEntityId(String legalEntityId) {
      this.legalEntityId = legalEntityId;
      return this;
    }
  
    /**
     * Unique identifier of the [legal
     * entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id)
     * that owns the business line.
     *
     * @return legalEntityId Unique identifier of the [legal
     *     entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id)
     *     that owns the business line.
     */
    @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getLegalEntityId() {
      return legalEntityId;
    }
  
    /**
     * Unique identifier of the [legal
     * entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id)
     * that owns the business line.
     *
     * @param legalEntityId Unique identifier of the [legal
     *     entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id)
     *     that owns the business line.
     */
    @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setLegalEntityId(String legalEntityId) {
      this.legalEntityId = legalEntityId;
    }
  
    /**
     * The verification errors related to capabilities for this supporting entity.
     *
     * @param problems The verification errors related to capabilities for this supporting entity.
     * @return the current {@code BusinessLine} instance, allowing for method chaining
     */
    public BusinessLine problems(List<CapabilityProblem> problems) {
      this.problems = problems;
      return this;
    }
  
    public BusinessLine addProblemsItem(CapabilityProblem problemsItem) {
      if (this.problems == null) {
        this.problems = new ArrayList<>();
      }
      this.problems.add(problemsItem);
      return this;
    }
  
    /**
     * The verification errors related to capabilities for this supporting entity.
     *
     * @return problems The verification errors related to capabilities for this supporting entity.
     */
    @JsonProperty(JSON_PROPERTY_PROBLEMS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<CapabilityProblem> getProblems() {
      return problems;
    }
  
    /**
     * The verification errors related to capabilities for this supporting entity.
     *
     * @param problems The verification errors related to capabilities for this supporting entity.
     */
    @JsonProperty(JSON_PROPERTY_PROBLEMS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setProblems(List<CapabilityProblem> problems) {
      this.problems = problems;
    }
  
    /**
     * A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**,
     * **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the
     * &#x60;service&#x60; **paymentProcessing**.
     *
     * @param salesChannels A list of channels where goods or services are sold. Possible values:
     *     **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in
     *     combination with the &#x60;service&#x60; **paymentProcessing**.
     * @return the current {@code BusinessLine} instance, allowing for method chaining
     */
    public BusinessLine salesChannels(List<String> salesChannels) {
      this.salesChannels = salesChannels;
      return this;
    }
  
    public BusinessLine addSalesChannelsItem(String salesChannelsItem) {
      if (this.salesChannels == null) {
        this.salesChannels = new ArrayList<>();
      }
      this.salesChannels.add(salesChannelsItem);
      return this;
    }
  
    /**
     * A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**,
     * **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the
     * &#x60;service&#x60; **paymentProcessing**.
     *
     * @return salesChannels A list of channels where goods or services are sold. Possible values:
     *     **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in
     *     combination with the &#x60;service&#x60; **paymentProcessing**.
     */
    @JsonProperty(JSON_PROPERTY_SALES_CHANNELS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<String> getSalesChannels() {
      return salesChannels;
    }
  
    /**
     * A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**,
     * **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the
     * &#x60;service&#x60; **paymentProcessing**.
     *
     * @param salesChannels A list of channels where goods or services are sold. Possible values:
     *     **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in
     *     combination with the &#x60;service&#x60; **paymentProcessing**.
     */
    @JsonProperty(JSON_PROPERTY_SALES_CHANNELS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setSalesChannels(List<String> salesChannels) {
      this.salesChannels = salesChannels;
    }
  
    /**
     * The service for which you are creating the business line. Possible values: *
     * **paymentProcessing** * **issuing** * **banking**
     *
     * @param service The service for which you are creating the business line. Possible values: *
     *     **paymentProcessing** * **issuing** * **banking**
     * @return the current {@code BusinessLine} instance, allowing for method chaining
     */
    public BusinessLine service(ServiceEnum service) {
      this.service = service;
      return this;
    }
  
    /**
     * The service for which you are creating the business line. Possible values: *
     * **paymentProcessing** * **issuing** * **banking**
     *
     * @return service The service for which you are creating the business line. Possible values: *
     *     **paymentProcessing** * **issuing** * **banking**
     */
    @JsonProperty(JSON_PROPERTY_SERVICE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public ServiceEnum getService() {
      return service;
    }
  
    /**
     * The service for which you are creating the business line. Possible values: *
     * **paymentProcessing** * **issuing** * **banking**
     *
     * @param service The service for which you are creating the business line. Possible values: *
     *     **paymentProcessing** * **issuing** * **banking**
     */
    @JsonProperty(JSON_PROPERTY_SERVICE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setService(ServiceEnum service) {
      this.service = service;
    }
  
    /**
     * sourceOfFunds
     *
     * @param sourceOfFunds
     * @return the current {@code BusinessLine} instance, allowing for method chaining
     */
    public BusinessLine sourceOfFunds(SourceOfFunds sourceOfFunds) {
      this.sourceOfFunds = sourceOfFunds;
      return this;
    }
  
    /**
     * Get sourceOfFunds
     *
     * @return sourceOfFunds
     */
    @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public SourceOfFunds getSourceOfFunds() {
      return sourceOfFunds;
    }
  
    /**
     * sourceOfFunds
     *
     * @param sourceOfFunds
     */
    @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setSourceOfFunds(SourceOfFunds sourceOfFunds) {
      this.sourceOfFunds = sourceOfFunds;
    }
  
    /**
     * List of website URLs where your user&#39;s goods or services are sold. When this is required
     * for a service but your user does not have an online presence, provide the reason in the
     * &#x60;webDataExemption&#x60; object.
     *
     * @param webData List of website URLs where your user&#39;s goods or services are sold. When this
     *     is required for a service but your user does not have an online presence, provide the
     *     reason in the &#x60;webDataExemption&#x60; object.
     * @return the current {@code BusinessLine} instance, allowing for method chaining
     */
    public BusinessLine webData(List<WebData> webData) {
      this.webData = webData;
      return this;
    }
  
    public BusinessLine addWebDataItem(WebData webDataItem) {
      if (this.webData == null) {
        this.webData = new ArrayList<>();
      }
      this.webData.add(webDataItem);
      return this;
    }
  
    /**
     * List of website URLs where your user&#39;s goods or services are sold. When this is required
     * for a service but your user does not have an online presence, provide the reason in the
     * &#x60;webDataExemption&#x60; object.
     *
     * @return webData List of website URLs where your user&#39;s goods or services are sold. When
     *     this is required for a service but your user does not have an online presence, provide the
     *     reason in the &#x60;webDataExemption&#x60; object.
     */
    @JsonProperty(JSON_PROPERTY_WEB_DATA)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<WebData> getWebData() {
      return webData;
    }
  
    /**
     * List of website URLs where your user&#39;s goods or services are sold. When this is required
     * for a service but your user does not have an online presence, provide the reason in the
     * &#x60;webDataExemption&#x60; object.
     *
     * @param webData List of website URLs where your user&#39;s goods or services are sold. When this
     *     is required for a service but your user does not have an online presence, provide the
     *     reason in the &#x60;webDataExemption&#x60; object.
     */
    @JsonProperty(JSON_PROPERTY_WEB_DATA)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setWebData(List<WebData> webData) {
      this.webData = webData;
    }
  
    /**
     * webDataExemption
     *
     * @param webDataExemption
     * @return the current {@code BusinessLine} instance, allowing for method chaining
     */
    public BusinessLine webDataExemption(WebDataExemption webDataExemption) {
      this.webDataExemption = webDataExemption;
      return this;
    }
  
    /**
     * Get webDataExemption
     *
     * @return webDataExemption
     */
    @JsonProperty(JSON_PROPERTY_WEB_DATA_EXEMPTION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public WebDataExemption getWebDataExemption() {
      return webDataExemption;
    }
  
    /**
     * webDataExemption
     *
     * @param webDataExemption
     */
    @JsonProperty(JSON_PROPERTY_WEB_DATA_EXEMPTION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setWebDataExemption(WebDataExemption webDataExemption) {
      this.webDataExemption = webDataExemption;
    }
  
    /** Return true if this BusinessLine object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      BusinessLine businessLine = (BusinessLine) o;
      return Objects.equals(this.id, businessLine.id)
          && Objects.equals(this.industryCode, businessLine.industryCode)
          && Objects.equals(this.legalEntityId, businessLine.legalEntityId)
          && Objects.equals(this.problems, businessLine.problems)
          && Objects.equals(this.salesChannels, businessLine.salesChannels)
          && Objects.equals(this.service, businessLine.service)
          && Objects.equals(this.sourceOfFunds, businessLine.sourceOfFunds)
          && Objects.equals(this.webData, businessLine.webData)
          && Objects.equals(this.webDataExemption, businessLine.webDataExemption);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(
          id,
          industryCode,
          legalEntityId,
          problems,
          salesChannels,
          service,
          sourceOfFunds,
          webData,
          webDataExemption);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class BusinessLine {\n");
      sb.append("    id: ").append(toIndentedString(id)).append("\n");
      sb.append("    industryCode: ").append(toIndentedString(industryCode)).append("\n");
      sb.append("    legalEntityId: ").append(toIndentedString(legalEntityId)).append("\n");
      sb.append("    problems: ").append(toIndentedString(problems)).append("\n");
      sb.append("    salesChannels: ").append(toIndentedString(salesChannels)).append("\n");
      sb.append("    service: ").append(toIndentedString(service)).append("\n");
      sb.append("    sourceOfFunds: ").append(toIndentedString(sourceOfFunds)).append("\n");
      sb.append("    webData: ").append(toIndentedString(webData)).append("\n");
      sb.append("    webDataExemption: ").append(toIndentedString(webDataExemption)).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 BusinessLine given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of BusinessLine
     * @throws JsonProcessingException if the JSON string is invalid with respect to BusinessLine
     */
    public static BusinessLine fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, BusinessLine.class);
    }
  
    /**
     * Convert an instance of BusinessLine to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  