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

namespace Google\Cloud\AIPlatform\V1\FeatureView;

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

/**
 * A Feature Registry source for features that need to be synced to Online
 * Store.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource</code>
 */
class FeatureRegistrySource extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. List of features that need to be synced to Online Store.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $feature_groups;
    /**
     * Optional. The project number of the parent project of the Feature Groups.
     *
     * Generated from protobuf field <code>optional int64 project_number = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $project_number = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\AIPlatform\V1\FeatureView\FeatureRegistrySource\FeatureGroup>|\Google\Protobuf\Internal\RepeatedField $feature_groups
     *           Required. List of features that need to be synced to Online Store.
     *     @type int|string $project_number
     *           Optional. The project number of the parent project of the Feature Groups.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\FeatureView::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. List of features that need to be synced to Online Store.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFeatureGroups()
    {
        return $this->feature_groups;
    }

    /**
     * Required. List of features that need to be synced to Online Store.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup feature_groups = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Cloud\AIPlatform\V1\FeatureView\FeatureRegistrySource\FeatureGroup>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFeatureGroups($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\FeatureView\FeatureRegistrySource\FeatureGroup::class);
        $this->feature_groups = $arr;

        return $this;
    }

    /**
     * Optional. The project number of the parent project of the Feature Groups.
     *
     * Generated from protobuf field <code>optional int64 project_number = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int|string
     */
    public function getProjectNumber()
    {
        return isset($this->project_number) ? $this->project_number : 0;
    }

    public function hasProjectNumber()
    {
        return isset($this->project_number);
    }

    public function clearProjectNumber()
    {
        unset($this->project_number);
    }

    /**
     * Optional. The project number of the parent project of the Feature Groups.
     *
     * Generated from protobuf field <code>optional int64 project_number = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int|string $var
     * @return $this
     */
    public function setProjectNumber($var)
    {
        GPBUtil::checkInt64($var);
        $this->project_number = $var;

        return $this;
    }

}


