<?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;

/**
 * Describes the auto-registration of the Forwarding Rule to Service Directory. The region and project of the Service Directory resource generated from this registration will be the same as this Forwarding Rule.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.ForwardingRuleServiceDirectoryRegistration</code>
 */
class ForwardingRuleServiceDirectoryRegistration extends \Google\Protobuf\Internal\Message
{
    /**
     * Service Directory namespace to register the forwarding rule under.
     *
     * Generated from protobuf field <code>optional string namespace = 178476379;</code>
     */
    private $namespace = null;
    /**
     * Service Directory service to register the forwarding rule under.
     *
     * Generated from protobuf field <code>optional string service = 373540533;</code>
     */
    private $service = null;
    /**
     * [Optional] Service Directory region to register this global forwarding rule under. Default to "us-central1". Only used for PSC for Google APIs. All PSC for Google APIs Forwarding Rules on the same network should use the same Service Directory region.
     *
     * Generated from protobuf field <code>optional string service_directory_region = 74030416;</code>
     */
    private $service_directory_region = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *           Service Directory namespace to register the forwarding rule under.
     *     @type string $service
     *           Service Directory service to register the forwarding rule under.
     *     @type string $service_directory_region
     *           [Optional] Service Directory region to register this global forwarding rule under. Default to "us-central1". Only used for PSC for Google APIs. All PSC for Google APIs Forwarding Rules on the same network should use the same Service Directory region.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Service Directory namespace to register the forwarding rule under.
     *
     * Generated from protobuf field <code>optional string namespace = 178476379;</code>
     * @return string
     */
    public function getNamespace()
    {
        return isset($this->namespace) ? $this->namespace : '';
    }

    public function hasNamespace()
    {
        return isset($this->namespace);
    }

    public function clearNamespace()
    {
        unset($this->namespace);
    }

    /**
     * Service Directory namespace to register the forwarding rule under.
     *
     * Generated from protobuf field <code>optional string namespace = 178476379;</code>
     * @param string $var
     * @return $this
     */
    public function setNamespace($var)
    {
        GPBUtil::checkString($var, True);
        $this->namespace = $var;

        return $this;
    }

    /**
     * Service Directory service to register the forwarding rule under.
     *
     * Generated from protobuf field <code>optional string service = 373540533;</code>
     * @return string
     */
    public function getService()
    {
        return isset($this->service) ? $this->service : '';
    }

    public function hasService()
    {
        return isset($this->service);
    }

    public function clearService()
    {
        unset($this->service);
    }

    /**
     * Service Directory service to register the forwarding rule under.
     *
     * Generated from protobuf field <code>optional string service = 373540533;</code>
     * @param string $var
     * @return $this
     */
    public function setService($var)
    {
        GPBUtil::checkString($var, True);
        $this->service = $var;

        return $this;
    }

    /**
     * [Optional] Service Directory region to register this global forwarding rule under. Default to "us-central1". Only used for PSC for Google APIs. All PSC for Google APIs Forwarding Rules on the same network should use the same Service Directory region.
     *
     * Generated from protobuf field <code>optional string service_directory_region = 74030416;</code>
     * @return string
     */
    public function getServiceDirectoryRegion()
    {
        return isset($this->service_directory_region) ? $this->service_directory_region : '';
    }

    public function hasServiceDirectoryRegion()
    {
        return isset($this->service_directory_region);
    }

    public function clearServiceDirectoryRegion()
    {
        unset($this->service_directory_region);
    }

    /**
     * [Optional] Service Directory region to register this global forwarding rule under. Default to "us-central1". Only used for PSC for Google APIs. All PSC for Google APIs Forwarding Rules on the same network should use the same Service Directory region.
     *
     * Generated from protobuf field <code>optional string service_directory_region = 74030416;</code>
     * @param string $var
     * @return $this
     */
    public function setServiceDirectoryRegion($var)
    {
        GPBUtil::checkString($var, True);
        $this->service_directory_region = $var;

        return $this;
    }

}

