google-cloud-firestore-admin-v1 0.14.3 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,6 +25,44 @@ module Google
25
25
  module FirestoreAdmin
26
26
  # Path helper methods for the FirestoreAdmin API.
27
27
  module Paths
28
+ ##
29
+ # Create a fully-qualified Backup resource string.
30
+ #
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/locations/{location}/backups/{backup}`
34
+ #
35
+ # @param project [String]
36
+ # @param location [String]
37
+ # @param backup [String]
38
+ #
39
+ # @return [::String]
40
+ def backup_path project:, location:, backup:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
43
+
44
+ "projects/#{project}/locations/#{location}/backups/#{backup}"
45
+ end
46
+
47
+ ##
48
+ # Create a fully-qualified BackupSchedule resource string.
49
+ #
50
+ # The resource will be in the following format:
51
+ #
52
+ # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`
53
+ #
54
+ # @param project [String]
55
+ # @param database [String]
56
+ # @param backup_schedule [String]
57
+ #
58
+ # @return [::String]
59
+ def backup_schedule_path project:, database:, backup_schedule:
60
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
61
+ raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/"
62
+
63
+ "projects/#{project}/databases/#{database}/backupSchedules/#{backup_schedule}"
64
+ end
65
+
28
66
  ##
29
67
  # Create a fully-qualified CollectionGroup resource string.
30
68
  #
@@ -103,6 +141,23 @@ module Google
103
141
  "projects/#{project}/databases/#{database}/collectionGroups/#{collection}/indexes/#{index}"
104
142
  end
105
143
 
144
+ ##
145
+ # Create a fully-qualified Location resource string.
146
+ #
147
+ # The resource will be in the following format:
148
+ #
149
+ # `projects/{project}/locations/{location}`
150
+ #
151
+ # @param project [String]
152
+ # @param location [String]
153
+ #
154
+ # @return [::String]
155
+ def location_path project:, location:
156
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
157
+
158
+ "projects/#{project}/locations/#{location}"
159
+ end
160
+
106
161
  ##
107
162
  # Create a fully-qualified Project resource string.
108
163
  #