google-cloud-artifact_registry-v1 0.6.0 → 0.8.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.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb +857 -98
  4. data/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb +12 -14
  5. data/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb +122 -0
  6. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +2888 -0
  7. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb +793 -0
  8. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb +2123 -0
  9. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb +66 -0
  10. data/lib/google/cloud/artifact_registry/v1/artifact_registry.rb +6 -0
  11. data/lib/google/cloud/artifact_registry/v1/bindings_override.rb +102 -0
  12. data/lib/google/cloud/artifact_registry/v1/rest.rb +38 -0
  13. data/lib/google/cloud/artifact_registry/v1/version.rb +1 -1
  14. data/lib/google/cloud/artifact_registry/v1.rb +5 -0
  15. data/lib/google/devtools/artifactregistry/v1/artifact_pb.rb +75 -0
  16. data/lib/google/devtools/artifactregistry/v1/file_pb.rb +2 -0
  17. data/lib/google/devtools/artifactregistry/v1/package_pb.rb +1 -0
  18. data/lib/google/devtools/artifactregistry/v1/service_pb.rb +1 -0
  19. data/lib/google/devtools/artifactregistry/v1/service_services_pb.rb +16 -0
  20. data/lib/google/devtools/artifactregistry/v1/version_pb.rb +4 -0
  21. data/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb +42 -0
  22. data/proto_docs/google/devtools/artifactregistry/v1/artifact.rb +226 -3
  23. data/proto_docs/google/devtools/artifactregistry/v1/file.rb +11 -7
  24. data/proto_docs/google/devtools/artifactregistry/v1/version.rb +11 -1
  25. data/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb +82 -0
  26. metadata +19 -10
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil
@@ -45,6 +45,27 @@ module Google
45
45
  "projects/#{project}/locations/#{location}/repositories/#{repository}/dockerImages/#{docker_image}"
46
46
  end
47
47
 
48
+ ##
49
+ # Create a fully-qualified File resource string.
50
+ #
51
+ # The resource will be in the following format:
52
+ #
53
+ # `projects/{project}/locations/{location}/repositories/{repository}/files/{file}`
54
+ #
55
+ # @param project [String]
56
+ # @param location [String]
57
+ # @param repository [String]
58
+ # @param file [String]
59
+ #
60
+ # @return [::String]
61
+ def file_path project:, location:, repository:, file:
62
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
63
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
64
+ raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/"
65
+
66
+ "projects/#{project}/locations/#{location}/repositories/#{repository}/files/#{file}"
67
+ end
68
+
48
69
  ##
49
70
  # Create a fully-qualified Location resource string.
50
71
  #
@@ -62,6 +83,69 @@ module Google
62
83
  "projects/#{project}/locations/#{location}"
63
84
  end
64
85
 
86
+ ##
87
+ # Create a fully-qualified MavenArtifact resource string.
88
+ #
89
+ # The resource will be in the following format:
90
+ #
91
+ # `projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}`
92
+ #
93
+ # @param project [String]
94
+ # @param location [String]
95
+ # @param repository [String]
96
+ # @param maven_artifact [String]
97
+ #
98
+ # @return [::String]
99
+ def maven_artifact_path project:, location:, repository:, maven_artifact:
100
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
101
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
102
+ raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/"
103
+
104
+ "projects/#{project}/locations/#{location}/repositories/#{repository}/mavenArtifacts/#{maven_artifact}"
105
+ end
106
+
107
+ ##
108
+ # Create a fully-qualified NpmPackage resource string.
109
+ #
110
+ # The resource will be in the following format:
111
+ #
112
+ # `projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}`
113
+ #
114
+ # @param project [String]
115
+ # @param location [String]
116
+ # @param repository [String]
117
+ # @param npm_package [String]
118
+ #
119
+ # @return [::String]
120
+ def npm_package_path project:, location:, repository:, npm_package:
121
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
122
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
123
+ raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/"
124
+
125
+ "projects/#{project}/locations/#{location}/repositories/#{repository}/npmPackages/#{npm_package}"
126
+ end
127
+
128
+ ##
129
+ # Create a fully-qualified Package resource string.
130
+ #
131
+ # The resource will be in the following format:
132
+ #
133
+ # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}`
134
+ #
135
+ # @param project [String]
136
+ # @param location [String]
137
+ # @param repository [String]
138
+ # @param package [String]
139
+ #
140
+ # @return [::String]
141
+ def package_path project:, location:, repository:, package:
142
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
143
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
144
+ raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/"
145
+
146
+ "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}"
147
+ end
148
+
65
149
  ##
66
150
  # Create a fully-qualified ProjectSettings resource string.
67
151
  #
@@ -76,6 +160,27 @@ module Google
76
160
  "projects/#{project}/projectSettings"
77
161
  end
78
162
 
163
+ ##
164
+ # Create a fully-qualified PythonPackage resource string.
165
+ #
166
+ # The resource will be in the following format:
167
+ #
168
+ # `projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}`
169
+ #
170
+ # @param project [String]
171
+ # @param location [String]
172
+ # @param repository [String]
173
+ # @param python_package [String]
174
+ #
175
+ # @return [::String]
176
+ def python_package_path project:, location:, repository:, python_package:
177
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
178
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
179
+ raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/"
180
+
181
+ "projects/#{project}/locations/#{location}/repositories/#{repository}/pythonPackages/#{python_package}"
182
+ end
183
+
79
184
  ##
80
185
  # Create a fully-qualified Repository resource string.
81
186
  #
@@ -118,6 +223,23 @@ module Google
118
223
  "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}"
119
224
  end
120
225
 
226
+ ##
227
+ # Create a fully-qualified VpcscConfig resource string.
228
+ #
229
+ # The resource will be in the following format:
230
+ #
231
+ # `projects/{project}/locations/{location}/vpcscConfig`
232
+ #
233
+ # @param project [String]
234
+ # @param location [String]
235
+ #
236
+ # @return [::String]
237
+ def vpcsc_config_path project:, location:
238
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
239
+
240
+ "projects/#{project}/locations/#{location}/vpcscConfig"
241
+ end
242
+
121
243
  extend self
122
244
  end
123
245
  end