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

namespace Google\Cloud\Audit\BigQueryAuditMetadata;

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

/**
 * Job deletion event.
 *
 * Generated from protobuf message <code>google.cloud.audit.BigQueryAuditMetadata.JobDeletion</code>
 */
class JobDeletion extends \Google\Protobuf\Internal\Message
{
    /**
     * Job URI.
     * Format: `projects/<project_id>/jobs/<job_id>`.
     *
     * Generated from protobuf field <code>string job_name = 1;</code>
     */
    protected $job_name = '';
    /**
     * Describes how the job was deleted.
     *
     * Generated from protobuf field <code>.google.cloud.audit.BigQueryAuditMetadata.JobDeletion.Reason reason = 2;</code>
     */
    protected $reason = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $job_name
     *           Job URI.
     *           Format: `projects/<project_id>/jobs/<job_id>`.
     *     @type int $reason
     *           Describes how the job was deleted.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Audit\BigqueryAuditMetadata::initOnce();
        parent::__construct($data);
    }

    /**
     * Job URI.
     * Format: `projects/<project_id>/jobs/<job_id>`.
     *
     * Generated from protobuf field <code>string job_name = 1;</code>
     * @return string
     */
    public function getJobName()
    {
        return $this->job_name;
    }

    /**
     * Job URI.
     * Format: `projects/<project_id>/jobs/<job_id>`.
     *
     * Generated from protobuf field <code>string job_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setJobName($var)
    {
        GPBUtil::checkString($var, True);
        $this->job_name = $var;

        return $this;
    }

    /**
     * Describes how the job was deleted.
     *
     * Generated from protobuf field <code>.google.cloud.audit.BigQueryAuditMetadata.JobDeletion.Reason reason = 2;</code>
     * @return int
     */
    public function getReason()
    {
        return $this->reason;
    }

    /**
     * Describes how the job was deleted.
     *
     * Generated from protobuf field <code>.google.cloud.audit.BigQueryAuditMetadata.JobDeletion.Reason reason = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setReason($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Audit\BigQueryAuditMetadata\JobDeletion\Reason::class);
        $this->reason = $var;

        return $this;
    }

}


