<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/geminidataanalytics/v1beta/data_chat_service.proto

namespace Google\Cloud\GeminiDataAnalytics\V1beta;

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

/**
 * The result of a chart generation query.
 *
 * Generated from protobuf message <code>google.cloud.geminidataanalytics.v1beta.ChartResult</code>
 */
class ChartResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. A generated Vega chart config.
     * See https://vega.github.io/vega/docs/config/
     *
     * Generated from protobuf field <code>.google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $vega_config = null;
    /**
     * Optional. A rendering of the chart if this was requested in the context.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $image = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Struct $vega_config
     *           Optional. A generated Vega chart config.
     *           See https://vega.github.io/vega/docs/config/
     *     @type \Google\Cloud\GeminiDataAnalytics\V1beta\Blob $image
     *           Optional. A rendering of the chart if this was requested in the context.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\DataChatService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. A generated Vega chart config.
     * See https://vega.github.io/vega/docs/config/
     *
     * Generated from protobuf field <code>.google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Struct|null
     */
    public function getVegaConfig()
    {
        return $this->vega_config;
    }

    public function hasVegaConfig()
    {
        return isset($this->vega_config);
    }

    public function clearVegaConfig()
    {
        unset($this->vega_config);
    }

    /**
     * Optional. A generated Vega chart config.
     * See https://vega.github.io/vega/docs/config/
     *
     * Generated from protobuf field <code>.google.protobuf.Struct vega_config = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Protobuf\Struct $var
     * @return $this
     */
    public function setVegaConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
        $this->vega_config = $var;

        return $this;
    }

    /**
     * Optional. A rendering of the chart if this was requested in the context.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\GeminiDataAnalytics\V1beta\Blob|null
     */
    public function getImage()
    {
        return $this->image;
    }

    public function hasImage()
    {
        return isset($this->image);
    }

    public function clearImage()
    {
        unset($this->image);
    }

    /**
     * Optional. A rendering of the chart if this was requested in the context.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.Blob image = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\GeminiDataAnalytics\V1beta\Blob $var
     * @return $this
     */
    public function setImage($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GeminiDataAnalytics\V1beta\Blob::class);
        $this->image = $var;

        return $this;
    }

}

