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

namespace Google\Cloud\Dataproc\V1;

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

/**
 * Authentication configuration for a workload is used to set the default
 * identity for the workload execution.
 * The config specifies the type of identity (service account or user) that
 * will be used by workloads to access resources on the project(s).
 *
 * Generated from protobuf message <code>google.cloud.dataproc.v1.AuthenticationConfig</code>
 */
class AuthenticationConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Authentication type for the user workload running in containers.
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.AuthenticationConfig.AuthenticationType user_workload_authentication_type = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $user_workload_authentication_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $user_workload_authentication_type
     *           Optional. Authentication type for the user workload running in containers.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Authentication type for the user workload running in containers.
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.AuthenticationConfig.AuthenticationType user_workload_authentication_type = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getUserWorkloadAuthenticationType()
    {
        return $this->user_workload_authentication_type;
    }

    /**
     * Optional. Authentication type for the user workload running in containers.
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.AuthenticationConfig.AuthenticationType user_workload_authentication_type = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setUserWorkloadAuthenticationType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\AuthenticationConfig\AuthenticationType::class);
        $this->user_workload_authentication_type = $var;

        return $this;
    }

}

