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

namespace Google\Cloud\GkeConnect\Gateway\V1;

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

/**
 * A request for connection information for a particular membership.
 *
 * Generated from protobuf message <code>google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest</code>
 */
class GenerateCredentialsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The Fleet membership resource.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $name = '';
    /**
     * Optional. Whether to force the use of Connect Agent-based transport.
     * This will return a configuration that uses Connect Agent as the underlying
     * transport mechanism for cluster types that would otherwise have used a
     * different transport. Requires that Connect Agent be installed on the
     * cluster. Setting this field to false is equivalent to not setting it.
     *
     * Generated from protobuf field <code>bool force_use_agent = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $force_use_agent = false;
    /**
     * Optional. The Connect Gateway version to be used in the resulting
     * configuration.
     * Leave this field blank to let the server choose the version (recommended).
     *
     * Generated from protobuf field <code>string version = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $version = '';
    /**
     * Optional. The namespace to use in the kubeconfig context.
     * If this field is specified, the server will set the `namespace` field in
     * kubeconfig context. If not specified, the `namespace` field is omitted.
     *
     * Generated from protobuf field <code>string kubernetes_namespace = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $kubernetes_namespace = '';
    /**
     * Optional. The operating system where the kubeconfig will be used.
     *
     * Generated from protobuf field <code>.google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest.OperatingSystem operating_system = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $operating_system = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The Fleet membership resource.
     *     @type bool $force_use_agent
     *           Optional. Whether to force the use of Connect Agent-based transport.
     *           This will return a configuration that uses Connect Agent as the underlying
     *           transport mechanism for cluster types that would otherwise have used a
     *           different transport. Requires that Connect Agent be installed on the
     *           cluster. Setting this field to false is equivalent to not setting it.
     *     @type string $version
     *           Optional. The Connect Gateway version to be used in the resulting
     *           configuration.
     *           Leave this field blank to let the server choose the version (recommended).
     *     @type string $kubernetes_namespace
     *           Optional. The namespace to use in the kubeconfig context.
     *           If this field is specified, the server will set the `namespace` field in
     *           kubeconfig context. If not specified, the `namespace` field is omitted.
     *     @type int $operating_system
     *           Optional. The operating system where the kubeconfig will be used.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkeconnect\Gateway\V1\Control::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The Fleet membership resource.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The Fleet membership resource.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. Whether to force the use of Connect Agent-based transport.
     * This will return a configuration that uses Connect Agent as the underlying
     * transport mechanism for cluster types that would otherwise have used a
     * different transport. Requires that Connect Agent be installed on the
     * cluster. Setting this field to false is equivalent to not setting it.
     *
     * Generated from protobuf field <code>bool force_use_agent = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getForceUseAgent()
    {
        return $this->force_use_agent;
    }

    /**
     * Optional. Whether to force the use of Connect Agent-based transport.
     * This will return a configuration that uses Connect Agent as the underlying
     * transport mechanism for cluster types that would otherwise have used a
     * different transport. Requires that Connect Agent be installed on the
     * cluster. Setting this field to false is equivalent to not setting it.
     *
     * Generated from protobuf field <code>bool force_use_agent = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setForceUseAgent($var)
    {
        GPBUtil::checkBool($var);
        $this->force_use_agent = $var;

        return $this;
    }

    /**
     * Optional. The Connect Gateway version to be used in the resulting
     * configuration.
     * Leave this field blank to let the server choose the version (recommended).
     *
     * Generated from protobuf field <code>string version = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }

    /**
     * Optional. The Connect Gateway version to be used in the resulting
     * configuration.
     * Leave this field blank to let the server choose the version (recommended).
     *
     * Generated from protobuf field <code>string version = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->version = $var;

        return $this;
    }

    /**
     * Optional. The namespace to use in the kubeconfig context.
     * If this field is specified, the server will set the `namespace` field in
     * kubeconfig context. If not specified, the `namespace` field is omitted.
     *
     * Generated from protobuf field <code>string kubernetes_namespace = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getKubernetesNamespace()
    {
        return $this->kubernetes_namespace;
    }

    /**
     * Optional. The namespace to use in the kubeconfig context.
     * If this field is specified, the server will set the `namespace` field in
     * kubeconfig context. If not specified, the `namespace` field is omitted.
     *
     * Generated from protobuf field <code>string kubernetes_namespace = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setKubernetesNamespace($var)
    {
        GPBUtil::checkString($var, True);
        $this->kubernetes_namespace = $var;

        return $this;
    }

    /**
     * Optional. The operating system where the kubeconfig will be used.
     *
     * Generated from protobuf field <code>.google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest.OperatingSystem operating_system = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getOperatingSystem()
    {
        return $this->operating_system;
    }

    /**
     * Optional. The operating system where the kubeconfig will be used.
     *
     * Generated from protobuf field <code>.google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest.OperatingSystem operating_system = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setOperatingSystem($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\GkeConnect\Gateway\V1\GenerateCredentialsRequest\OperatingSystem::class);
        $this->operating_system = $var;

        return $this;
    }

}

