<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/identity/accesscontextmanager/v1/access_context_manager.proto

namespace Google\Identity\AccessContextManager\V1;

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

/**
 * A request to update a `ServicePerimeter`.
 *
 * Generated from protobuf message <code>google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest</code>
 */
class UpdateServicePerimeterRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The updated `ServicePerimeter`. Syntactic correctness of the
     * `ServicePerimeter` is a precondition for creation.
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $service_perimeter = null;
    /**
     * Required. Mask to control which fields get updated. Must be non-empty.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $update_mask = null;

    /**
     * @param \Google\Identity\AccessContextManager\V1\ServicePerimeter $servicePerimeter Required. The updated `ServicePerimeter`. Syntactic correctness of the
     *                                                                                    `ServicePerimeter` is a precondition for creation.
     * @param \Google\Protobuf\FieldMask                                $updateMask       Required. Mask to control which fields get updated. Must be non-empty.
     *
     * @return \Google\Identity\AccessContextManager\V1\UpdateServicePerimeterRequest
     *
     * @experimental
     */
    public static function build(\Google\Identity\AccessContextManager\V1\ServicePerimeter $servicePerimeter, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setServicePerimeter($servicePerimeter)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Identity\AccessContextManager\V1\ServicePerimeter $service_perimeter
     *           Required. The updated `ServicePerimeter`. Syntactic correctness of the
     *           `ServicePerimeter` is a precondition for creation.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. Mask to control which fields get updated. Must be non-empty.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Identity\Accesscontextmanager\V1\AccessContextManager::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The updated `ServicePerimeter`. Syntactic correctness of the
     * `ServicePerimeter` is a precondition for creation.
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Identity\AccessContextManager\V1\ServicePerimeter|null
     */
    public function getServicePerimeter()
    {
        return $this->service_perimeter;
    }

    public function hasServicePerimeter()
    {
        return isset($this->service_perimeter);
    }

    public function clearServicePerimeter()
    {
        unset($this->service_perimeter);
    }

    /**
     * Required. The updated `ServicePerimeter`. Syntactic correctness of the
     * `ServicePerimeter` is a precondition for creation.
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Identity\AccessContextManager\V1\ServicePerimeter $var
     * @return $this
     */
    public function setServicePerimeter($var)
    {
        GPBUtil::checkMessage($var, \Google\Identity\AccessContextManager\V1\ServicePerimeter::class);
        $this->service_perimeter = $var;

        return $this;
    }

    /**
     * Required. Mask to control which fields get updated. Must be non-empty.
     *
     * 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 $this->update_mask;
    }

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

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

    /**
     * Required. Mask to control which fields get updated. Must be non-empty.
     *
     * 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;
    }

}

