Packages

Firebase Realtime Database Management API client library. The Firebase Realtime Database API enables programmatic provisioning and management of Realtime Database instances.

Current section

3 Versions

Jump to

Compare versions

7 files changed
+162 additions
-42 deletions
  @@ -1,8 +1,8 @@
1 1 # GoogleApi.FirebaseDatabase
2 2
3 - Firebase Realtime Database Management API client library.
3 + Firebase Realtime Database API client library.
4 4
5 - The Firebase Realtime Database Management API enables programmatic provisioning and management of Realtime Database instances.
5 + The Firebase Realtime Database API enables programmatic provisioning and management of Realtime Database instances.
6 6
7 7 ## Installation
8 8
  @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
11 11
12 12 ```elixir
13 13 def deps do
14 - [{:google_api_firebase_database, "~> 0.2"}]
14 + [{:google_api_firebase_database, "~> 0.3"}]
15 15 end
16 16 ```
  @@ -1,32 +1,33 @@
1 - {<<"app">>,<<"google_api_firebase_database">>}.
2 - {<<"build_tools">>,[<<"mix">>]}.
3 - {<<"description">>,
4 - <<"Firebase Realtime Database Management API client library. The Firebase Realtime Database Management API enables programmatic provisioning and management of Realtime Database instances.">>}.
5 - {<<"elixir">>,<<"~> 1.6">>}.
6 - {<<"files">>,
7 - [<<"lib">>,<<"lib/google_api">>,<<"lib/google_api/firebase_database">>,
8 - <<"lib/google_api/firebase_database/v1beta">>,
9 - <<"lib/google_api/firebase_database/v1beta/metadata.ex">>,
10 - <<"lib/google_api/firebase_database/v1beta/api">>,
11 - <<"lib/google_api/firebase_database/v1beta/api/projects.ex">>,
12 - <<"lib/google_api/firebase_database/v1beta/connection.ex">>,
13 - <<"lib/google_api/firebase_database/v1beta/model">>,
14 - <<"lib/google_api/firebase_database/v1beta/model/list_database_instances_response.ex">>,
15 - <<"lib/google_api/firebase_database/v1beta/model/database_instance.ex">>,
16 - <<"lib/google_api/firebase_database/v1beta/model/disable_database_instance_request.ex">>,
17 - <<"lib/google_api/firebase_database/v1beta/model/reenable_database_instance_request.ex">>,
18 - <<"mix.exs">>,<<"README.md">>,<<"LICENSE">>]}.
19 - {<<"licenses">>,[<<"Apache 2.0">>]}.
20 1 {<<"links">>,
21 2 [{<<"GitHub">>,
22 3 <<"https://github.com/googleapis/elixir-google-api/tree/master/clients/firebase_database">>},
23 4 {<<"Homepage">>,
24 5 <<"https://firebase.google.com/docs/reference/rest/database/database-management/rest/">>}]}.
25 6 {<<"name">>,<<"google_api_firebase_database">>}.
7 + {<<"version">>,<<"0.3.0">>}.
8 + {<<"description">>,
9 + <<"Firebase Realtime Database API client library. The Firebase Realtime Database API enables programmatic provisioning and management of Realtime Database instances.">>}.
10 + {<<"elixir">>,<<"~> 1.6">>}.
11 + {<<"app">>,<<"google_api_firebase_database">>}.
12 + {<<"files">>,
13 + [<<"lib">>,<<"lib/google_api">>,<<"lib/google_api/firebase_database">>,
14 + <<"lib/google_api/firebase_database/v1beta">>,
15 + <<"lib/google_api/firebase_database/v1beta/api">>,
16 + <<"lib/google_api/firebase_database/v1beta/api/projects.ex">>,
17 + <<"lib/google_api/firebase_database/v1beta/metadata.ex">>,
18 + <<"lib/google_api/firebase_database/v1beta/model">>,
19 + <<"lib/google_api/firebase_database/v1beta/model/database_instance.ex">>,
20 + <<"lib/google_api/firebase_database/v1beta/model/disable_database_instance_request.ex">>,
21 + <<"lib/google_api/firebase_database/v1beta/model/reenable_database_instance_request.ex">>,
22 + <<"lib/google_api/firebase_database/v1beta/model/list_database_instances_response.ex">>,
23 + <<"lib/google_api/firebase_database/v1beta/model/undelete_database_instance_request.ex">>,
24 + <<"lib/google_api/firebase_database/v1beta/connection.ex">>,<<"mix.exs">>,
25 + <<"README.md">>,<<"LICENSE">>]}.
26 + {<<"licenses">>,[<<"Apache 2.0">>]}.
26 27 {<<"requirements">>,
27 - [[{<<"app">>,<<"google_gax">>},
28 - {<<"name">>,<<"google_gax">>},
28 + [[{<<"name">>,<<"google_gax">>},
29 + {<<"app">>,<<"google_gax">>},
29 30 {<<"optional">>,false},
30 - {<<"repository">>,<<"hexpm">>},
31 - {<<"requirement">>,<<"~> 0.4">>}]]}.
32 - {<<"version">>,<<"0.2.0">>}.
31 + {<<"requirement">>,<<"~> 0.4">>},
32 + {<<"repository">>,<<"hexpm">>}]]}.
33 + {<<"build_tools">>,[<<"mix">>]}.
  @@ -31,7 +31,7 @@ defmodule GoogleApi.FirebaseDatabase.V1beta.Api.Projects do
