<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/content.proto

namespace Google\Cloud\AIPlatform\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Logprobs Result
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.LogprobsResult</code>
 */
class LogprobsResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Length = total number of decoding steps.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.LogprobsResult.TopCandidates top_candidates = 1;</code>
     */
    private $top_candidates;
    /**
     * Length = total number of decoding steps.
     * The chosen candidates may or may not be in top_candidates.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.LogprobsResult.Candidate chosen_candidates = 2;</code>
     */
    private $chosen_candidates;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\LogprobsResult\TopCandidates[] $top_candidates
     *           Length = total number of decoding steps.
     *     @type \Google\Cloud\AIPlatform\V1\LogprobsResult\Candidate[] $chosen_candidates
     *           Length = total number of decoding steps.
     *           The chosen candidates may or may not be in top_candidates.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Content::initOnce();
        parent::__construct($data);
    }

    /**
     * Length = total number of decoding steps.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.LogprobsResult.TopCandidates top_candidates = 1;</code>
     * @return RepeatedField<\Google\Cloud\AIPlatform\V1\LogprobsResult\TopCandidates>
     */
    public function getTopCandidates()
    {
        return $this->top_candidates;
    }

    /**
     * Length = total number of decoding steps.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.LogprobsResult.TopCandidates top_candidates = 1;</code>
     * @param \Google\Cloud\AIPlatform\V1\LogprobsResult\TopCandidates[] $var
     * @return $this
     */
    public function setTopCandidates($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\LogprobsResult\TopCandidates::class);
        $this->top_candidates = $arr;

        return $this;
    }

    /**
     * Length = total number of decoding steps.
     * The chosen candidates may or may not be in top_candidates.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.LogprobsResult.Candidate chosen_candidates = 2;</code>
     * @return RepeatedField<\Google\Cloud\AIPlatform\V1\LogprobsResult\Candidate>
     */
    public function getChosenCandidates()
    {
        return $this->chosen_candidates;
    }

    /**
     * Length = total number of decoding steps.
     * The chosen candidates may or may not be in top_candidates.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.LogprobsResult.Candidate chosen_candidates = 2;</code>
     * @param \Google\Cloud\AIPlatform\V1\LogprobsResult\Candidate[] $var
     * @return $this
     */
    public function setChosenCandidates($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\LogprobsResult\Candidate::class);
        $this->chosen_candidates = $arr;

        return $this;
    }

}

