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

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

The newest version!
// Generated by delombok at Fri Nov 15 11:56:46 CST 2024
/*
 * Copyright 2024 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;

@JacksonMixin
public class NameTranslation {
    String translation;
    Double confidence;

    public NameTranslation(String translation, Double confidence) {
        this.translation = translation;
        this.confidence = confidence;
    }


    @SuppressWarnings("all")
    public static class NameTranslationBuilder {
        @SuppressWarnings("all")
        private String translation;
        @SuppressWarnings("all")
        private Double confidence;

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

        /**
         * @return {@code this}.
         */
        @SuppressWarnings("all")
        public NameTranslation.NameTranslationBuilder translation(final String translation) {
            this.translation = translation;
            return this;
        }

        /**
         * @return {@code this}.
         */
        @SuppressWarnings("all")
        public NameTranslation.NameTranslationBuilder confidence(final Double confidence) {
            this.confidence = confidence;
            return this;
        }

        @SuppressWarnings("all")
        public NameTranslation build() {
            return new NameTranslation(this.translation, this.confidence);
        }

        @Override
        @SuppressWarnings("all")
        public String toString() {
            return "NameTranslation.NameTranslationBuilder(translation=" + this.translation + ", confidence=" + this.confidence + ")";
        }
    }

    @SuppressWarnings("all")
    public static NameTranslation.NameTranslationBuilder builder() {
        return new NameTranslation.NameTranslationBuilder();
    }

    @SuppressWarnings("all")
    public String getTranslation() {
        return this.translation;
    }

    @SuppressWarnings("all")
    public Double getConfidence() {
        return this.confidence;
    }

    @Override
    @SuppressWarnings("all")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof NameTranslation)) return false;
        final NameTranslation other = (NameTranslation) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$confidence = this.getConfidence();
        final Object other$confidence = other.getConfidence();
        if (this$confidence == null ? other$confidence != null : !this$confidence.equals(other$confidence)) return false;
        final Object this$translation = this.getTranslation();
        final Object other$translation = other.getTranslation();
        if (this$translation == null ? other$translation != null : !this$translation.equals(other$translation)) return false;
        return true;
    }

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

    @Override
    @SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $confidence = this.getConfidence();
        result = result * PRIME + ($confidence == null ? 43 : $confidence.hashCode());
        final Object $translation = this.getTranslation();
        result = result * PRIME + ($translation == null ? 43 : $translation.hashCode());
        return result;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy