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

package com.azure.resourcemanager.customerinsights.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.customerinsights.models.CanonicalProfileDefinition;
import com.azure.resourcemanager.customerinsights.models.PredictionDistributionDefinition;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The training results of the prediction. */
@Immutable
public final class PredictionTrainingResultsInner {
    /*
     * The hub name.
     */
    @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
    private String tenantId;

    /*
     * Score name.
     */
    @JsonProperty(value = "scoreName", access = JsonProperty.Access.WRITE_ONLY)
    private String scoreName;

    /*
     * Prediction distribution.
     */
    @JsonProperty(value = "predictionDistribution", access = JsonProperty.Access.WRITE_ONLY)
    private PredictionDistributionDefinition predictionDistribution;

    /*
     * Canonical profiles.
     */
    @JsonProperty(value = "canonicalProfiles", access = JsonProperty.Access.WRITE_ONLY)
    private List<CanonicalProfileDefinition> canonicalProfiles;

    /*
     * Instance count of the primary profile.
     */
    @JsonProperty(value = "primaryProfileInstanceCount", access = JsonProperty.Access.WRITE_ONLY)
    private Long primaryProfileInstanceCount;

    /** Creates an instance of PredictionTrainingResultsInner class. */
    public PredictionTrainingResultsInner() {
    }

    /**
     * Get the tenantId property: The hub name.
     *
     * @return the tenantId value.
     */
    public String tenantId() {
        return this.tenantId;
    }

    /**
     * Get the scoreName property: Score name.
     *
     * @return the scoreName value.
     */
    public String scoreName() {
        return this.scoreName;
    }

    /**
     * Get the predictionDistribution property: Prediction distribution.
     *
     * @return the predictionDistribution value.
     */
    public PredictionDistributionDefinition predictionDistribution() {
        return this.predictionDistribution;
    }

    /**
     * Get the canonicalProfiles property: Canonical profiles.
     *
     * @return the canonicalProfiles value.
     */
    public List<CanonicalProfileDefinition> canonicalProfiles() {
        return this.canonicalProfiles;
    }

    /**
     * Get the primaryProfileInstanceCount property: Instance count of the primary profile.
     *
     * @return the primaryProfileInstanceCount value.
     */
    public Long primaryProfileInstanceCount() {
        return this.primaryProfileInstanceCount;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (predictionDistribution() != null) {
            predictionDistribution().validate();
        }
        if (canonicalProfiles() != null) {
            canonicalProfiles().forEach(e -> e.validate());
        }
    }
}
