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

namespace Google\Cloud\NetworkServices\V1;

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

/**
 * Request used by the `CreateWasmPluginVersion` method.
 *
 * Generated from protobuf message <code>google.cloud.networkservices.v1.CreateWasmPluginVersionRequest</code>
 */
class CreateWasmPluginVersionRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource of the `WasmPluginVersion` resource. Must be
     * in the format
     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. User-provided ID of the `WasmPluginVersion` resource to be
     * created.
     *
     * Generated from protobuf field <code>string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $wasm_plugin_version_id = '';
    /**
     * Required. `WasmPluginVersion` resource to be created.
     *
     * Generated from protobuf field <code>.google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $wasm_plugin_version = null;

    /**
     * @param string                                             $parent              Required. The parent resource of the `WasmPluginVersion` resource. Must be
     *                                                                                in the format
     *                                                                                `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. Please see
     *                                                                                {@see NetworkServicesClient::wasmPluginName()} for help formatting this field.
     * @param \Google\Cloud\NetworkServices\V1\WasmPluginVersion $wasmPluginVersion   Required. `WasmPluginVersion` resource to be created.
     * @param string                                             $wasmPluginVersionId Required. User-provided ID of the `WasmPluginVersion` resource to be
     *                                                                                created.
     *
     * @return \Google\Cloud\NetworkServices\V1\CreateWasmPluginVersionRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\NetworkServices\V1\WasmPluginVersion $wasmPluginVersion, string $wasmPluginVersionId): self
    {
        return (new self())
            ->setParent($parent)
            ->setWasmPluginVersion($wasmPluginVersion)
            ->setWasmPluginVersionId($wasmPluginVersionId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource of the `WasmPluginVersion` resource. Must be
     *           in the format
     *           `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
     *     @type string $wasm_plugin_version_id
     *           Required. User-provided ID of the `WasmPluginVersion` resource to be
     *           created.
     *     @type \Google\Cloud\NetworkServices\V1\WasmPluginVersion $wasm_plugin_version
     *           Required. `WasmPluginVersion` resource to be created.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkservices\V1\Extensibility::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource of the `WasmPluginVersion` resource. Must be
     * in the format
     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
     *
     * 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 parent resource of the `WasmPluginVersion` resource. Must be
     * in the format
     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
     *
     * 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. User-provided ID of the `WasmPluginVersion` resource to be
     * created.
     *
     * Generated from protobuf field <code>string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getWasmPluginVersionId()
    {
        return $this->wasm_plugin_version_id;
    }

    /**
     * Required. User-provided ID of the `WasmPluginVersion` resource to be
     * created.
     *
     * Generated from protobuf field <code>string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setWasmPluginVersionId($var)
    {
        GPBUtil::checkString($var, True);
        $this->wasm_plugin_version_id = $var;

        return $this;
    }

    /**
     * Required. `WasmPluginVersion` resource to be created.
     *
     * Generated from protobuf field <code>.google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\NetworkServices\V1\WasmPluginVersion|null
     */
    public function getWasmPluginVersion()
    {
        return $this->wasm_plugin_version;
    }

    public function hasWasmPluginVersion()
    {
        return isset($this->wasm_plugin_version);
    }

    public function clearWasmPluginVersion()
    {
        unset($this->wasm_plugin_version);
    }

    /**
     * Required. `WasmPluginVersion` resource to be created.
     *
     * Generated from protobuf field <code>.google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\NetworkServices\V1\WasmPluginVersion $var
     * @return $this
     */
    public function setWasmPluginVersion($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\WasmPluginVersion::class);
        $this->wasm_plugin_version = $var;

        return $this;
    }

}

