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

namespace Google\Identity\AccessContextManager\V1;

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

/**
 * `AccessPolicy` is a container for `AccessLevels` (which define the necessary
 * attributes to use Google Cloud services) and `ServicePerimeters` (which
 * define regions of services able to freely pass data within a perimeter). An
 * access policy is globally visible within an organization, and the
 * restrictions it specifies apply to all projects within an organization.
 *
 * Generated from protobuf message <code>google.identity.accesscontextmanager.v1.AccessPolicy</code>
 */
class AccessPolicy extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Resource name of the `AccessPolicy`. Format:
     * `accessPolicies/{policy_id}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Required. The parent of this `AccessPolicy` in the Cloud Resource
     * Hierarchy. Currently immutable once created. Format:
     * `organizations/{organization_id}`
     *
     * Generated from protobuf field <code>string parent = 2;</code>
     */
    private $parent = '';
    /**
     * Required. Human readable title. Does not affect behavior.
     *
     * Generated from protobuf field <code>string title = 3;</code>
     */
    private $title = '';
    /**
     * Output only. Time the `AccessPolicy` was created in UTC.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4;</code>
     */
    private $create_time = null;
    /**
     * Output only. Time the `AccessPolicy` was updated in UTC.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5;</code>
     */
    private $update_time = null;
    /**
     * Output only. An opaque identifier for the current version of the
     * `AccessPolicy`. This will always be a strongly validated etag, meaning that
     * two Access Polices will be identical if and only if their etags are
     * identical. Clients should not expect this to be in any specific format.
     *
     * Generated from protobuf field <code>string etag = 6;</code>
     */
    private $etag = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. Resource name of the `AccessPolicy`. Format:
     *           `accessPolicies/{policy_id}`
     *     @type string $parent
     *           Required. The parent of this `AccessPolicy` in the Cloud Resource
     *           Hierarchy. Currently immutable once created. Format:
     *           `organizations/{organization_id}`
     *     @type string $title
     *           Required. Human readable title. Does not affect behavior.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Time the `AccessPolicy` was created in UTC.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Time the `AccessPolicy` was updated in UTC.
     *     @type string $etag
     *           Output only. An opaque identifier for the current version of the
     *           `AccessPolicy`. This will always be a strongly validated etag, meaning that
     *           two Access Polices will be identical if and only if their etags are
     *           identical. Clients should not expect this to be in any specific format.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Identity\Accesscontextmanager\V1\AccessPolicy::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Resource name of the `AccessPolicy`. Format:
     * `accessPolicies/{policy_id}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. Resource name of the `AccessPolicy`. Format:
     * `accessPolicies/{policy_id}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The parent of this `AccessPolicy` in the Cloud Resource
     * Hierarchy. Currently immutable once created. Format:
     * `organizations/{organization_id}`
     *
     * Generated from protobuf field <code>string parent = 2;</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The parent of this `AccessPolicy` in the Cloud Resource
     * Hierarchy. Currently immutable once created. Format:
     * `organizations/{organization_id}`
     *
     * Generated from protobuf field <code>string parent = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. Human readable title. Does not affect behavior.
     *
     * Generated from protobuf field <code>string title = 3;</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Required. Human readable title. Does not affect behavior.
     *
     * Generated from protobuf field <code>string title = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * Output only. Time the `AccessPolicy` was created in UTC.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4;</code>
     * @return \Google\Protobuf\Timestamp
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    /**
     * Output only. Time the `AccessPolicy` was created in UTC.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. Time the `AccessPolicy` was updated in UTC.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5;</code>
     * @return \Google\Protobuf\Timestamp
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    /**
     * Output only. Time the `AccessPolicy` was updated in UTC.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Output only. An opaque identifier for the current version of the
     * `AccessPolicy`. This will always be a strongly validated etag, meaning that
     * two Access Polices will be identical if and only if their etags are
     * identical. Clients should not expect this to be in any specific format.
     *
     * Generated from protobuf field <code>string etag = 6;</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * Output only. An opaque identifier for the current version of the
     * `AccessPolicy`. This will always be a strongly validated etag, meaning that
     * two Access Polices will be identical if and only if their etags are
     * identical. Clients should not expect this to be in any specific format.
     *
     * Generated from protobuf field <code>string etag = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

}

