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

namespace Google\Api;

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

/**
 * An annotation designating that this field designates a One Platform
 * resource.
 * Example:
 *     message Topic {
 *       string name = 1 [(google.api.resource) = {
 *         name: "projects/{project}/topics/{topic}"
 *       }];
 *     }
 *
 * Generated from protobuf message <code>google.api.Resource</code>
 */
class Resource extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource's name template.
     * Examples:
     *   - "projects/{project}/topics/{topic}"
     *   - "projects/{project}/knowledgeBases/{knowledge_base}"
     *
     * Generated from protobuf field <code>string pattern = 1;</code>
     */
    private $pattern = '';
    /**
     * The name that should be used in code to describe the resource,
     * in PascalCase.
     * If omitted, this is inferred from the name of the message.
     * This is required if the resource is being defined without the context
     * of a message (see `resource_definition`, below).
     * Example:
     *   option (google.api.resource_definition) = {
     *     pattern: "projects/{project}"
     *     symbol: "Project"
     *   };
     *
     * Generated from protobuf field <code>string symbol = 2;</code>
     */
    private $symbol = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $pattern
     *           Required. The resource's name template.
     *           Examples:
     *             - "projects/{project}/topics/{topic}"
     *             - "projects/{project}/knowledgeBases/{knowledge_base}"
     *     @type string $symbol
     *           The name that should be used in code to describe the resource,
     *           in PascalCase.
     *           If omitted, this is inferred from the name of the message.
     *           This is required if the resource is being defined without the context
     *           of a message (see `resource_definition`, below).
     *           Example:
     *             option (google.api.resource_definition) = {
     *               pattern: "projects/{project}"
     *               symbol: "Project"
     *             };
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Api\Resource::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource's name template.
     * Examples:
     *   - "projects/{project}/topics/{topic}"
     *   - "projects/{project}/knowledgeBases/{knowledge_base}"
     *
     * Generated from protobuf field <code>string pattern = 1;</code>
     * @return string
     */
    public function getPattern()
    {
        return $this->pattern;
    }

    /**
     * Required. The resource's name template.
     * Examples:
     *   - "projects/{project}/topics/{topic}"
     *   - "projects/{project}/knowledgeBases/{knowledge_base}"
     *
     * Generated from protobuf field <code>string pattern = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setPattern($var)
    {
        GPBUtil::checkString($var, True);
        $this->pattern = $var;

        return $this;
    }

    /**
     * The name that should be used in code to describe the resource,
     * in PascalCase.
     * If omitted, this is inferred from the name of the message.
     * This is required if the resource is being defined without the context
     * of a message (see `resource_definition`, below).
     * Example:
     *   option (google.api.resource_definition) = {
     *     pattern: "projects/{project}"
     *     symbol: "Project"
     *   };
     *
     * Generated from protobuf field <code>string symbol = 2;</code>
     * @return string
     */
    public function getSymbol()
    {
        return $this->symbol;
    }

    /**
     * The name that should be used in code to describe the resource,
     * in PascalCase.
     * If omitted, this is inferred from the name of the message.
     * This is required if the resource is being defined without the context
     * of a message (see `resource_definition`, below).
     * Example:
     *   option (google.api.resource_definition) = {
     *     pattern: "projects/{project}"
     *     symbol: "Project"
     *   };
     *
     * Generated from protobuf field <code>string symbol = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setSymbol($var)
    {
        GPBUtil::checkString($var, True);
        $this->symbol = $var;

        return $this;
    }

}

