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

namespace Google\Cloud\Dataflow\V1beta3;

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

/**
 * Request to update a Cloud Dataflow job.
 *
 * Generated from protobuf message <code>google.dataflow.v1beta3.UpdateJobRequest</code>
 */
class UpdateJobRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The ID of the Cloud Platform project that the job belongs to.
     *
     * Generated from protobuf field <code>string project_id = 1;</code>
     */
    protected $project_id = '';
    /**
     * The job ID.
     *
     * Generated from protobuf field <code>string job_id = 2;</code>
     */
    protected $job_id = '';
    /**
     * The updated job.
     * Only the job state is updatable; other fields will be ignored.
     *
     * Generated from protobuf field <code>.google.dataflow.v1beta3.Job job = 3;</code>
     */
    protected $job = null;
    /**
     * The [regional endpoint]
     * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
     * contains this job.
     *
     * Generated from protobuf field <code>string location = 4;</code>
     */
    protected $location = '';
    /**
     * The list of fields to update relative to Job. If empty, only
     * RequestedJobState will be considered for update. If the FieldMask is not
     * empty and RequestedJobState is none/empty, The fields specified in the
     * update mask will be the only ones considered for update. If both
     * RequestedJobState and update_mask are specified, an error will be returned
     * as we cannot update both state and mask.
     *
     * Generated from protobuf field <code>optional .google.protobuf.FieldMask update_mask = 5;</code>
     */
    protected $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $project_id
     *           The ID of the Cloud Platform project that the job belongs to.
     *     @type string $job_id
     *           The job ID.
     *     @type \Google\Cloud\Dataflow\V1beta3\Job $job
     *           The updated job.
     *           Only the job state is updatable; other fields will be ignored.
     *     @type string $location
     *           The [regional endpoint]
     *           (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
     *           contains this job.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           The list of fields to update relative to Job. If empty, only
     *           RequestedJobState will be considered for update. If the FieldMask is not
     *           empty and RequestedJobState is none/empty, The fields specified in the
     *           update mask will be the only ones considered for update. If both
     *           RequestedJobState and update_mask are specified, an error will be returned
     *           as we cannot update both state and mask.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Dataflow\V1Beta3\Jobs::initOnce();
        parent::__construct($data);
    }

    /**
     * The ID of the Cloud Platform project that the job belongs to.
     *
     * Generated from protobuf field <code>string project_id = 1;</code>
     * @return string
     */
    public function getProjectId()
    {
        return $this->project_id;
    }

    /**
     * The ID of the Cloud Platform project that the job belongs to.
     *
     * Generated from protobuf field <code>string project_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setProjectId($var)
    {
        GPBUtil::checkString($var, True);
        $this->project_id = $var;

        return $this;
    }

    /**
     * The job ID.
     *
     * Generated from protobuf field <code>string job_id = 2;</code>
     * @return string
     */
    public function getJobId()
    {
        return $this->job_id;
    }

    /**
     * The job ID.
     *
     * Generated from protobuf field <code>string job_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setJobId($var)
    {
        GPBUtil::checkString($var, True);
        $this->job_id = $var;

        return $this;
    }

    /**
     * The updated job.
     * Only the job state is updatable; other fields will be ignored.
     *
     * Generated from protobuf field <code>.google.dataflow.v1beta3.Job job = 3;</code>
     * @return \Google\Cloud\Dataflow\V1beta3\Job|null
     */
    public function getJob()
    {
        return $this->job;
    }

    public function hasJob()
    {
        return isset($this->job);
    }

    public function clearJob()
    {
        unset($this->job);
    }

    /**
     * The updated job.
     * Only the job state is updatable; other fields will be ignored.
     *
     * Generated from protobuf field <code>.google.dataflow.v1beta3.Job job = 3;</code>
     * @param \Google\Cloud\Dataflow\V1beta3\Job $var
     * @return $this
     */
    public function setJob($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataflow\V1beta3\Job::class);
        $this->job = $var;

        return $this;
    }

    /**
     * The [regional endpoint]
     * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
     * contains this job.
     *
     * Generated from protobuf field <code>string location = 4;</code>
     * @return string
     */
    public function getLocation()
    {
        return $this->location;
    }

    /**
     * The [regional endpoint]
     * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
     * contains this job.
     *
     * Generated from protobuf field <code>string location = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setLocation($var)
    {
        GPBUtil::checkString($var, True);
        $this->location = $var;

        return $this;
    }

    /**
     * The list of fields to update relative to Job. If empty, only
     * RequestedJobState will be considered for update. If the FieldMask is not
     * empty and RequestedJobState is none/empty, The fields specified in the
     * update mask will be the only ones considered for update. If both
     * RequestedJobState and update_mask are specified, an error will be returned
     * as we cannot update both state and mask.
     *
     * Generated from protobuf field <code>optional .google.protobuf.FieldMask update_mask = 5;</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    public function hasUpdateMask()
    {
        return isset($this->update_mask);
    }

    public function clearUpdateMask()
    {
        unset($this->update_mask);
    }

    /**
     * The list of fields to update relative to Job. If empty, only
     * RequestedJobState will be considered for update. If the FieldMask is not
     * empty and RequestedJobState is none/empty, The fields specified in the
     * update mask will be the only ones considered for update. If both
     * RequestedJobState and update_mask are specified, an error will be returned
     * as we cannot update both state and mask.
     *
     * Generated from protobuf field <code>optional .google.protobuf.FieldMask update_mask = 5;</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

}

