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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Represents a single synthetic example, composed of multiple fields.
 * Used for providing few-shot examples in the request and for returning
 * generated examples in the response.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.SyntheticExample</code>
 */
class SyntheticExample extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. A list of fields that constitute an example.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.SyntheticField fields = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $fields;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\AIPlatform\V1\SyntheticField>|\Google\Protobuf\Internal\RepeatedField $fields
     *           Required. A list of fields that constitute an example.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\DataFoundryService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. A list of fields that constitute an example.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.SyntheticField fields = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFields()
    {
        return $this->fields;
    }

    /**
     * Required. A list of fields that constitute an example.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.SyntheticField fields = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Cloud\AIPlatform\V1\SyntheticField>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFields($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\SyntheticField::class);
        $this->fields = $arr;

        return $this;
    }

}

