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

namespace Google\Cloud\Channel\V1;

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

/**
 * The result of a [RunReportJob][] operation. Contains the name to use in
 * [FetchReportResultsRequest.report_job][google.cloud.channel.v1.FetchReportResultsRequest.report_job]
 * and the status of the operation.
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.ReportJob</code>
 */
class ReportJob extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of a report job.
     * Name uses the format:
     * `accounts/{account_id}/reportJobs/{report_job_id}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $name = '';
    /**
     * The current status of report generation.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.ReportStatus report_status = 2;</code>
     */
    private $report_status = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The resource name of a report job.
     *           Name uses the format:
     *           `accounts/{account_id}/reportJobs/{report_job_id}`
     *     @type \Google\Cloud\Channel\V1\ReportStatus $report_status
     *           The current status of report generation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\ReportsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of a report job.
     * Name uses the format:
     * `accounts/{account_id}/reportJobs/{report_job_id}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The resource name of a report job.
     * Name uses the format:
     * `accounts/{account_id}/reportJobs/{report_job_id}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The current status of report generation.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.ReportStatus report_status = 2;</code>
     * @return \Google\Cloud\Channel\V1\ReportStatus|null
     */
    public function getReportStatus()
    {
        return $this->report_status;
    }

    public function hasReportStatus()
    {
        return isset($this->report_status);
    }

    public function clearReportStatus()
    {
        unset($this->report_status);
    }

    /**
     * The current status of report generation.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.ReportStatus report_status = 2;</code>
     * @param \Google\Cloud\Channel\V1\ReportStatus $var
     * @return $this
     */
    public function setReportStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\ReportStatus::class);
        $this->report_status = $var;

        return $this;
    }

}

