Class: Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Database

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/firestore_v1/classes.rb,
lib/google/apis/firestore_v1/representations.rb,
lib/google/apis/firestore_v1/representations.rb

Overview

A Cloud Firestore Database. Currently only one database is allowed per cloud project; this database must have a database_id of '(default)'.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleFirestoreAdminV1Database

Returns a new instance of GoogleFirestoreAdminV1Database.



825
826
827
# File 'lib/google/apis/firestore_v1/classes.rb', line 825

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#concurrency_modeString

The concurrency control mode to use for this database. Corresponds to the JSON property concurrencyMode

Returns:

  • (String)


786
787
788
# File 'lib/google/apis/firestore_v1/classes.rb', line 786

def concurrency_mode
  @concurrency_mode
end

#earliest_version_timeString

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. Note that you should not need to query this field: if you know the version_retention_period then you can query within that time. Corresponds to the JSON property earliestVersionTime

Returns:

  • (String)


798
799
800
# File 'lib/google/apis/firestore_v1/classes.rb', line 798

def earliest_version_time
  @earliest_version_time
end

#etagString

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. Corresponds to the JSON property etag

Returns:

  • (String)


805
806
807
# File 'lib/google/apis/firestore_v1/classes.rb', line 805

def etag
  @etag
end

#location_idString

The location of the database. Available databases are listed at https://cloud. google.com/firestore/docs/locations. Corresponds to the JSON property locationId

Returns:

  • (String)


811
812
813
# File 'lib/google/apis/firestore_v1/classes.rb', line 811

def location_id
  @location_id
end

#nameString

The resource name of the Database. Format: projects/project/databases/ database` Corresponds to the JSON propertyname`

Returns:

  • (String)


817
818
819
# File 'lib/google/apis/firestore_v1/classes.rb', line 817

def name
  @name
end

#typeString

The type of the database. See https://cloud.google.com/datastore/docs/ firestore-or-datastore for information about how to choose. Corresponds to the JSON property type

Returns:

  • (String)


823
824
825
# File 'lib/google/apis/firestore_v1/classes.rb', line 823

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



830
831
832
833
834
835
836
837
# File 'lib/google/apis/firestore_v1/classes.rb', line 830

def update!(**args)
  @concurrency_mode = args[:concurrency_mode] if args.key?(:concurrency_mode)
  @earliest_version_time = args[:earliest_version_time] if args.key?(:earliest_version_time)
  @etag = args[:etag] if args.key?(:etag)
  @location_id = args[:location_id] if args.key?(:location_id)
  @name = args[:name] if args.key?(:name)
  @type = args[:type] if args.key?(:type)
end