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

namespace Google\Cloud\Dataproc\V1;

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

/**
 * Identity related configuration, including service account based
 * secure multi-tenancy user mappings.
 *
 * Generated from protobuf message <code>google.cloud.dataproc.v1.IdentityConfig</code>
 */
class IdentityConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Map of user to service account.
     *
     * Generated from protobuf field <code>map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $user_service_account_mapping;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array|\Google\Protobuf\Internal\MapField $user_service_account_mapping
     *           Required. Map of user to service account.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Map of user to service account.
     *
     * Generated from protobuf field <code>map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getUserServiceAccountMapping()
    {
        return $this->user_service_account_mapping;
    }

    /**
     * Required. Map of user to service account.
     *
     * Generated from protobuf field <code>map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setUserServiceAccountMapping($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->user_service_account_mapping = $arr;

        return $this;
    }

}

