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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Request message for
 * [FeatureOnlineStoreAdminService.CreateFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.CreateFeatureView].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.CreateFeatureViewRequest</code>
 */
class CreateFeatureViewRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the FeatureOnlineStore to create
     * FeatureViews. Format:
     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The FeatureView to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $feature_view = null;
    /**
     * Required. The ID to use for the FeatureView, which will become the final
     * component of the FeatureView's resource name.
     * This value may be up to 60 characters, and valid characters are
     * `[a-z0-9_]`. The first character cannot be a number.
     * The value must be unique within a FeatureOnlineStore.
     *
     * Generated from protobuf field <code>string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $feature_view_id = '';
    /**
     * Immutable. If set to true, one on demand sync will be run immediately,
     * regardless whether the
     * [FeatureView.sync_config][google.cloud.aiplatform.v1.FeatureView.sync_config]
     * is configured or not.
     *
     * Generated from protobuf field <code>bool run_sync_immediately = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $run_sync_immediately = false;

    /**
     * @param string                                  $parent        Required. The resource name of the FeatureOnlineStore to create
     *                                                               FeatureViews. Format:
     *                                                               `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
     *                                                               Please see {@see FeatureOnlineStoreAdminServiceClient::featureOnlineStoreName()} for help formatting this field.
     * @param \Google\Cloud\AIPlatform\V1\FeatureView $featureView   Required. The FeatureView to create.
     * @param string                                  $featureViewId Required. The ID to use for the FeatureView, which will become the final
     *                                                               component of the FeatureView's resource name.
     *
     *                                                               This value may be up to 60 characters, and valid characters are
     *                                                               `[a-z0-9_]`. The first character cannot be a number.
     *
     *                                                               The value must be unique within a FeatureOnlineStore.
     *
     * @return \Google\Cloud\AIPlatform\V1\CreateFeatureViewRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\AIPlatform\V1\FeatureView $featureView, string $featureViewId): self
    {
        return (new self())
            ->setParent($parent)
            ->setFeatureView($featureView)
            ->setFeatureViewId($featureViewId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The resource name of the FeatureOnlineStore to create
     *           FeatureViews. Format:
     *           `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
     *     @type \Google\Cloud\AIPlatform\V1\FeatureView $feature_view
     *           Required. The FeatureView to create.
     *     @type string $feature_view_id
     *           Required. The ID to use for the FeatureView, which will become the final
     *           component of the FeatureView's resource name.
     *           This value may be up to 60 characters, and valid characters are
     *           `[a-z0-9_]`. The first character cannot be a number.
     *           The value must be unique within a FeatureOnlineStore.
     *     @type bool $run_sync_immediately
     *           Immutable. If set to true, one on demand sync will be run immediately,
     *           regardless whether the
     *           [FeatureView.sync_config][google.cloud.aiplatform.v1.FeatureView.sync_config]
     *           is configured or not.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\FeatureOnlineStoreAdminService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the FeatureOnlineStore to create
     * FeatureViews. Format:
     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The resource name of the FeatureOnlineStore to create
     * FeatureViews. Format:
     * `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The FeatureView to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\AIPlatform\V1\FeatureView|null
     */
    public function getFeatureView()
    {
        return $this->feature_view;
    }

    public function hasFeatureView()
    {
        return isset($this->feature_view);
    }

    public function clearFeatureView()
    {
        unset($this->feature_view);
    }

    /**
     * Required. The FeatureView to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FeatureView feature_view = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\AIPlatform\V1\FeatureView $var
     * @return $this
     */
    public function setFeatureView($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FeatureView::class);
        $this->feature_view = $var;

        return $this;
    }

    /**
     * Required. The ID to use for the FeatureView, which will become the final
     * component of the FeatureView's resource name.
     * This value may be up to 60 characters, and valid characters are
     * `[a-z0-9_]`. The first character cannot be a number.
     * The value must be unique within a FeatureOnlineStore.
     *
     * Generated from protobuf field <code>string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getFeatureViewId()
    {
        return $this->feature_view_id;
    }

    /**
     * Required. The ID to use for the FeatureView, which will become the final
     * component of the FeatureView's resource name.
     * This value may be up to 60 characters, and valid characters are
     * `[a-z0-9_]`. The first character cannot be a number.
     * The value must be unique within a FeatureOnlineStore.
     *
     * Generated from protobuf field <code>string feature_view_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setFeatureViewId($var)
    {
        GPBUtil::checkString($var, True);
        $this->feature_view_id = $var;

        return $this;
    }

    /**
     * Immutable. If set to true, one on demand sync will be run immediately,
     * regardless whether the
     * [FeatureView.sync_config][google.cloud.aiplatform.v1.FeatureView.sync_config]
     * is configured or not.
     *
     * Generated from protobuf field <code>bool run_sync_immediately = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return bool
     */
    public function getRunSyncImmediately()
    {
        return $this->run_sync_immediately;
    }

    /**
     * Immutable. If set to true, one on demand sync will be run immediately,
     * regardless whether the
     * [FeatureView.sync_config][google.cloud.aiplatform.v1.FeatureView.sync_config]
     * is configured or not.
     *
     * Generated from protobuf field <code>bool run_sync_immediately = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param bool $var
     * @return $this
     */
    public function setRunSyncImmediately($var)
    {
        GPBUtil::checkBool($var);
        $this->run_sync_immediately = $var;

        return $this;
    }

}

