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

namespace Google\Cloud\DiscoveryEngine\V1\GenerateGroundedContentRequest\GroundingSource;

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

/**
 * Message to be used for grounding based on inline content.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.InlineSource</code>
 */
class InlineSource extends \Google\Protobuf\Internal\Message
{
    /**
     * List of facts to be used for grounding.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.GroundingFact grounding_facts = 1;</code>
     */
    private $grounding_facts;
    /**
     * Attributes associated with the content.
     * Common attributes include `source` (indicating where the content was
     * sourced from) and `author` (indicating the author of the content).
     *
     * Generated from protobuf field <code>map<string, string> attributes = 2;</code>
     */
    private $attributes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DiscoveryEngine\V1\GroundingFact[] $grounding_facts
     *           List of facts to be used for grounding.
     *     @type array|\Google\Protobuf\Internal\MapField $attributes
     *           Attributes associated with the content.
     *           Common attributes include `source` (indicating where the content was
     *           sourced from) and `author` (indicating the author of the content).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\GroundedGenerationService::initOnce();
        parent::__construct($data);
    }

    /**
     * List of facts to be used for grounding.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.GroundingFact grounding_facts = 1;</code>
     * @return RepeatedField<\Google\Cloud\DiscoveryEngine\V1\GroundingFact>
     */
    public function getGroundingFacts()
    {
        return $this->grounding_facts;
    }

    /**
     * List of facts to be used for grounding.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.GroundingFact grounding_facts = 1;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1\GroundingFact[] $var
     * @return $this
     */
    public function setGroundingFacts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\GroundingFact::class);
        $this->grounding_facts = $arr;

        return $this;
    }

    /**
     * Attributes associated with the content.
     * Common attributes include `source` (indicating where the content was
     * sourced from) and `author` (indicating the author of the content).
     *
     * Generated from protobuf field <code>map<string, string> attributes = 2;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAttributes()
    {
        return $this->attributes;
    }

    /**
     * Attributes associated with the content.
     * Common attributes include `source` (indicating where the content was
     * sourced from) and `author` (indicating the author of the content).
     *
     * Generated from protobuf field <code>map<string, string> attributes = 2;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAttributes($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->attributes = $arr;

        return $this;
    }

}

