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

namespace Google\Cloud\Dataform\V1beta1\Repository;

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

/**
 * Controls Git remote configuration for a repository.
 *
 * Generated from protobuf message <code>google.cloud.dataform.v1beta1.Repository.GitRemoteSettings</code>
 */
class GitRemoteSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The Git remote's URL.
     *
     * Generated from protobuf field <code>string url = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $url = '';
    /**
     * Required. The Git remote's default branch name.
     *
     * Generated from protobuf field <code>string default_branch = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $default_branch = '';
    /**
     * Required. The name of the Secret Manager secret version to use as an
     * authentication token for Git operations. Must be in the format
     * `projects/&#42;&#47;secrets/&#42;&#47;versions/&#42;`.
     *
     * Generated from protobuf field <code>string authentication_token_secret_version = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $authentication_token_secret_version = '';
    /**
     * Output only. Indicates the status of the Git access token.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus token_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $token_status = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $url
     *           Required. The Git remote's URL.
     *     @type string $default_branch
     *           Required. The Git remote's default branch name.
     *     @type string $authentication_token_secret_version
     *           Required. The name of the Secret Manager secret version to use as an
     *           authentication token for Git operations. Must be in the format
     *           `projects/&#42;&#47;secrets/&#42;&#47;versions/&#42;`.
     *     @type int $token_status
     *           Output only. Indicates the status of the Git access token.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataform\V1Beta1\Dataform::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The Git remote's URL.
     *
     * Generated from protobuf field <code>string url = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getUrl()
    {
        return $this->url;
    }

    /**
     * Required. The Git remote's URL.
     *
     * Generated from protobuf field <code>string url = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->url = $var;

        return $this;
    }

    /**
     * Required. The Git remote's default branch name.
     *
     * Generated from protobuf field <code>string default_branch = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDefaultBranch()
    {
        return $this->default_branch;
    }

    /**
     * Required. The Git remote's default branch name.
     *
     * Generated from protobuf field <code>string default_branch = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDefaultBranch($var)
    {
        GPBUtil::checkString($var, True);
        $this->default_branch = $var;

        return $this;
    }

    /**
     * Required. The name of the Secret Manager secret version to use as an
     * authentication token for Git operations. Must be in the format
     * `projects/&#42;&#47;secrets/&#42;&#47;versions/&#42;`.
     *
     * Generated from protobuf field <code>string authentication_token_secret_version = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getAuthenticationTokenSecretVersion()
    {
        return $this->authentication_token_secret_version;
    }

    /**
     * Required. The name of the Secret Manager secret version to use as an
     * authentication token for Git operations. Must be in the format
     * `projects/&#42;&#47;secrets/&#42;&#47;versions/&#42;`.
     *
     * Generated from protobuf field <code>string authentication_token_secret_version = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setAuthenticationTokenSecretVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->authentication_token_secret_version = $var;

        return $this;
    }

    /**
     * Output only. Indicates the status of the Git access token.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus token_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getTokenStatus()
    {
        return $this->token_status;
    }

    /**
     * Output only. Indicates the status of the Git access token.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus token_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setTokenStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataform\V1beta1\Repository\GitRemoteSettings\TokenStatus::class);
        $this->token_status = $var;

        return $this;
    }

}


