<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/feature_online_store_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
 * [FeatureOnlineStoreService.FetchFeatureValues][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FetchFeatureValues].
 * All the features under the requested feature view will be returned.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.FetchFeatureValuesRequest</code>
 */
class FetchFeatureValuesRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. FeatureView resource format
     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
     *
     * Generated from protobuf field <code>string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $feature_view = '';
    /**
     * Optional. The request key to fetch feature values for.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $data_key = null;
    /**
     * Optional. Response data format. If not set,
     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
     * will be used.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $data_format = 0;

    /**
     * @param string                                         $featureView Required. FeatureView resource format
     *                                                                    `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
     *                                                                    Please see {@see FeatureOnlineStoreServiceClient::featureViewName()} for help formatting this field.
     * @param \Google\Cloud\AIPlatform\V1\FeatureViewDataKey $dataKey     Optional. The request key to fetch feature values for.
     *
     * @return \Google\Cloud\AIPlatform\V1\FetchFeatureValuesRequest
     *
     * @experimental
     */
    public static function build(string $featureView, \Google\Cloud\AIPlatform\V1\FeatureViewDataKey $dataKey): self
    {
        return (new self())
            ->setFeatureView($featureView)
            ->setDataKey($dataKey);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $feature_view
     *           Required. FeatureView resource format
     *           `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
     *     @type \Google\Cloud\AIPlatform\V1\FeatureViewDataKey $data_key
     *           Optional. The request key to fetch feature values for.
     *     @type int $data_format
     *           Optional. Response data format. If not set,
     *           [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
     *           will be used.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\FeatureOnlineStoreService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. FeatureView resource format
     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
     *
     * Generated from protobuf field <code>string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getFeatureView()
    {
        return $this->feature_view;
    }

    /**
     * Required. FeatureView resource format
     * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
     *
     * Generated from protobuf field <code>string feature_view = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setFeatureView($var)
    {
        GPBUtil::checkString($var, True);
        $this->feature_view = $var;

        return $this;
    }

    /**
     * Optional. The request key to fetch feature values for.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\AIPlatform\V1\FeatureViewDataKey|null
     */
    public function getDataKey()
    {
        return $this->data_key;
    }

    public function hasDataKey()
    {
        return isset($this->data_key);
    }

    public function clearDataKey()
    {
        unset($this->data_key);
    }

    /**
     * Optional. The request key to fetch feature values for.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\AIPlatform\V1\FeatureViewDataKey $var
     * @return $this
     */
    public function setDataKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FeatureViewDataKey::class);
        $this->data_key = $var;

        return $this;
    }

    /**
     * Optional. Response data format. If not set,
     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
     * will be used.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getDataFormat()
    {
        return $this->data_format;
    }

    /**
     * Optional. Response data format. If not set,
     * [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
     * will be used.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.FeatureViewDataFormat data_format = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setDataFormat($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\FeatureViewDataFormat::class);
        $this->data_format = $var;

        return $this;
    }

}

