// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.ai.translation.text.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Back Translation. */
@Immutable
public final class BackTranslation {
    /*
     * A string giving the normalized form of the source term that is a back-translation of the target.
     * This value should be used as input to lookup examples.
     */
    @JsonProperty(value = "normalizedText", required = true)
    private String normalizedText;

    /*
     * A string giving the source term that is a back-translation of the target in a form best
     * suited for end-user display.
     */
    @JsonProperty(value = "displayText", required = true)
    private String displayText;

    /*
     * An integer representing the number of examples that are available for this translation pair.
     * Actual examples must be retrieved with a separate call to lookup examples. The number is mostly
     * intended to facilitate display in a UX. For example, a user interface may add a hyperlink
     * to the back-translation if the number of examples is greater than zero and show the back-translation
     * as plain text if there are no examples. Note that the actual number of examples returned
     * by a call to lookup examples may be less than numExamples, because additional filtering may be
     * applied on the fly to remove "bad" examples.
     */
    @JsonProperty(value = "numExamples", required = true)
    private int numExamples;

    /*
     * An integer representing the frequency of this translation pair in the data. The main purpose of this
     * field is to provide a user interface with a means to sort back-translations so the most frequent terms are
     * first.
     */
    @JsonProperty(value = "frequencyCount", required = true)
    private int frequencyCount;

    /**
     * Creates an instance of BackTranslation class.
     *
     * @param normalizedText the normalizedText value to set.
     * @param displayText the displayText value to set.
     * @param numExamples the numExamples value to set.
     * @param frequencyCount the frequencyCount value to set.
     */
    @JsonCreator
    private BackTranslation(
            @JsonProperty(value = "normalizedText", required = true) String normalizedText,
            @JsonProperty(value = "displayText", required = true) String displayText,
            @JsonProperty(value = "numExamples", required = true) int numExamples,
            @JsonProperty(value = "frequencyCount", required = true) int frequencyCount) {
        this.normalizedText = normalizedText;
        this.displayText = displayText;
        this.numExamples = numExamples;
        this.frequencyCount = frequencyCount;
    }

    /**
     * Get the normalizedText property: A string giving the normalized form of the source term that is a
     * back-translation of the target. This value should be used as input to lookup examples.
     *
     * @return the normalizedText value.
     */
    public String getNormalizedText() {
        return this.normalizedText;
    }

    /**
     * Get the displayText property: A string giving the source term that is a back-translation of the target in a form
     * best suited for end-user display.
     *
     * @return the displayText value.
     */
    public String getDisplayText() {
        return this.displayText;
    }

    /**
     * Get the numExamples property: An integer representing the number of examples that are available for this
     * translation pair. Actual examples must be retrieved with a separate call to lookup examples. The number is mostly
     * intended to facilitate display in a UX. For example, a user interface may add a hyperlink to the back-translation
     * if the number of examples is greater than zero and show the back-translation as plain text if there are no
     * examples. Note that the actual number of examples returned by a call to lookup examples may be less than
     * numExamples, because additional filtering may be applied on the fly to remove "bad" examples.
     *
     * @return the numExamples value.
     */
    public int getNumExamples() {
        return this.numExamples;
    }

    /**
     * Get the frequencyCount property: An integer representing the frequency of this translation pair in the data. The
     * main purpose of this field is to provide a user interface with a means to sort back-translations so the most
     * frequent terms are first.
     *
     * @return the frequencyCount value.
     */
    public int getFrequencyCount() {
        return this.frequencyCount;
    }
}
