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

namespace Google\Cloud\AppEngine\V1;

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

/**
 * Rules to match an HTTP request and dispatch that request to a service.
 *
 * Generated from protobuf message <code>google.appengine.v1.UrlDispatchRule</code>
 */
class UrlDispatchRule extends \Google\Protobuf\Internal\Message
{
    /**
     * Domain name to match against. The wildcard "`*`" is supported if
     * specified before a period: "`*.`".
     * Defaults to matching all domains: "`*`".
     *
     * Generated from protobuf field <code>string domain = 1;</code>
     */
    private $domain = '';
    /**
     * Pathname within the host. Must start with a "`/`". A
     * single "`*`" can be included at the end of the path.
     * The sum of the lengths of the domain and path may not
     * exceed 100 characters.
     *
     * Generated from protobuf field <code>string path = 2;</code>
     */
    private $path = '';
    /**
     * Resource ID of a service in this application that should
     * serve the matched request. The service must already
     * exist. Example: `default`.
     *
     * Generated from protobuf field <code>string service = 3;</code>
     */
    private $service = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $domain
     *           Domain name to match against. The wildcard "`*`" is supported if
     *           specified before a period: "`*.`".
     *           Defaults to matching all domains: "`*`".
     *     @type string $path
     *           Pathname within the host. Must start with a "`/`". A
     *           single "`*`" can be included at the end of the path.
     *           The sum of the lengths of the domain and path may not
     *           exceed 100 characters.
     *     @type string $service
     *           Resource ID of a service in this application that should
     *           serve the matched request. The service must already
     *           exist. Example: `default`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Appengine\V1\Application::initOnce();
        parent::__construct($data);
    }

    /**
     * Domain name to match against. The wildcard "`*`" is supported if
     * specified before a period: "`*.`".
     * Defaults to matching all domains: "`*`".
     *
     * Generated from protobuf field <code>string domain = 1;</code>
     * @return string
     */
    public function getDomain()
    {
        return $this->domain;
    }

    /**
     * Domain name to match against. The wildcard "`*`" is supported if
     * specified before a period: "`*.`".
     * Defaults to matching all domains: "`*`".
     *
     * Generated from protobuf field <code>string domain = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDomain($var)
    {
        GPBUtil::checkString($var, True);
        $this->domain = $var;

        return $this;
    }

    /**
     * Pathname within the host. Must start with a "`/`". A
     * single "`*`" can be included at the end of the path.
     * The sum of the lengths of the domain and path may not
     * exceed 100 characters.
     *
     * Generated from protobuf field <code>string path = 2;</code>
     * @return string
     */
    public function getPath()
    {
        return $this->path;
    }

    /**
     * Pathname within the host. Must start with a "`/`". A
     * single "`*`" can be included at the end of the path.
     * The sum of the lengths of the domain and path may not
     * exceed 100 characters.
     *
     * Generated from protobuf field <code>string path = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->path = $var;

        return $this;
    }

    /**
     * Resource ID of a service in this application that should
     * serve the matched request. The service must already
     * exist. Example: `default`.
     *
     * Generated from protobuf field <code>string service = 3;</code>
     * @return string
     */
    public function getService()
    {
        return $this->service;
    }

    /**
     * Resource ID of a service in this application that should
     * serve the matched request. The service must already
     * exist. Example: `default`.
     *
     * Generated from protobuf field <code>string service = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setService($var)
    {
        GPBUtil::checkString($var, True);
        $this->service = $var;

        return $this;
    }

}

