All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.basistech.rosette.apimodel.TopicsResponse Maven / Gradle / Ivy

The newest version!
// Generated by delombok at Fri Nov 15 11:56:46 CST 2024
/*
* Copyright 2017 Basis Technology Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.basistech.rosette.apimodel;

import com.basistech.rosette.annotations.JacksonMixin;
import java.util.List;

/**
 * Simple api response data model for entity extraction
 */
@JacksonMixin
public class TopicsResponse extends Response {
    /**
     */
    private final List keyphrases;
    /**
     */
    private final List concepts;

    @SuppressWarnings("all")
    TopicsResponse(final List keyphrases, final List concepts) {
        this.keyphrases = keyphrases;
        this.concepts = concepts;
    }


    @SuppressWarnings("all")
    public static class TopicsResponseBuilder {
        @SuppressWarnings("all")
        private List keyphrases;
        @SuppressWarnings("all")
        private List concepts;

        @SuppressWarnings("all")
        TopicsResponseBuilder() {
        }

        /**
         * @return {@code this}.
         */
        @SuppressWarnings("all")
        public TopicsResponse.TopicsResponseBuilder keyphrases(final List keyphrases) {
            this.keyphrases = keyphrases;
            return this;
        }

        /**
         * @return {@code this}.
         */
        @SuppressWarnings("all")
        public TopicsResponse.TopicsResponseBuilder concepts(final List concepts) {
            this.concepts = concepts;
            return this;
        }

        @SuppressWarnings("all")
        public TopicsResponse build() {
            return new TopicsResponse(this.keyphrases, this.concepts);
        }

        @Override
        @SuppressWarnings("all")
        public String toString() {
            return "TopicsResponse.TopicsResponseBuilder(keyphrases=" + this.keyphrases + ", concepts=" + this.concepts + ")";
        }
    }

    @SuppressWarnings("all")
    public static TopicsResponse.TopicsResponseBuilder builder() {
        return new TopicsResponse.TopicsResponseBuilder();
    }

    /**
     * @return the list of extracted keyphrases
     */
    @SuppressWarnings("all")
    public List getKeyphrases() {
        return this.keyphrases;
    }

    /**
     * @return the list of extracted concepts
     */
    @SuppressWarnings("all")
    public List getConcepts() {
        return this.concepts;
    }

    @Override
    @SuppressWarnings("all")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof TopicsResponse)) return false;
        final TopicsResponse other = (TopicsResponse) o;
        if (!other.canEqual((Object) this)) return false;
        if (!super.equals(o)) return false;
        final Object this$keyphrases = this.getKeyphrases();
        final Object other$keyphrases = other.getKeyphrases();
        if (this$keyphrases == null ? other$keyphrases != null : !this$keyphrases.equals(other$keyphrases)) return false;
        final Object this$concepts = this.getConcepts();
        final Object other$concepts = other.getConcepts();
        if (this$concepts == null ? other$concepts != null : !this$concepts.equals(other$concepts)) return false;
        return true;
    }

    @SuppressWarnings("all")
    protected boolean canEqual(final Object other) {
        return other instanceof TopicsResponse;
    }

    @Override
    @SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final Object $keyphrases = this.getKeyphrases();
        result = result * PRIME + ($keyphrases == null ? 43 : $keyphrases.hashCode());
        final Object $concepts = this.getConcepts();
        result = result * PRIME + ($concepts == null ? 43 : $concepts.hashCode());
        return result;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy