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

namespace Google\Cloud\Functions\V1;

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

/**
 * Describes SourceRepository, used to represent parameters related to
 * source repository where a function is hosted.
 *
 * Generated from protobuf message <code>google.cloud.functions.v1.SourceRepository</code>
 */
class SourceRepository extends \Google\Protobuf\Internal\Message
{
    /**
     * The URL pointing to the hosted repository where the function is defined.
     * There are supported Cloud Source Repository URLs in the following
     * formats:
     * To refer to a specific commit:
     * `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;revisions/&#42;&#47;paths/&#42;`
     * To refer to a moveable alias (branch):
     * `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;moveable-aliases/&#42;&#47;paths/&#42;`
     * In particular, to refer to HEAD use `master` moveable alias.
     * To refer to a specific fixed alias (tag):
     * `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;fixed-aliases/&#42;&#47;paths/&#42;`
     * You can omit `paths/&#42;` if you want to use the main directory.
     *
     * Generated from protobuf field <code>string url = 1;</code>
     */
    private $url = '';
    /**
     * Output only. The URL pointing to the hosted repository where the function
     * were defined at the time of deployment. It always points to a specific
     * commit in the format described above.
     *
     * Generated from protobuf field <code>string deployed_url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $deployed_url = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $url
     *           The URL pointing to the hosted repository where the function is defined.
     *           There are supported Cloud Source Repository URLs in the following
     *           formats:
     *           To refer to a specific commit:
     *           `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;revisions/&#42;&#47;paths/&#42;`
     *           To refer to a moveable alias (branch):
     *           `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;moveable-aliases/&#42;&#47;paths/&#42;`
     *           In particular, to refer to HEAD use `master` moveable alias.
     *           To refer to a specific fixed alias (tag):
     *           `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;fixed-aliases/&#42;&#47;paths/&#42;`
     *           You can omit `paths/&#42;` if you want to use the main directory.
     *     @type string $deployed_url
     *           Output only. The URL pointing to the hosted repository where the function
     *           were defined at the time of deployment. It always points to a specific
     *           commit in the format described above.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce();
        parent::__construct($data);
    }

    /**
     * The URL pointing to the hosted repository where the function is defined.
     * There are supported Cloud Source Repository URLs in the following
     * formats:
     * To refer to a specific commit:
     * `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;revisions/&#42;&#47;paths/&#42;`
     * To refer to a moveable alias (branch):
     * `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;moveable-aliases/&#42;&#47;paths/&#42;`
     * In particular, to refer to HEAD use `master` moveable alias.
     * To refer to a specific fixed alias (tag):
     * `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;fixed-aliases/&#42;&#47;paths/&#42;`
     * You can omit `paths/&#42;` if you want to use the main directory.
     *
     * Generated from protobuf field <code>string url = 1;</code>
     * @return string
     */
    public function getUrl()
    {
        return $this->url;
    }

    /**
     * The URL pointing to the hosted repository where the function is defined.
     * There are supported Cloud Source Repository URLs in the following
     * formats:
     * To refer to a specific commit:
     * `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;revisions/&#42;&#47;paths/&#42;`
     * To refer to a moveable alias (branch):
     * `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;moveable-aliases/&#42;&#47;paths/&#42;`
     * In particular, to refer to HEAD use `master` moveable alias.
     * To refer to a specific fixed alias (tag):
     * `https://source.developers.google.com/projects/&#42;&#47;repos/&#42;&#47;fixed-aliases/&#42;&#47;paths/&#42;`
     * You can omit `paths/&#42;` if you want to use the main directory.
     *
     * Generated from protobuf field <code>string url = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->url = $var;

        return $this;
    }

    /**
     * Output only. The URL pointing to the hosted repository where the function
     * were defined at the time of deployment. It always points to a specific
     * commit in the format described above.
     *
     * Generated from protobuf field <code>string deployed_url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDeployedUrl()
    {
        return $this->deployed_url;
    }

    /**
     * Output only. The URL pointing to the hosted repository where the function
     * were defined at the time of deployment. It always points to a specific
     * commit in the format described above.
     *
     * Generated from protobuf field <code>string deployed_url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDeployedUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->deployed_url = $var;

        return $this;
    }

}

