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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Pointwise metric instance. Usually one instance corresponds to one row in an
 * evaluation dataset.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.PointwiseMetricInstance</code>
 */
class PointwiseMetricInstance extends \Google\Protobuf\Internal\Message
{
    protected $instance;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $json_instance
     *           Instance specified as a json string. String key-value pairs are expected
     *           in the json_instance to render
     *           PointwiseMetricSpec.instance_prompt_template.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce();
        parent::__construct($data);
    }

    /**
     * Instance specified as a json string. String key-value pairs are expected
     * in the json_instance to render
     * PointwiseMetricSpec.instance_prompt_template.
     *
     * Generated from protobuf field <code>string json_instance = 1;</code>
     * @return string
     */
    public function getJsonInstance()
    {
        return $this->readOneof(1);
    }

    public function hasJsonInstance()
    {
        return $this->hasOneof(1);
    }

    /**
     * Instance specified as a json string. String key-value pairs are expected
     * in the json_instance to render
     * PointwiseMetricSpec.instance_prompt_template.
     *
     * Generated from protobuf field <code>string json_instance = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setJsonInstance($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getInstance()
    {
        return $this->whichOneof("instance");
    }

}

