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

namespace Google\Cloud\Dataproc\V1;

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

/**
 * A YARN application created by a job. Application information is a subset of
 * <code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto</code>.
 * **Beta Feature**: This report is available for testing purposes only. It may
 * be changed before final release.
 *
 * Generated from protobuf message <code>google.cloud.dataproc.v1.YarnApplication</code>
 */
class YarnApplication extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The application name.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Required. The application state.
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.YarnApplication.State state = 2;</code>
     */
    private $state = 0;
    /**
     * Required. The numerical progress of the application, from 1 to 100.
     *
     * Generated from protobuf field <code>float progress = 3;</code>
     */
    private $progress = 0.0;
    /**
     * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
     * TimelineServer that provides application-specific information. The URL uses
     * the internal hostname, and requires a proxy server for resolution and,
     * possibly, access.
     *
     * Generated from protobuf field <code>string tracking_url = 4;</code>
     */
    private $tracking_url = '';

    public function __construct() {
        \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce();
        parent::__construct();
    }

    /**
     * Required. The application name.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The application name.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The application state.
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.YarnApplication.State state = 2;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Required. The application state.
     *
     * Generated from protobuf field <code>.google.cloud.dataproc.v1.YarnApplication.State state = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\YarnApplication_State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Required. The numerical progress of the application, from 1 to 100.
     *
     * Generated from protobuf field <code>float progress = 3;</code>
     * @return float
     */
    public function getProgress()
    {
        return $this->progress;
    }

    /**
     * Required. The numerical progress of the application, from 1 to 100.
     *
     * Generated from protobuf field <code>float progress = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setProgress($var)
    {
        GPBUtil::checkFloat($var);
        $this->progress = $var;

        return $this;
    }

    /**
     * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
     * TimelineServer that provides application-specific information. The URL uses
     * the internal hostname, and requires a proxy server for resolution and,
     * possibly, access.
     *
     * Generated from protobuf field <code>string tracking_url = 4;</code>
     * @return string
     */
    public function getTrackingUrl()
    {
        return $this->tracking_url;
    }

    /**
     * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
     * TimelineServer that provides application-specific information. The URL uses
     * the internal hostname, and requires a proxy server for resolution and,
     * possibly, access.
     *
     * Generated from protobuf field <code>string tracking_url = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setTrackingUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->tracking_url = $var;

        return $this;
    }

}

