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

/**
 * Runtime information about workload execution.
 *
 * Generated from protobuf message <code>google.cloud.dataproc.v1.RuntimeInfo</code>
 */
class RuntimeInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Map of remote access endpoints (such as web interfaces and
     * APIs) to their URIs.
     *
     * Generated from protobuf field <code>map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $endpoints;
    /**
     * Output only. A URI pointing to the location of the stdout and stderr of the
     * workload.
     *
     * Generated from protobuf field <code>string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $output_uri = '';
    /**
     * Output only. A URI pointing to the location of the diagnostics tarball.
     *
     * Generated from protobuf field <code>string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $diagnostic_output_uri = '';
    /**
     * Output only. Approximate workload resource usage calculated after workload
     * finishes (see [Dataproc Serverless pricing]
     * (https://cloud.google.com/dataproc-serverless/pricing)).
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.UsageMetrics approximate_usage = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $approximate_usage = null;
    /**
     * Output only. Snapshot of current workload resource usage.
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.UsageSnapshot current_usage = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $current_usage = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array|\Google\Protobuf\Internal\MapField $endpoints
     *           Output only. Map of remote access endpoints (such as web interfaces and
     *           APIs) to their URIs.
     *     @type string $output_uri
     *           Output only. A URI pointing to the location of the stdout and stderr of the
     *           workload.
     *     @type string $diagnostic_output_uri
     *           Output only. A URI pointing to the location of the diagnostics tarball.
     *     @type \Google\Cloud\Dataproc\V1\UsageMetrics $approximate_usage
     *           Output only. Approximate workload resource usage calculated after workload
     *           finishes (see [Dataproc Serverless pricing]
     *           (https://cloud.google.com/dataproc-serverless/pricing)).
     *     @type \Google\Cloud\Dataproc\V1\UsageSnapshot $current_usage
     *           Output only. Snapshot of current workload resource usage.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Map of remote access endpoints (such as web interfaces and
     * APIs) to their URIs.
     *
     * Generated from protobuf field <code>map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getEndpoints()
    {
        return $this->endpoints;
    }

    /**
     * Output only. Map of remote access endpoints (such as web interfaces and
     * APIs) to their URIs.
     *
     * Generated from protobuf field <code>map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setEndpoints($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->endpoints = $arr;

        return $this;
    }

    /**
     * Output only. A URI pointing to the location of the stdout and stderr of the
     * workload.
     *
     * Generated from protobuf field <code>string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getOutputUri()
    {
        return $this->output_uri;
    }

    /**
     * Output only. A URI pointing to the location of the stdout and stderr of the
     * workload.
     *
     * Generated from protobuf field <code>string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setOutputUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->output_uri = $var;

        return $this;
    }

    /**
     * Output only. A URI pointing to the location of the diagnostics tarball.
     *
     * Generated from protobuf field <code>string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDiagnosticOutputUri()
    {
        return $this->diagnostic_output_uri;
    }

    /**
     * Output only. A URI pointing to the location of the diagnostics tarball.
     *
     * Generated from protobuf field <code>string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDiagnosticOutputUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->diagnostic_output_uri = $var;

        return $this;
    }

    /**
     * Output only. Approximate workload resource usage calculated after workload
     * finishes (see [Dataproc Serverless pricing]
     * (https://cloud.google.com/dataproc-serverless/pricing)).
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.UsageMetrics approximate_usage = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Dataproc\V1\UsageMetrics|null
     */
    public function getApproximateUsage()
    {
        return $this->approximate_usage;
    }

    public function hasApproximateUsage()
    {
        return isset($this->approximate_usage);
    }

    public function clearApproximateUsage()
    {
        unset($this->approximate_usage);
    }

    /**
     * Output only. Approximate workload resource usage calculated after workload
     * finishes (see [Dataproc Serverless pricing]
     * (https://cloud.google.com/dataproc-serverless/pricing)).
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.UsageMetrics approximate_usage = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dataproc\V1\UsageMetrics $var
     * @return $this
     */
    public function setApproximateUsage($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\UsageMetrics::class);
        $this->approximate_usage = $var;

        return $this;
    }

    /**
     * Output only. Snapshot of current workload resource usage.
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.UsageSnapshot current_usage = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Dataproc\V1\UsageSnapshot|null
     */
    public function getCurrentUsage()
    {
        return $this->current_usage;
    }

    public function hasCurrentUsage()
    {
        return isset($this->current_usage);
    }

    public function clearCurrentUsage()
    {
        unset($this->current_usage);
    }

    /**
     * Output only. Snapshot of current workload resource usage.
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.UsageSnapshot current_usage = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dataproc\V1\UsageSnapshot $var
     * @return $this
     */
    public function setCurrentUsage($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\UsageSnapshot::class);
        $this->current_usage = $var;

        return $this;
    }

}

