Class: Google::Apis::FirebasedatabaseV1beta::DatabaseInstance

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

Overview

Representation of a Realtime Database instance. Details on interacting with contents of a DatabaseInstance can be found at: https://firebase.google.com/ docs/database/rest/start.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DatabaseInstance

Returns a new instance of DatabaseInstance.



60
61
62
# File 'generated/google/apis/firebasedatabase_v1beta/classes.rb', line 60

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

Instance Attribute Details

#database_urlString

Immutable. The globally unique hostname of the database. Corresponds to the JSON property databaseUrl

Returns:

  • (String)


34
35
36
# File 'generated/google/apis/firebasedatabase_v1beta/classes.rb', line 34

def database_url
  @database_url
end

#nameString

The fully qualified resource name of the database instance, in the form: projects/project-number/locations/location-id/instances/database-id`. Currently the only supported location is 'us-central1'. Corresponds to the JSON propertyname`

Returns:

  • (String)


41
42
43
# File 'generated/google/apis/firebasedatabase_v1beta/classes.rb', line 41

def name
  @name
end

#projectString

The resource name of the project this instance belongs to. For example: projects/project-number`. Corresponds to the JSON propertyproject`

Returns:

  • (String)


47
48
49
# File 'generated/google/apis/firebasedatabase_v1beta/classes.rb', line 47

def project
  @project
end

#stateString

The database's lifecycle state. Read-only. Corresponds to the JSON property state

Returns:

  • (String)


52
53
54
# File 'generated/google/apis/firebasedatabase_v1beta/classes.rb', line 52

def state
  @state
end

#typeString

The database instance type. On creation only USER_DATABASE is allowed, which is also the default when omitted. Corresponds to the JSON property type

Returns:

  • (String)


58
59
60
# File 'generated/google/apis/firebasedatabase_v1beta/classes.rb', line 58

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



65
66
67
68
69
70
71
# File 'generated/google/apis/firebasedatabase_v1beta/classes.rb', line 65

def update!(**args)
  @database_url = args[:database_url] if args.key?(:database_url)
  @name = args[:name] if args.key?(:name)
  @project = args[:project] if args.key?(:project)
  @state = args[:state] if args.key?(:state)
  @type = args[:type] if args.key?(:type)
end