Module: Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb
Overview
Path helper methods for the FirestoreAdmin API.
Instance Method Summary collapse
-
#backup_path(project:, location:, backup:) ⇒ ::String
Create a fully-qualified Backup resource string.
-
#backup_schedule_path(project:, database:, backup_schedule:) ⇒ ::String
Create a fully-qualified BackupSchedule resource string.
-
#collection_group_path(project:, database:, collection:) ⇒ ::String
Create a fully-qualified CollectionGroup resource string.
-
#database_path(project:, database:) ⇒ ::String
Create a fully-qualified Database resource string.
-
#field_path(project:, database:, collection:, field:) ⇒ ::String
Create a fully-qualified Field resource string.
-
#index_path(project:, database:, collection:, index:) ⇒ ::String
Create a fully-qualified Index resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#operation_path(project:, database:, operation:) ⇒ ::String
Create a fully-qualified Operation resource string.
-
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
Instance Method Details
#backup_path(project:, location:, backup:) ⇒ ::String
Create a fully-qualified Backup resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/backups/{backup}
40 41 42 43 44 45 |
# File 'lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb', line 40 def backup_path project:, location:, backup: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/backups/#{backup}" end |
#backup_schedule_path(project:, database:, backup_schedule:) ⇒ ::String
Create a fully-qualified BackupSchedule resource string.
The resource will be in the following format:
projects/{project}/databases/{database}/backupSchedules/{backup_schedule}
59 60 61 62 63 64 |
# File 'lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb', line 59 def backup_schedule_path project:, database:, backup_schedule: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" "projects/#{project}/databases/#{database}/backupSchedules/#{backup_schedule}" end |
#collection_group_path(project:, database:, collection:) ⇒ ::String
Create a fully-qualified CollectionGroup resource string.
The resource will be in the following format:
projects/{project}/databases/{database}/collectionGroups/{collection}
78 79 80 81 82 83 |
# File 'lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb', line 78 def collection_group_path project:, database:, collection: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" "projects/#{project}/databases/#{database}/collectionGroups/#{collection}" end |
#database_path(project:, database:) ⇒ ::String
Create a fully-qualified Database resource string.
The resource will be in the following format:
projects/{project}/databases/{database}
96 97 98 99 100 |
# File 'lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb', line 96 def database_path project:, database: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/databases/#{database}" end |
#field_path(project:, database:, collection:, field:) ⇒ ::String
Create a fully-qualified Field resource string.
The resource will be in the following format:
projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}
115 116 117 118 119 120 121 |
# File 'lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb', line 115 def field_path project:, database:, collection:, field: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" "projects/#{project}/databases/#{database}/collectionGroups/#{collection}/fields/#{field}" end |
#index_path(project:, database:, collection:, index:) ⇒ ::String
Create a fully-qualified Index resource string.
The resource will be in the following format:
projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}
136 137 138 139 140 141 142 |
# File 'lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb', line 136 def index_path project:, database:, collection:, index: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" "projects/#{project}/databases/#{database}/collectionGroups/#{collection}/indexes/#{index}" end |
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
155 156 157 158 159 |
# File 'lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb', line 155 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#operation_path(project:, database:, operation:) ⇒ ::String
Create a fully-qualified Operation resource string.
The resource will be in the following format:
projects/{project}/databases/{database}/operations/{operation}
173 174 175 176 177 178 |
# File 'lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb', line 173 def operation_path project:, database:, operation: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" "projects/#{project}/databases/#{database}/operations/#{operation}" end |
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
The resource will be in the following format:
projects/{project}
190 191 192 |
# File 'lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb', line 190 def project_path project: "projects/#{project}" end |