<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/firestore/admin/v1/database.proto

namespace Google\Cloud\Firestore\Admin\V1;

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

/**
 * A Cloud Firestore Database.
 *
 * Generated from protobuf message <code>google.firestore.admin.v1.Database</code>
 */
class Database extends \Google\Protobuf\Internal\Message
{
    /**
     * The resource name of the Database.
     * Format: `projects/{project}/databases/{database}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Output only. The system-generated UUID4 for this Database.
     *
     * Generated from protobuf field <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $uid = '';
    /**
     * Output only. The timestamp at which this database was created. Databases
     * created before 2016 do not populate create_time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. The timestamp at which this database was most recently
     * updated. Note this only includes updates to the database resource and not
     * data contained by the database.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;
    /**
     * Output only. The timestamp at which this database was deleted. Only set if
     * the database has been deleted.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $delete_time = null;
    /**
     * The location of the database. Available locations are listed at
     * https://cloud.google.com/firestore/docs/locations.
     *
     * Generated from protobuf field <code>string location_id = 9;</code>
     */
    private $location_id = '';
    /**
     * The type of the database.
     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
     * information about how to choose.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.DatabaseType type = 10;</code>
     */
    private $type = 0;
    /**
     * The concurrency control mode to use for this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15;</code>
     */
    private $concurrency_mode = 0;
    /**
     * Output only. The period during which past versions of data are retained in
     * the database.
     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
     * a `read_time` within this window, and will read the state of the database
     * at that time.
     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
     * the retention period is 1 hour.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $version_retention_period = null;
    /**
     * Output only. The earliest timestamp at which older versions of the data can
     * be read from the database. See [version_retention_period] above; this field
     * is populated with `now - version_retention_period`.
     * This value is continuously updated, and becomes stale the moment it is
     * queried. If you are using this value to recover data, make sure to account
     * for the time from the moment when the value is queried to the moment when
     * you initiate the recovery.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $earliest_version_time = null;
    /**
     * Whether to enable the PITR feature on this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21;</code>
     */
    private $point_in_time_recovery_enablement = 0;
    /**
     * The App Engine integration mode to use for this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19;</code>
     */
    private $app_engine_integration_mode = 0;
    /**
     * Output only. The key_prefix for this database. This key_prefix is used, in
     * combination with the project ID ("<key prefix>~<project id>") to construct
     * the application ID that is returned from the Cloud Datastore APIs in Google
     * App Engine first generation runtimes.
     * This value may be empty in which case the appid to use for URL-encoded keys
     * is the project_id (eg: foo instead of v~foo).
     *
     * Generated from protobuf field <code>string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $key_prefix = '';
    /**
     * State of delete protection for the database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22;</code>
     */
    private $delete_protection_state = 0;
    /**
     * Optional. Presence indicates CMEK is enabled for this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $cmek_config = null;
    /**
     * Output only. The database resource's prior database ID. This field is only
     * populated for deleted databases.
     *
     * Generated from protobuf field <code>string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $previous_id = '';
    /**
     * Output only. Information about the provenance of this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $source_info = null;
    /**
     * Optional. Input only. Immutable. Tag keys/values directly bound to this
     * resource. For example:
     *   "123/environment": "production",
     *   "123/costCenter": "marketing"
     *
     * Generated from protobuf field <code>map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $tags;
    /**
     * Output only. Background: Free tier is the ability of a Firestore database
     * to use a small amount of resources every day without being charged. Once
     * usage exceeds the free tier limit further usage is charged.
     * Whether this database can make use of the free tier. Only one database
     * per project can be eligible for the free tier.
     * The first (or next) database that is created in a project without a free
     * tier database will be marked as eligible for the free tier. Databases that
     * are created while there is a free tier database will not be eligible for
     * the free tier.
     *
     * Generated from protobuf field <code>optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $free_tier = null;
    /**
     * This checksum is computed by the server based on the value of other
     * fields, and may be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     *
     * Generated from protobuf field <code>string etag = 99;</code>
     */
    private $etag = '';
    /**
     * Immutable. The edition of the database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    private $database_edition = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The resource name of the Database.
     *           Format: `projects/{project}/databases/{database}`
     *     @type string $uid
     *           Output only. The system-generated UUID4 for this Database.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The timestamp at which this database was created. Databases
     *           created before 2016 do not populate create_time.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The timestamp at which this database was most recently
     *           updated. Note this only includes updates to the database resource and not
     *           data contained by the database.
     *     @type \Google\Protobuf\Timestamp $delete_time
     *           Output only. The timestamp at which this database was deleted. Only set if
     *           the database has been deleted.
     *     @type string $location_id
     *           The location of the database. Available locations are listed at
     *           https://cloud.google.com/firestore/docs/locations.
     *     @type int $type
     *           The type of the database.
     *           See https://cloud.google.com/datastore/docs/firestore-or-datastore for
     *           information about how to choose.
     *     @type int $concurrency_mode
     *           The concurrency control mode to use for this database.
     *     @type \Google\Protobuf\Duration $version_retention_period
     *           Output only. The period during which past versions of data are retained in
     *           the database.
     *           Any [read][google.firestore.v1.GetDocumentRequest.read_time]
     *           or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
     *           a `read_time` within this window, and will read the state of the database
     *           at that time.
     *           If the PITR feature is enabled, the retention period is 7 days. Otherwise,
     *           the retention period is 1 hour.
     *     @type \Google\Protobuf\Timestamp $earliest_version_time
     *           Output only. The earliest timestamp at which older versions of the data can
     *           be read from the database. See [version_retention_period] above; this field
     *           is populated with `now - version_retention_period`.
     *           This value is continuously updated, and becomes stale the moment it is
     *           queried. If you are using this value to recover data, make sure to account
     *           for the time from the moment when the value is queried to the moment when
     *           you initiate the recovery.
     *     @type int $point_in_time_recovery_enablement
     *           Whether to enable the PITR feature on this database.
     *     @type int $app_engine_integration_mode
     *           The App Engine integration mode to use for this database.
     *     @type string $key_prefix
     *           Output only. The key_prefix for this database. This key_prefix is used, in
     *           combination with the project ID ("<key prefix>~<project id>") to construct
     *           the application ID that is returned from the Cloud Datastore APIs in Google
     *           App Engine first generation runtimes.
     *           This value may be empty in which case the appid to use for URL-encoded keys
     *           is the project_id (eg: foo instead of v~foo).
     *     @type int $delete_protection_state
     *           State of delete protection for the database.
     *     @type \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $cmek_config
     *           Optional. Presence indicates CMEK is enabled for this database.
     *     @type string $previous_id
     *           Output only. The database resource's prior database ID. This field is only
     *           populated for deleted databases.
     *     @type \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $source_info
     *           Output only. Information about the provenance of this database.
     *     @type array|\Google\Protobuf\Internal\MapField $tags
     *           Optional. Input only. Immutable. Tag keys/values directly bound to this
     *           resource. For example:
     *             "123/environment": "production",
     *             "123/costCenter": "marketing"
     *     @type bool $free_tier
     *           Output only. Background: Free tier is the ability of a Firestore database
     *           to use a small amount of resources every day without being charged. Once
     *           usage exceeds the free tier limit further usage is charged.
     *           Whether this database can make use of the free tier. Only one database
     *           per project can be eligible for the free tier.
     *           The first (or next) database that is created in a project without a free
     *           tier database will be marked as eligible for the free tier. Databases that
     *           are created while there is a free tier database will not be eligible for
     *           the free tier.
     *     @type string $etag
     *           This checksum is computed by the server based on the value of other
     *           fields, and may be sent on update and delete requests to ensure the
     *           client has an up-to-date value before proceeding.
     *     @type int $database_edition
     *           Immutable. The edition of the database.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce();
        parent::__construct($data);
    }

    /**
     * The resource name of the Database.
     * Format: `projects/{project}/databases/{database}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The resource name of the Database.
     * Format: `projects/{project}/databases/{database}`
     *
     * 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;
    }

    /**
     * Output only. The system-generated UUID4 for this Database.
     *
     * Generated from protobuf field <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * Output only. The system-generated UUID4 for this Database.
     *
     * Generated from protobuf field <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->uid = $var;

        return $this;
    }

    /**
     * Output only. The timestamp at which this database was created. Databases
     * created before 2016 do not populate create_time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. The timestamp at which this database was created. Databases
     * created before 2016 do not populate create_time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</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. The timestamp at which this database was most recently
     * updated. Note this only includes updates to the database resource and not
     * data contained by the database.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. The timestamp at which this database was most recently
     * updated. Note this only includes updates to the database resource and not
     * data contained by the database.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</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. The timestamp at which this database was deleted. Only set if
     * the database has been deleted.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getDeleteTime()
    {
        return $this->delete_time;
    }

    public function hasDeleteTime()
    {
        return isset($this->delete_time);
    }

    public function clearDeleteTime()
    {
        unset($this->delete_time);
    }

    /**
     * Output only. The timestamp at which this database was deleted. Only set if
     * the database has been deleted.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setDeleteTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->delete_time = $var;

        return $this;
    }

    /**
     * The location of the database. Available locations are listed at
     * https://cloud.google.com/firestore/docs/locations.
     *
     * Generated from protobuf field <code>string location_id = 9;</code>
     * @return string
     */
    public function getLocationId()
    {
        return $this->location_id;
    }

