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

namespace Google\Cloud\Workflows\V1beta;

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

/**
 * Request for the
 * [UpdateWorkflow][google.cloud.workflows.v1beta.Workflows.UpdateWorkflow]
 * method.
 *
 * Generated from protobuf message <code>google.cloud.workflows.v1beta.UpdateWorkflowRequest</code>
 */
class UpdateWorkflowRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Workflow to be updated.
     *
     * Generated from protobuf field <code>.google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $workflow = null;
    /**
     * List of fields to be updated. If not present, the entire workflow
     * will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     */
    private $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Workflows\V1beta\Workflow $workflow
     *           Required. Workflow to be updated.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           List of fields to be updated. If not present, the entire workflow
     *           will be updated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Workflow to be updated.
     *
     * Generated from protobuf field <code>.google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Workflows\V1beta\Workflow
     */
    public function getWorkflow()
    {
        return isset($this->workflow) ? $this->workflow : null;
    }

    public function hasWorkflow()
    {
        return isset($this->workflow);
    }

    public function clearWorkflow()
    {
        unset($this->workflow);
    }

    /**
     * Required. Workflow to be updated.
     *
     * Generated from protobuf field <code>.google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Workflows\V1beta\Workflow $var
     * @return $this
     */
    public function setWorkflow($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Workflows\V1beta\Workflow::class);
        $this->workflow = $var;

        return $this;
    }

    /**
     * List of fields to be updated. If not present, the entire workflow
     * will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     * @return \Google\Protobuf\FieldMask
     */
    public function getUpdateMask()
    {
        return isset($this->update_mask) ? $this->update_mask : null;
    }

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

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

    /**
     * List of fields to be updated. If not present, the entire workflow
     * will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</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;
    }

}

