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

namespace Google\Cloud\Dataform\V1beta1;

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

/**
 * `UpdateWorkflowConfig` request message.
 *
 * Generated from protobuf message <code>google.cloud.dataform.v1beta1.UpdateWorkflowConfigRequest</code>
 */
class UpdateWorkflowConfigRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Specifies the fields to be updated in the workflow config. If
     * left unset, all fields will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $update_mask = null;
    /**
     * Required. The workflow config to update.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.WorkflowConfig workflow_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $workflow_config = null;

    /**
     * @param \Google\Cloud\Dataform\V1beta1\WorkflowConfig $workflowConfig Required. The workflow config to update.
     * @param \Google\Protobuf\FieldMask                    $updateMask     Optional. Specifies the fields to be updated in the workflow config. If
     *                                                                      left unset, all fields will be updated.
     *
     * @return \Google\Cloud\Dataform\V1beta1\UpdateWorkflowConfigRequest
     *
     * @experimental
     */
    public static function build(\Google\Cloud\Dataform\V1beta1\WorkflowConfig $workflowConfig, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setWorkflowConfig($workflowConfig)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Optional. Specifies the fields to be updated in the workflow config. If
     *           left unset, all fields will be updated.
     *     @type \Google\Cloud\Dataform\V1beta1\WorkflowConfig $workflow_config
     *           Required. The workflow config to update.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataform\V1Beta1\Dataform::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Specifies the fields to be updated in the workflow config. If
     * left unset, all fields will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL];</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);
    }

    /**
     * Optional. Specifies the fields to be updated in the workflow config. If
     * left unset, all fields will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL];</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;
    }

    /**
     * Required. The workflow config to update.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.WorkflowConfig workflow_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dataform\V1beta1\WorkflowConfig|null
     */
    public function getWorkflowConfig()
    {
        return $this->workflow_config;
    }

    public function hasWorkflowConfig()
    {
        return isset($this->workflow_config);
    }

    public function clearWorkflowConfig()
    {
        unset($this->workflow_config);
    }

    /**
     * Required. The workflow config to update.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.WorkflowConfig workflow_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dataform\V1beta1\WorkflowConfig $var
     * @return $this
     */
    public function setWorkflowConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataform\V1beta1\WorkflowConfig::class);
        $this->workflow_config = $var;

        return $this;
    }

}

