<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/apps/meet/v2beta/service.proto

namespace Google\Apps\Meet\V2beta;

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

/**
 * Request to update a space.
 *
 * Generated from protobuf message <code>google.apps.meet.v2beta.UpdateSpaceRequest</code>
 */
class UpdateSpaceRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Space to be updated.
     *
     * Generated from protobuf field <code>.google.apps.meet.v2beta.Space space = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $space = null;
    /**
     * Optional. Field mask used to specify the fields to be updated in the space.
     * If update_mask isn't provided, it defaults to '*' and updates all
     * fields provided in the request, including deleting fields not set in the
     * request.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $update_mask = null;

    /**
     * @param \Google\Apps\Meet\V2beta\Space $space      Required. Space to be updated.
     * @param \Google\Protobuf\FieldMask     $updateMask Optional. Field mask used to specify the fields to be updated in the space.
     *                                                   If update_mask isn't provided, it defaults to '*' and updates all
     *                                                   fields provided in the request, including deleting fields not set in the
     *                                                   request.
     *
     * @return \Google\Apps\Meet\V2beta\UpdateSpaceRequest
     *
     * @experimental
     */
    public static function build(\Google\Apps\Meet\V2beta\Space $space, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setSpace($space)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Apps\Meet\V2beta\Space $space
     *           Required. Space to be updated.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Optional. Field mask used to specify the fields to be updated in the space.
     *           If update_mask isn't provided, it defaults to '*' and updates all
     *           fields provided in the request, including deleting fields not set in the
     *           request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Apps\Meet\V2Beta\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Space to be updated.
     *
     * Generated from protobuf field <code>.google.apps.meet.v2beta.Space space = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Apps\Meet\V2beta\Space|null
     */
    public function getSpace()
    {
        return $this->space;
    }

    public function hasSpace()
    {
        return isset($this->space);
    }

    public function clearSpace()
    {
        unset($this->space);
    }

    /**
     * Required. Space to be updated.
     *
     * Generated from protobuf field <code>.google.apps.meet.v2beta.Space space = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Apps\Meet\V2beta\Space $var
     * @return $this
     */
    public function setSpace($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Meet\V2beta\Space::class);
        $this->space = $var;

        return $this;
    }

    /**
     * Optional. Field mask used to specify the fields to be updated in the space.
     * If update_mask isn't provided, it defaults to '*' and updates all
     * fields provided in the request, including deleting fields not set in the
     * request.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.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. Field mask used to specify the fields to be updated in the space.
     * If update_mask isn't provided, it defaults to '*' and updates all
     * fields provided in the request, including deleting fields not set in the
     * request.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.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;
    }

}

