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

namespace Google\Cloud\Dialogflow\V2\Tool;

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

/**
 * Configuration for tools using Service Directory.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.Tool.ServiceDirectoryConfig</code>
 */
class ServiceDirectoryConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of [Service
     * Directory](https://cloud.google.com/service-directory) service.
     * Format:
     * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
     * `LocationID` of the service directory must be the same as the location
     * of the tool.
     *
     * Generated from protobuf field <code>string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $service = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $service
     *           Required. The name of [Service
     *           Directory](https://cloud.google.com/service-directory) service.
     *           Format:
     *           `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
     *           `LocationID` of the service directory must be the same as the location
     *           of the tool.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Tool::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of [Service
     * Directory](https://cloud.google.com/service-directory) service.
     * Format:
     * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
     * `LocationID` of the service directory must be the same as the location
     * of the tool.
     *
     * Generated from protobuf field <code>string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getService()
    {
        return $this->service;
    }

    /**
     * Required. The name of [Service
     * Directory](https://cloud.google.com/service-directory) service.
     * Format:
     * `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
     * `LocationID` of the service directory must be the same as the location
     * of the tool.
     *
     * Generated from protobuf field <code>string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setService($var)
    {
        GPBUtil::checkString($var, True);
        $this->service = $var;

        return $this;
    }

}

