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

namespace Google\Cloud\GkeHub\V1beta1;

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

/**
 * The information required from end users to use GKE Connect.
 *
 * Generated from protobuf message <code>google.cloud.gkehub.v1beta1.ConnectAgent</code>
 */
class ConnectAgent extends \Google\Protobuf\Internal\Message
{
    /**
     * Do not set.
     *
     * Generated from protobuf field <code>string name = 1 [deprecated = true];</code>
     * @deprecated
     */
    protected $name = '';
    /**
     * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com
     * requires the use of a proxy. Format must be in the form
     * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol
     * supported by the proxy. This will direct the connect agent's outbound
     * traffic through a HTTP(S) proxy.
     *
     * Generated from protobuf field <code>bytes proxy = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $proxy = '';
    /**
     * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`.
     * The Connect Agent is authorized automatically when run in the default
     * namespace. Otherwise, explicit authorization must be granted with an
     * additional IAM binding.
     *
     * Generated from protobuf field <code>string namespace = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $namespace = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Do not set.
     *     @type string $proxy
     *           Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com
     *           requires the use of a proxy. Format must be in the form
     *           `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol
     *           supported by the proxy. This will direct the connect agent's outbound
     *           traffic through a HTTP(S) proxy.
     *     @type string $namespace
     *           Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`.
     *           The Connect Agent is authorized automatically when run in the default
     *           namespace. Otherwise, explicit authorization must be granted with an
     *           additional IAM binding.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce();
        parent::__construct($data);
    }

    /**
     * Do not set.
     *
     * Generated from protobuf field <code>string name = 1 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getName()
    {
        @trigger_error('name is deprecated.', E_USER_DEPRECATED);
        return $this->name;
    }

    /**
     * Do not set.
     *
     * Generated from protobuf field <code>string name = 1 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setName($var)
    {
        @trigger_error('name is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com
     * requires the use of a proxy. Format must be in the form
     * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol
     * supported by the proxy. This will direct the connect agent's outbound
     * traffic through a HTTP(S) proxy.
     *
     * Generated from protobuf field <code>bytes proxy = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getProxy()
    {
        return $this->proxy;
    }

    /**
     * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com
     * requires the use of a proxy. Format must be in the form
     * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol
     * supported by the proxy. This will direct the connect agent's outbound
     * traffic through a HTTP(S) proxy.
     *
     * Generated from protobuf field <code>bytes proxy = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setProxy($var)
    {
        GPBUtil::checkString($var, False);
        $this->proxy = $var;

        return $this;
    }

    /**
     * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`.
     * The Connect Agent is authorized automatically when run in the default
     * namespace. Otherwise, explicit authorization must be granted with an
     * additional IAM binding.
     *
     * Generated from protobuf field <code>string namespace = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getNamespace()
    {
        return $this->namespace;
    }

    /**
     * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`.
     * The Connect Agent is authorized automatically when run in the default
     * namespace. Otherwise, explicit authorization must be granted with an
     * additional IAM binding.
     *
     * Generated from protobuf field <code>string namespace = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setNamespace($var)
    {
        GPBUtil::checkString($var, True);
        $this->namespace = $var;

        return $this;
    }

}