31 31 ## Parameters
32 32
33 33 * `connection` (*type:* `GoogleApi.FirebaseDatabase.V1beta.Connection.t`) - Connection to server
34 - * `parent` (*type:* `String.t`) - The parent project for which to create a database instance, in the form: `projects/{project-number}/locations/{location-id}`.
34 + * `parent` (*type:* `String.t`) - Required. The parent project for which to create a database instance, in the form: `projects/{project-number}/locations/{location-id}`.
35 35 * `optional_params` (*type:* `keyword()`) - Optional parameters
36 36 * `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
37 37 * `:access_token` (*type:* `String.t`) - OAuth access token.
  @@ -104,12 +104,12 @@ defmodule GoogleApi.FirebaseDatabase.V1beta.Api.Projects do
104 104 end
105 105
106 106 @doc """
107 - Marks a DatabaseInstance to be deleted. The DatabaseInstance will be purged within 30 days. The default database cannot be deleted. IDs for deleted database instances may never be recovered or re-used. The Database may only be deleted if it is already in a DISABLED state.
107 + Marks a DatabaseInstance to be deleted. The DatabaseInstance will be set to the DELETED state for 20 days, and will be purged within 30 days. The default database cannot be deleted. IDs for deleted database instances may never be recovered or re-used. The Database may only be deleted if it is already in a DISABLED state.
108 108
109 109 ## Parameters
110 110
111 111 * `connection` (*type:* `GoogleApi.FirebaseDatabase.V1beta.Connection.t`) - Connection to server
112 - * `name` (*type:* `String.t`) - The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`
112 + * `name` (*type:* `String.t`) - Required. The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`
113 113 * `optional_params` (*type:* `keyword()`) - Optional parameters
114 114 * `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
115 115 * `:access_token` (*type:* `String.t`) - OAuth access token.
  @@ -181,7 +181,7 @@ defmodule GoogleApi.FirebaseDatabase.V1beta.Api.Projects do
181 181 ## Parameters
182 182
183 183 * `connection` (*type:* `GoogleApi.FirebaseDatabase.V1beta.Connection.t`) - Connection to server
184 - * `name` (*type:* `String.t`) - The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`
184 + * `name` (*type:* `String.t`) - Required. The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`
185 185 * `optional_params` (*type:* `keyword()`) - Optional parameters
186 186 * `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
187 187 * `:access_token` (*type:* `String.t`) - OAuth access token.
  @@ -255,7 +255,7 @@ defmodule GoogleApi.FirebaseDatabase.V1beta.Api.Projects do
255 255 ## Parameters
256 256
257 257 * `connection` (*type:* `GoogleApi.FirebaseDatabase.V1beta.Connection.t`) - Connection to server
258 - * `name` (*type:* `String.t`) - The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`. `database-id` is a globally unique identifier across all parent collections. For convenience, this method allows you to supply `-` as a wildcard character in place of specific collections under `projects` and `locations`. The resulting wildcarding form of the method is: `projects/-/locations/-/instances/{database-id}`.
258 + * `name` (*type:* `String.t`) - Required. The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`. `database-id` is a globally unique identifier across all parent collections. For convenience, this method allows you to supply `-` as a wildcard character in place of specific collections under `projects` and `locations`. The resulting wildcarding form of the method is: `projects/-/locations/-/instances/{database-id}`.
259 259 * `optional_params` (*type:* `keyword()`) - Optional parameters
260 260 * `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
261 261 * `:access_token` (*type:* `String.t`) - OAuth access token.
  @@ -327,7 +327,7 @@ defmodule GoogleApi.FirebaseDatabase.V1beta.Api.Projects do
