<?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 commit dry-run specs in all [Service Perimeters]
 * [google.identity.accesscontextmanager.v1.ServicePerimeter] belonging to
 * an [Access Policy][google.identity.accesscontextmanager.v1.AccessPolicy].
 *
 * Generated from protobuf message <code>google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest</code>
 */
class CommitServicePerimetersRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Resource name for the parent [Access Policy]
     * [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all
     * [Service Perimeters]
     * [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for
     * the commit operation.
     * Format: `accessPolicies/{policy_id}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Optional. The etag for the version of the [Access Policy]
     * [google.identity.accesscontextmanager.v1.AccessPolicy] that this
     * commit operation is to be performed on. If, at the time of commit, the
     * etag for the Access Policy stored in Access Context Manager is different
     * from the specified etag, then the commit operation will not be performed
     * and the call will fail. This field is not required. If etag is not
     * provided, the operation will be performed as if a valid etag is provided.
     *
     * Generated from protobuf field <code>string etag = 2;</code>
     */
    private $etag = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. Resource name for the parent [Access Policy]
     *           [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all
     *           [Service Perimeters]
     *           [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for
     *           the commit operation.
     *           Format: `accessPolicies/{policy_id}`
     *     @type string $etag
     *           Optional. The etag for the version of the [Access Policy]
     *           [google.identity.accesscontextmanager.v1.AccessPolicy] that this
     *           commit operation is to be performed on. If, at the time of commit, the
     *           etag for the Access Policy stored in Access Context Manager is different
     *           from the specified etag, then the commit operation will not be performed
     *           and the call will fail. This field is not required. If etag is not
     *           provided, the operation will be performed as if a valid etag is provided.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Identity\Accesscontextmanager\V1\AccessContextManager::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Resource name for the parent [Access Policy]
     * [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all
     * [Service Perimeters]
     * [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for
     * the commit operation.
     * Format: `accessPolicies/{policy_id}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. Resource name for the parent [Access Policy]
     * [google.identity.accesscontextmanager.v1.AccessPolicy] which owns all
     * [Service Perimeters]
     * [google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for
     * the commit operation.
     * Format: `accessPolicies/{policy_id}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Optional. The etag for the version of the [Access Policy]
     * [google.identity.accesscontextmanager.v1.AccessPolicy] that this
     * commit operation is to be performed on. If, at the time of commit, the
     * etag for the Access Policy stored in Access Context Manager is different
     * from the specified etag, then the commit operation will not be performed
     * and the call will fail. This field is not required. If etag is not
     * provided, the operation will be performed as if a valid etag is provided.
     *
     * Generated from protobuf field <code>string etag = 2;</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * Optional. The etag for the version of the [Access Policy]
     * [google.identity.accesscontextmanager.v1.AccessPolicy] that this
     * commit operation is to be performed on. If, at the time of commit, the
     * etag for the Access Policy stored in Access Context Manager is different
     * from the specified etag, then the commit operation will not be performed
     * and the call will fail. This field is not required. If etag is not
     * provided, the operation will be performed as if a valid etag is provided.
     *
     * Generated from protobuf field <code>string etag = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

}

