/**
 * Copyright (c) 2025 SoftCorporation LLC. All rights reserved.
 *
 * The Software License, Version 1.0
 *
 * SoftCorporation LLC. grants you ("Licensee") a non-exclusive, royalty free,
 * license to use, modify and redistribute this software in source and binary
 * code form, provided that the following conditions are met:
 *
 * 1. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by the
 *        SoftCorporation LLC. (http://www.softcorporation.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 2. This software and SoftCorporation name must not be used to
 *    promote products derived from the software without prior
 *    written permission. For written permission, please contact
 *    info@softcorporation.com.
 *
 * This software is provided "AS IS," without a warranty of any kind.
 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
 * IN NO EVENT SHALL THE SOFTCORPORATION BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).
 *
 */
package com.softcorporation.sandi.base.model;

import java.io.Serializable;
import java.util.List;

import com.softcorporation.sandi.base.util.Utils;

public class Client implements Serializable {

    private static final long serialVersionUID = 7431961303204706355L;

    protected String clientId;
    protected String name;
    protected String collection;
    protected String[] synonyms;
    protected String[] fieldsHigh;
    protected String[] fieldsLow;
    protected String[] fieldsContent;
    protected String embServiceUrl;
    protected String llmServiceUrl;
    protected String nlpServiceUrl;
    protected String rerServiceUrl;
    protected String cliServiceUrl;
    protected String clsServiceUrl;
    protected boolean legacy;
    protected boolean nested;
    protected boolean active;
    protected boolean clientSearchProcessing;
    protected boolean clientIndexProcessing;

    public Client() {
    }

    public Client(String clientId, String name, String collection) {
        this.clientId = clientId;
        this.name = name;
        this.collection = collection;
        this.active = true;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCollection() {
        return collection;
    }

    public void setCollection(String collection) {
        this.collection = collection;
    }

    public String[] getSynonyms() {
        return synonyms;
    }

    public void setSynonyms(String synonyms) {
    	List<String> list = Utils.stringToList(synonyms, false);
    	if (list == null) {
            this.synonyms = null;
    	} else {
            this.synonyms = list.toArray(new String[0]);
    	}
    }

    public void setSynonyms(String[] synonyms) {
        this.synonyms = synonyms;
    }

    public String[] getFieldsHigh() {
        return fieldsHigh;
    }

    public void setFieldsHigh(String fields) {
    	List<String> list = Utils.stringToList(fields, false);
    	if (list == null) {
            fieldsHigh = null;
    	} else {
            fieldsHigh = list.toArray(new String[0]);
    	}
    }

    public void setFieldsHigh(String[] fields) {
        fieldsHigh = fields;
    }

    public void setFieldsLow(String fields) {
    	List<String> list = Utils.stringToList(fields, false);
    	if (list == null) {
            fieldsLow = null;
    	} else {
            fieldsLow = list.toArray(new String[0]);
    	}
    }

    public void setFieldsLow(String[] fields) {
        fieldsLow = fields;
    }

    public String[] getFieldsContent() {
        return fieldsContent;
    }

    public void setFieldsContent(String fields) {
    	List<String> list = Utils.stringToList(fields, false);
    	if (list == null) {
            fieldsContent = null;
    	} else {
            fieldsContent = list.toArray(new String[0]);
    	}
    }

    public void setFieldsContent(String[] fields) {
        fieldsContent = fields;
    }

    public String[] getFieldsLow() {
        return fieldsLow;
    }

    public String getEmbServiceUrl() {
        return embServiceUrl;
    }

    public void setEmbServiceUrl(String embServiceUrl) {
        this.embServiceUrl = embServiceUrl;
    }

    public String getLlmServiceUrl() {
        return llmServiceUrl;
    }

    public void setLlmServiceUrl(String llmServiceUrl) {
        this.llmServiceUrl = llmServiceUrl;
    }

    public String getNlpServiceUrl() {
        return nlpServiceUrl;
    }

    public void setNlpServiceUrl(String nlpServiceUrl) {
        this.nlpServiceUrl = nlpServiceUrl;
    }

    public String getRerServiceUrl() {
        return rerServiceUrl;
    }

    public void setRerServiceUrl(String rerServiceUrl) {
        this.rerServiceUrl = rerServiceUrl;
    }

    public String getCliServiceUrl() {
        return cliServiceUrl;
    }

    public void setCliServiceUrl(String cliServiceUrl) {
        this.cliServiceUrl = cliServiceUrl;
    }

    public String getClsServiceUrl() {
        return clsServiceUrl;
    }

    public void setClsServiceUrl(String clsServiceUrl) {
        this.clsServiceUrl = clsServiceUrl;
    }

    public Boolean isLegacy() {
        return legacy;
    }

    public void setLegacy(Boolean legacy) {
        this.legacy = legacy;
    }

    public Boolean isNested() {
        return nested;
    }

    public void setNested(Boolean nested) {
        this.nested = nested;
    }

    public Boolean isActive() {
        return active;
    }

    public void setActive(Boolean active) {
        this.active = active;
    }

    public Boolean isClientSearchProcessing() {
        return clientSearchProcessing;
    }

    public void setClientSearchProcessing(Boolean clientSearchProcessing) {
        this.clientSearchProcessing = clientSearchProcessing;
    }

    public Boolean isClientIndexProcessing() {
        return clientIndexProcessing;
    }

    public void setClientIndexProcessing(Boolean clientIndexProcessing) {
        this.clientIndexProcessing = clientIndexProcessing;
    }

    @Override
    public String toString() {
        return "Client{" +
                "clientId='" + clientId + '\'' +
                ", name='" + name + '\'' +
                ", collection='" + collection + '\'' +
                ", synonyms='" + synonyms + '\'' +
                ", embServiceUrl='" + embServiceUrl + '\'' +
                ", llmServiceUrl='" + llmServiceUrl + '\'' +
                ", nlpServiceUrl='" + nlpServiceUrl + '\'' +
                ", rerServiceUrl='" + rerServiceUrl + '\'' +
                ", cliServiceUrl='" + cliServiceUrl + '\'' +
                ", clsServiceUrl='" + clsServiceUrl + '\'' +
                ", legacy=" + legacy +
                ", nested=" + nested +
                ", active=" + active +
                ", clientSearchProcessing=" + clientSearchProcessing +
                ", clientIndexProcessing=" + clientIndexProcessing +
                '}';
    }
}