327 327 ## Parameters
328 328
329 329 * `connection` (*type:* `GoogleApi.FirebaseDatabase.V1beta.Connection.t`) - Connection to server
330 - * `parent` (*type:* `String.t`) - The parent project for which to list database instances, in the form: `projects/{project-number}/locations/{location-id}` To list across all locations, use a parent in the form: `projects/{project-number}/locations/-`
330 + * `parent` (*type:* `String.t`) - Required. The parent project for which to list database instances, in the form: `projects/{project-number}/locations/{location-id}` To list across all locations, use a parent in the form: `projects/{project-number}/locations/-`
331 331 * `optional_params` (*type:* `keyword()`) - Optional parameters
332 332 * `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
333 333 * `:access_token` (*type:* `String.t`) - OAuth access token.
  @@ -342,6 +342,7 @@ defmodule GoogleApi.FirebaseDatabase.V1beta.Api.Projects do
342 342 * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
343 343 * `:pageSize` (*type:* `integer()`) - The maximum number of database instances to return in the response. The server may return fewer than this at its discretion. If no value is specified (or too large a value is specified), then the server will impose its own limit.
344 344 * `:pageToken` (*type:* `String.t`) - Token returned from a previous call to `ListDatabaseInstances` indicating where in the set of database instances to resume listing.
345 + * `:showDeleted` (*type:* `boolean()`) - Indicate that DatabaseInstances in the `DELETED` state should also be returned.
345 346 * `opts` (*type:* `keyword()`) - Call options
346 347
347 348 ## Returns
  @@ -378,7 +379,8 @@ defmodule GoogleApi.FirebaseDatabase.V1beta.Api.Projects do
378 379 :uploadType => :query,
379 380 :upload_protocol => :query,
380 381 :pageSize => :query,
381 - :pageToken => :query
382 + :pageToken => :query,
383 + :showDeleted => :query
382 384 }
383 385
384 386 request =
  @@ -403,7 +405,7 @@ defmodule GoogleApi.FirebaseDatabase.V1beta.Api.Projects do
403 405 ## Parameters
404 406
405 407 * `connection` (*type:* `GoogleApi.FirebaseDatabase.V1beta.Connection.t`) - Connection to server
406 - * `name` (*type:* `String.t`) - The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`
408 + * `name` (*type:* `String.t`) - Required. The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`
407 409 * `optional_params` (*type:* `keyword()`) - Optional parameters
408 410 * `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
409 411 * `:access_token` (*type:* `String.t`) - OAuth access token.
  @@ -470,4 +472,78 @@ defmodule GoogleApi.FirebaseDatabase.V1beta.Api.Projects do
