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

namespace Google\Cloud\Dataproc\V1beta2;

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

/**
 * Endpoint config for this cluster
 *
 * Generated from protobuf message <code>google.cloud.dataproc.v1beta2.EndpointConfig</code>
 */
class EndpointConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The map of port descriptions to URLs. Will only be populated
     * if enable_http_port_access is true.
     *
     * Generated from protobuf field <code>map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $http_ports;
    /**
     * Optional. If true, enable http access to specific ports on the cluster
     * from external sources. Defaults to false.
     *
     * Generated from protobuf field <code>bool enable_http_port_access = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $enable_http_port_access = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array|\Google\Protobuf\Internal\MapField $http_ports
     *           Output only. The map of port descriptions to URLs. Will only be populated
     *           if enable_http_port_access is true.
     *     @type bool $enable_http_port_access
     *           Optional. If true, enable http access to specific ports on the cluster
     *           from external sources. Defaults to false.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataproc\V1Beta2\Clusters::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The map of port descriptions to URLs. Will only be populated
     * if enable_http_port_access is true.
     *
     * Generated from protobuf field <code>map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getHttpPorts()
    {
        return $this->http_ports;
    }

    /**
     * Output only. The map of port descriptions to URLs. Will only be populated
     * if enable_http_port_access is true.
     *
     * Generated from protobuf field <code>map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setHttpPorts($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->http_ports = $arr;

        return $this;
    }

    /**
     * Optional. If true, enable http access to specific ports on the cluster
     * from external sources. Defaults to false.
     *
     * Generated from protobuf field <code>bool enable_http_port_access = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getEnableHttpPortAccess()
    {
        return $this->enable_http_port_access;
    }

    /**
     * Optional. If true, enable http access to specific ports on the cluster
     * from external sources. Defaults to false.
     *
     * Generated from protobuf field <code>bool enable_http_port_access = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setEnableHttpPortAccess($var)
    {
        GPBUtil::checkBool($var);
        $this->enable_http_port_access = $var;

        return $this;
    }

}

