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

namespace Google\Cloud\ResourceManager\V3;

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

/**
 * The request sent to the
 * [UpdateFolder][google.cloud.resourcemanager.v3.Folder.UpdateFolder]
 * method.
 * Only the `display_name` field can be changed. All other fields will be
 * ignored. Use the
 * [MoveFolder][google.cloud.resourcemanager.v3.Folders.MoveFolder] method to
 * change the `parent` field.
 *
 * Generated from protobuf message <code>google.cloud.resourcemanager.v3.UpdateFolderRequest</code>
 */
class UpdateFolderRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The new definition of the Folder. It must include the `name` field, which
     * cannot be changed.
     *
     * Generated from protobuf field <code>.google.cloud.resourcemanager.v3.Folder folder = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $folder = null;
    /**
     * Required. Fields to be updated.
     * Only the `display_name` can be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\ResourceManager\V3\Folder $folder
     *           Required. The new definition of the Folder. It must include the `name` field, which
     *           cannot be changed.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. Fields to be updated.
     *           Only the `display_name` can be updated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Resourcemanager\V3\Folders::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The new definition of the Folder. It must include the `name` field, which
     * cannot be changed.
     *
     * Generated from protobuf field <code>.google.cloud.resourcemanager.v3.Folder folder = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\ResourceManager\V3\Folder|null
     */
    public function getFolder()
    {
        return isset($this->folder) ? $this->folder : null;
    }

    public function hasFolder()
    {
        return isset($this->folder);
    }

    public function clearFolder()
    {
        unset($this->folder);
    }

    /**
     * Required. The new definition of the Folder. It must include the `name` field, which
     * cannot be changed.
     *
     * Generated from protobuf field <code>.google.cloud.resourcemanager.v3.Folder folder = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\ResourceManager\V3\Folder $var
     * @return $this
     */
    public function setFolder($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ResourceManager\V3\Folder::class);
        $this->folder = $var;

        return $this;
    }

    /**
     * Required. Fields to be updated.
     * Only the `display_name` can be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    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);
    }

    /**
     * Required. Fields to be updated.
     * Only the `display_name` can be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</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;
    }

}