470 472 opts ++ [struct: %GoogleApi.FirebaseDatabase.V1beta.Model.DatabaseInstance{}]
471 473 )
472 474 end
475 +
476 + @doc """
477 + Restores a DatabaseInstance that was previously marked to be deleted. After the delete method is used, DatabaseInstances are set to the DELETED state for 20 days, and will be purged within 30 days. Databases in the DELETED state can be undeleted without losing any data. This method may only be used on a DatabaseInstance in the DELETED state. Purged DatabaseInstances may not be recovered.
478 +
479 + ## Parameters
480 +
481 + * `connection` (*type:* `GoogleApi.FirebaseDatabase.V1beta.Connection.t`) - Connection to server
482 + * `name` (*type:* `String.t`) - Required. The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`
483 + * `optional_params` (*type:* `keyword()`) - Optional parameters
484 + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
485 + * `:access_token` (*type:* `String.t`) - OAuth access token.
486 + * `:alt` (*type:* `String.t`) - Data format for response.
487 + * `:callback` (*type:* `String.t`) - JSONP
488 + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
489 + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
490 + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
491 + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
492 + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
493 + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
494 + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
495 + * `:body` (*type:* `GoogleApi.FirebaseDatabase.V1beta.Model.UndeleteDatabaseInstanceRequest.t`) -
496 + * `opts` (*type:* `keyword()`) - Call options
497 +
498 + ## Returns
499 +
500 + * `{:ok, %GoogleApi.FirebaseDatabase.V1beta.Model.DatabaseInstance{}}` on success
501 + * `{:error, info}` on failure
502 + """
503 + @spec firebasedatabase_projects_locations_instances_undelete(
504 + Tesla.Env.client(),
505 + String.t(),
506 + keyword(),
507 + keyword()
508 + ) ::
509 + {:ok, GoogleApi.FirebaseDatabase.V1beta.Model.DatabaseInstance.t()}
510 + | {:ok, Tesla.Env.t()}
511 + | {:ok, list()}
512 + | {:error, any()}
513 + def firebasedatabase_projects_locations_instances_undelete(
514 + connection,
515 + name,
516 + optional_params \\ [],
517 + opts \\ []
518 + ) do
519 + optional_params_config = %{
520 + :"$.xgafv" => :query,
521 + :access_token => :query,
522 + :alt => :query,
523 + :callback => :query,
524 + :fields => :query,
525 + :key => :query,
526 + :oauth_token => :query,
527 + :prettyPrint => :query,
528 + :quotaUser => :query,
529 + :uploadType => :query,
530 + :upload_protocol => :query,
531 + :body => :body
532 + }
533 +
534 + request =
535 + Request.new()
536 + |> Request.method(:post)
537 + |> Request.url("/v1beta/{+name}:undelete", %{
538 + "name" => URI.encode(name, &URI.char_unreserved?/1)
539 + })
540 + |> Request.add_optional_params(optional_params_config, optional_params)
541 + |> Request.library_version(@library_version)
542 +
543 + connection
544 + |> Connection.execute(request)
545 + |> Response.decode(
546 + opts ++ [struct: %GoogleApi.FirebaseDatabase.V1beta.Model.DatabaseInstance{}]
547 + )
548 + end
473 549 end
  @@ -20,7 +20,7 @@ defmodule GoogleApi.FirebaseDatabase.V1beta do
20 20 API client metadata for GoogleApi.FirebaseDatabase.V1beta.
21 21 """
22 22
23 - @discovery_revision "20211207"
23 + @discovery_revision "20240310"
24 24
25 25 def discovery_revision(), do: @discovery_revision
26 26 end
  @@ -21,11 +21,11 @@ defmodule GoogleApi.FirebaseDatabase.V1beta.Model.DatabaseInstance do
21 21
22 22 ## Attributes
23 23
24 - * `databaseUrl` (*type:* `String.t`, *default:* `nil`) - Immutable. The globally unique hostname of the database.
24 + * `databaseUrl` (*type:* `String.t`, *default:* `nil`) - Output only. Output Only. The globally unique hostname of the database.
25 25 * `name` (*type:* `String.t`, *default:* `nil`) - The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`.
26 - * `project` (*type:* `String.t`, *default:* `nil`) - The resource name of the project this instance belongs to. For example: `projects/{project-number}`.
27 - * `state` (*type:* `String.t`, *default:* `nil`) - The database's lifecycle state. Read-only.
28 - * `type` (*type:* `String.t`, *default:* `nil`) - The database instance type. On creation only USER_DATABASE is allowed, which is also the default when omitted.
26 + * `project` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the project this instance belongs to. For example: `projects/{project-number}`.
27 + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The database's lifecycle state. Read-only.
28 + * `type` (*type:* `String.t`, *default:* `nil`) - Immutable. The database instance type. On creation only USER_DATABASE is allowed, which is also the default when omitted.
29 29 """
30 30
31 31 use GoogleApi.Gax.ModelBase
Loading more files…