    /**
     * The location of the database. Available locations are listed at
     * https://cloud.google.com/firestore/docs/locations.
     *
     * Generated from protobuf field <code>string location_id = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setLocationId($var)
    {
        GPBUtil::checkString($var, True);
        $this->location_id = $var;

        return $this;
    }

    /**
     * The type of the database.
     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
     * information about how to choose.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.DatabaseType type = 10;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * The type of the database.
     * See https://cloud.google.com/datastore/docs/firestore-or-datastore for
     * information about how to choose.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.DatabaseType type = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * The concurrency control mode to use for this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15;</code>
     * @return int
     */
    public function getConcurrencyMode()
    {
        return $this->concurrency_mode;
    }

    /**
     * The concurrency control mode to use for this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15;</code>
     * @param int $var
     * @return $this
     */
    public function setConcurrencyMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\ConcurrencyMode::class);
        $this->concurrency_mode = $var;

        return $this;
    }

    /**
     * Output only. The period during which past versions of data are retained in
     * the database.
     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
     * a `read_time` within this window, and will read the state of the database
     * at that time.
     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
     * the retention period is 1 hour.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getVersionRetentionPeriod()
    {
        return $this->version_retention_period;
    }

    public function hasVersionRetentionPeriod()
    {
        return isset($this->version_retention_period);
    }

    public function clearVersionRetentionPeriod()
    {
        unset($this->version_retention_period);
    }

    /**
     * Output only. The period during which past versions of data are retained in
     * the database.
     * Any [read][google.firestore.v1.GetDocumentRequest.read_time]
     * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
     * a `read_time` within this window, and will read the state of the database
     * at that time.
     * If the PITR feature is enabled, the retention period is 7 days. Otherwise,
     * the retention period is 1 hour.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setVersionRetentionPeriod($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->version_retention_period = $var;

        return $this;
    }

    /**
     * Output only. The earliest timestamp at which older versions of the data can
     * be read from the database. See [version_retention_period] above; this field
     * is populated with `now - version_retention_period`.
     * This value is continuously updated, and becomes stale the moment it is
     * queried. If you are using this value to recover data, make sure to account
     * for the time from the moment when the value is queried to the moment when
     * you initiate the recovery.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getEarliestVersionTime()
    {
        return $this->earliest_version_time;
    }

    public function hasEarliestVersionTime()
    {
        return isset($this->earliest_version_time);
    }

    public function clearEarliestVersionTime()
    {
        unset($this->earliest_version_time);
    }

    /**
     * Output only. The earliest timestamp at which older versions of the data can
     * be read from the database. See [version_retention_period] above; this field
     * is populated with `now - version_retention_period`.
     * This value is continuously updated, and becomes stale the moment it is
     * queried. If you are using this value to recover data, make sure to account
     * for the time from the moment when the value is queried to the moment when
     * you initiate the recovery.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setEarliestVersionTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->earliest_version_time = $var;

        return $this;
    }

    /**
     * Whether to enable the PITR feature on this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21;</code>
     * @return int
     */
    public function getPointInTimeRecoveryEnablement()
    {
        return $this->point_in_time_recovery_enablement;
    }

    /**
     * Whether to enable the PITR feature on this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21;</code>
     * @param int $var
     * @return $this
     */
    public function setPointInTimeRecoveryEnablement($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\PointInTimeRecoveryEnablement::class);
        $this->point_in_time_recovery_enablement = $var;

        return $this;
    }

    /**
     * The App Engine integration mode to use for this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19;</code>
     * @return int
     */
    public function getAppEngineIntegrationMode()
    {
        return $this->app_engine_integration_mode;
    }

    /**
     * The App Engine integration mode to use for this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19;</code>
     * @param int $var
     * @return $this
     */
    public function setAppEngineIntegrationMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\AppEngineIntegrationMode::class);
        $this->app_engine_integration_mode = $var;

        return $this;
    }

    /**
     * Output only. The key_prefix for this database. This key_prefix is used, in
     * combination with the project ID ("<key prefix>~<project id>") to construct
     * the application ID that is returned from the Cloud Datastore APIs in Google
     * App Engine first generation runtimes.
     * This value may be empty in which case the appid to use for URL-encoded keys
     * is the project_id (eg: foo instead of v~foo).
     *
     * Generated from protobuf field <code>string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getKeyPrefix()
    {
        return $this->key_prefix;
    }

    /**
     * Output only. The key_prefix for this database. This key_prefix is used, in
     * combination with the project ID ("<key prefix>~<project id>") to construct
     * the application ID that is returned from the Cloud Datastore APIs in Google
     * App Engine first generation runtimes.
     * This value may be empty in which case the appid to use for URL-encoded keys
     * is the project_id (eg: foo instead of v~foo).
     *
     * Generated from protobuf field <code>string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setKeyPrefix($var)
    {
        GPBUtil::checkString($var, True);
        $this->key_prefix = $var;

        return $this;
    }

    /**
     * State of delete protection for the database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22;</code>
     * @return int
     */
    public function getDeleteProtectionState()
    {
        return $this->delete_protection_state;
    }

    /**
     * State of delete protection for the database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22;</code>
     * @param int $var
     * @return $this
     */
    public function setDeleteProtectionState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DeleteProtectionState::class);
        $this->delete_protection_state = $var;

        return $this;
    }

    /**
     * Optional. Presence indicates CMEK is enabled for this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig|null
     */
    public function getCmekConfig()
    {
        return $this->cmek_config;
    }

    public function hasCmekConfig()
    {
        return isset($this->cmek_config);
    }

    public function clearCmekConfig()
    {
        unset($this->cmek_config);
    }

    /**
     * Optional. Presence indicates CMEK is enabled for this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $var
     * @return $this
     */
    public function setCmekConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig::class);
        $this->cmek_config = $var;

        return $this;
    }

    /**
     * Output only. The database resource's prior database ID. This field is only
     * populated for deleted databases.
     *
     * Generated from protobuf field <code>string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getPreviousId()
    {
        return $this->previous_id;
    }

    /**
     * Output only. The database resource's prior database ID. This field is only
     * populated for deleted databases.
     *
     * Generated from protobuf field <code>string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setPreviousId($var)
    {
        GPBUtil::checkString($var, True);
        $this->previous_id = $var;

        return $this;
    }

    /**
     * Output only. Information about the provenance of this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo|null
     */
    public function getSourceInfo()
    {
        return $this->source_info;
    }

    public function hasSourceInfo()
    {
        return isset($this->source_info);
    }

    public function clearSourceInfo()
    {
        unset($this->source_info);
    }

    /**
     * Output only. Information about the provenance of this database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $var
     * @return $this
     */
    public function setSourceInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo::class);
        $this->source_info = $var;

        return $this;
    }

    /**
     * Optional. Input only. Immutable. Tag keys/values directly bound to this
     * resource. For example:
     *   "123/environment": "production",
     *   "123/costCenter": "marketing"
     *
     * Generated from protobuf field <code>map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * Optional. Input only. Immutable. Tag keys/values directly bound to this
     * resource. For example:
     *   "123/environment": "production",
     *   "123/costCenter": "marketing"
     *
     * Generated from protobuf field <code>map<string, string> tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setTags($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->tags = $arr;

        return $this;
    }

    /**
     * Output only. Background: Free tier is the ability of a Firestore database
     * to use a small amount of resources every day without being charged. Once
     * usage exceeds the free tier limit further usage is charged.
     * Whether this database can make use of the free tier. Only one database
     * per project can be eligible for the free tier.
     * The first (or next) database that is created in a project without a free
     * tier database will be marked as eligible for the free tier. Databases that
     * are created while there is a free tier database will not be eligible for
     * the free tier.
     *
     * Generated from protobuf field <code>optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getFreeTier()
    {
        return isset($this->free_tier) ? $this->free_tier : false;
    }

    public function hasFreeTier()
    {
        return isset($this->free_tier);
    }

    public function clearFreeTier()
    {
        unset($this->free_tier);
    }

    /**
     * Output only. Background: Free tier is the ability of a Firestore database
     * to use a small amount of resources every day without being charged. Once
     * usage exceeds the free tier limit further usage is charged.
     * Whether this database can make use of the free tier. Only one database
     * per project can be eligible for the free tier.
     * The first (or next) database that is created in a project without a free
     * tier database will be marked as eligible for the free tier. Databases that
     * are created while there is a free tier database will not be eligible for
     * the free tier.
     *
     * Generated from protobuf field <code>optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setFreeTier($var)
    {
        GPBUtil::checkBool($var);
        $this->free_tier = $var;

        return $this;
    }

    /**
     * This checksum is computed by the server based on the value of other
     * fields, and may be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     *
     * Generated from protobuf field <code>string etag = 99;</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * This checksum is computed by the server based on the value of other
     * fields, and may be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     *
     * Generated from protobuf field <code>string etag = 99;</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

    /**
     * Immutable. The edition of the database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int
     */
    public function getDatabaseEdition()
    {
        return $this->database_edition;
    }

    /**
     * Immutable. The edition of the database.
     *
     * Generated from protobuf field <code>.google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int $var
     * @return $this
     */
    public function setDatabaseEdition($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseEdition::class);
        $this->database_edition = $var;

        return $this;
    }

}

