<?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;

/**
 * The software configuration for this Dataproc cluster running on Kubernetes.
 *
 * Generated from protobuf message <code>google.cloud.dataproc.v1.KubernetesSoftwareConfig</code>
 */
class KubernetesSoftwareConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * The components that should be installed in this Dataproc cluster. The key
     * must be a string from the KubernetesComponent enumeration. The value is
     * the version of the software to be installed.
     * At least one entry must be specified.
     *
     * Generated from protobuf field <code>map<string, string> component_version = 1;</code>
     */
    private $component_version;
    /**
     * The properties to set on daemon config files.
     * Property keys are specified in `prefix:property` format, for example
     * `spark:spark.kubernetes.container.image`. The following are supported
     * prefixes and their mappings:
     * * spark:  `spark-defaults.conf`
     * For more information, see [Cluster
     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
     *
     * Generated from protobuf field <code>map<string, string> properties = 2;</code>
     */
    private $properties;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array|\Google\Protobuf\Internal\MapField $component_version
     *           The components that should be installed in this Dataproc cluster. The key
     *           must be a string from the KubernetesComponent enumeration. The value is
     *           the version of the software to be installed.
     *           At least one entry must be specified.
     *     @type array|\Google\Protobuf\Internal\MapField $properties
     *           The properties to set on daemon config files.
     *           Property keys are specified in `prefix:property` format, for example
     *           `spark:spark.kubernetes.container.image`. The following are supported
     *           prefixes and their mappings:
     *           * spark:  `spark-defaults.conf`
     *           For more information, see [Cluster
     *           properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce();
        parent::__construct($data);
    }

    /**
     * The components that should be installed in this Dataproc cluster. The key
     * must be a string from the KubernetesComponent enumeration. The value is
     * the version of the software to be installed.
     * At least one entry must be specified.
     *
     * Generated from protobuf field <code>map<string, string> component_version = 1;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getComponentVersion()
    {
        return $this->component_version;
    }

    /**
     * The components that should be installed in this Dataproc cluster. The key
     * must be a string from the KubernetesComponent enumeration. The value is
     * the version of the software to be installed.
     * At least one entry must be specified.
     *
     * Generated from protobuf field <code>map<string, string> component_version = 1;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setComponentVersion($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->component_version = $arr;

        return $this;
    }

    /**
     * The properties to set on daemon config files.
     * Property keys are specified in `prefix:property` format, for example
     * `spark:spark.kubernetes.container.image`. The following are supported
     * prefixes and their mappings:
     * * spark:  `spark-defaults.conf`
     * For more information, see [Cluster
     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
     *
     * Generated from protobuf field <code>map<string, string> properties = 2;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getProperties()
    {
        return $this->properties;
    }

    /**
     * The properties to set on daemon config files.
     * Property keys are specified in `prefix:property` format, for example
     * `spark:spark.kubernetes.container.image`. The following are supported
     * prefixes and their mappings:
     * * spark:  `spark-defaults.conf`
     * For more information, see [Cluster
     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
     *
     * Generated from protobuf field <code>map<string, string> properties = 2;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setProperties($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->properties = $arr;

        return $this;
    }

}

