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

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.ProjectsEnableXpnResourceRequest</code>
 */
class ProjectsEnableXpnResourceRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Service resource (a.k.a service project) ID.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.XpnResourceId xpn_resource = 133384631;</code>
     */
    private $xpn_resource = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Compute\V1\XpnResourceId $xpn_resource
     *           Service resource (a.k.a service project) ID.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Service resource (a.k.a service project) ID.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.XpnResourceId xpn_resource = 133384631;</code>
     * @return \Google\Cloud\Compute\V1\XpnResourceId|null
     */
    public function getXpnResource()
    {
        return isset($this->xpn_resource) ? $this->xpn_resource : null;
    }

    public function hasXpnResource()
    {
        return isset($this->xpn_resource);
    }

    public function clearXpnResource()
    {
        unset($this->xpn_resource);
    }

    /**
     * Service resource (a.k.a service project) ID.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.XpnResourceId xpn_resource = 133384631;</code>
     * @param \Google\Cloud\Compute\V1\XpnResourceId $var
     * @return $this
     */
    public function setXpnResource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\XpnResourceId::class);
        $this->xpn_resource = $var;

        return $this;
    }

}

