google-cloud-artifact_registry-v1 1.0.0 → 1.1.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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb +1750 -288
  3. data/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb +3 -10
  4. data/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb +42 -0
  5. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +1643 -272
  6. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb +3 -10
  7. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb +804 -31
  8. data/lib/google/cloud/artifact_registry/v1/version.rb +1 -1
  9. data/lib/google/devtools/artifactregistry/v1/attachment_pb.rb +52 -0
  10. data/lib/google/devtools/artifactregistry/v1/file_pb.rb +5 -1
  11. data/lib/google/devtools/artifactregistry/v1/generic_pb.rb +47 -0
  12. data/lib/google/devtools/artifactregistry/v1/package_pb.rb +4 -1
  13. data/lib/google/devtools/artifactregistry/v1/repository_pb.rb +11 -1
  14. data/lib/google/devtools/artifactregistry/v1/rule_pb.rb +57 -0
  15. data/lib/google/devtools/artifactregistry/v1/service_pb.rb +3 -1
  16. data/lib/google/devtools/artifactregistry/v1/service_services_pb.rb +31 -0
  17. data/lib/google/devtools/artifactregistry/v1/settings_pb.rb +1 -1
  18. data/lib/google/devtools/artifactregistry/v1/version_pb.rb +4 -1
  19. data/proto_docs/google/api/client.rb +51 -10
  20. data/proto_docs/google/api/resource.rb +7 -2
  21. data/proto_docs/google/devtools/artifactregistry/v1/artifact.rb +4 -4
  22. data/proto_docs/google/devtools/artifactregistry/v1/attachment.rb +152 -0
  23. data/proto_docs/google/devtools/artifactregistry/v1/file.rb +80 -7
  24. data/proto_docs/google/devtools/artifactregistry/v1/generic.rb +48 -0
  25. data/proto_docs/google/devtools/artifactregistry/v1/package.rb +76 -0
  26. data/proto_docs/google/devtools/artifactregistry/v1/repository.rb +188 -1
  27. data/proto_docs/google/devtools/artifactregistry/v1/rule.rb +149 -0
  28. data/proto_docs/google/devtools/artifactregistry/v1/settings.rb +10 -0
  29. data/proto_docs/google/devtools/artifactregistry/v1/tag.rb +23 -5
  30. data/proto_docs/google/devtools/artifactregistry/v1/version.rb +74 -1
  31. data/proto_docs/google/longrunning/operations.rb +19 -14
  32. metadata +9 -3
@@ -222,7 +222,7 @@ module Google
222
222
  # Required. The name of the parent resource whose docker images will be
223
223
  # listed.
224
224
  # @param page_size [::Integer]
225
- # The maximum number of artifacts to return.
225
+ # The maximum number of artifacts to return. Maximum page size is 1,000.
226
226
  # @param page_token [::String]
227
227
  # The next_page_token value returned from a previous list request, if any.
228
228
  # @param order_by [::String]
@@ -392,7 +392,7 @@ module Google
392
392
  # Required. The name of the parent resource whose maven artifacts will be
393
393
  # listed.
394
394
  # @param page_size [::Integer]
395
- # The maximum number of artifacts to return.
395
+ # The maximum number of artifacts to return. Maximum page size is 1,000.
396
396
  # @param page_token [::String]
397
397
  # The next_page_token value returned from a previous list request, if any.
398
398
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -560,7 +560,7 @@ module Google
560
560
  # Required. The name of the parent resource whose npm packages will be
561
561
  # listed.
562
562
  # @param page_size [::Integer]
563
- # The maximum number of artifacts to return.
563
+ # The maximum number of artifacts to return. Maximum page size is 1,000.
564
564
  # @param page_token [::String]
565
565
  # The next_page_token value returned from a previous list request, if any.
566
566
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -728,7 +728,7 @@ module Google
728
728
  # Required. The name of the parent resource whose python packages will be
729
729
  # listed.
730
730
  # @param page_size [::Integer]
731
- # The maximum number of artifacts to return.
731
+ # The maximum number of artifacts to return. Maximum page size is 1,000.
732
732
  # @param page_token [::String]
733
733
  # The next_page_token value returned from a previous list request, if any.
734
734
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -1071,7 +1071,7 @@ module Google
1071
1071
  # @param options [::Gapic::CallOptions, ::Hash]
1072
1072
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1073
1073
  #
1074
- # @overload list_repositories(parent: nil, page_size: nil, page_token: nil)
1074
+ # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1075
1075
  # Pass arguments to `list_repositories` via keyword arguments. Note that at
1076
1076
  # least one keyword argument is required. To specify no parameters, or to keep all
1077
1077
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1083,6 +1083,28 @@ module Google
1083
1083
  # The maximum number of repositories to return. Maximum page size is 1,000.
1084
1084
  # @param page_token [::String]
1085
1085
  # The next_page_token value returned from a previous list request, if any.
1086
+ # @param filter [::String]
1087
+ # Optional. An expression for filtering the results of the request. Filter
1088
+ # rules are case insensitive. The fields eligible for filtering are:
1089
+ #
1090
+ # * `name`
1091
+ #
1092
+ # Examples of using a filter:
1093
+ #
1094
+ # To filter the results of your request to repositories with the name
1095
+ # `my-repo` in project `my-project` in the `us-central` region, append the
1096
+ # following filter expression to your request:
1097
+ #
1098
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo"`
1099
+ #
1100
+ # You can also use wildcards to match any number of characters before or
1101
+ # after the value:
1102
+ #
1103
+ # * `name="projects/my-project/locations/us-central1/repositories/my-*"`
1104
+ # * `name="projects/my-project/locations/us-central1/repositories/*repo"`
1105
+ # * `name="projects/my-project/locations/us-central1/repositories/*repo*"`
1106
+ # @param order_by [::String]
1107
+ # Optional. The field to order the results by.
1086
1108
  # @yield [result, operation] Access the result along with the TransportOperation object
1087
1109
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>]
1088
1110
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1504,7 +1526,7 @@ module Google
1504
1526
  # @param options [::Gapic::CallOptions, ::Hash]
1505
1527
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1506
1528
  #
1507
- # @overload list_packages(parent: nil, page_size: nil, page_token: nil)
1529
+ # @overload list_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1508
1530
  # Pass arguments to `list_packages` via keyword arguments. Note that at
1509
1531
  # least one keyword argument is required. To specify no parameters, or to keep all
1510
1532
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1515,6 +1537,54 @@ module Google
1515
1537
  # The maximum number of packages to return. Maximum page size is 1,000.
1516
1538
  # @param page_token [::String]
1517
1539
  # The next_page_token value returned from a previous list request, if any.
1540
+ # @param filter [::String]
1541
+ # Optional. An expression for filtering the results of the request. Filter
1542
+ # rules are case insensitive. The fields eligible for filtering are:
1543
+ #
1544
+ # * `name`
1545
+ # * `annotations`
1546
+ #
1547
+ # Examples of using a filter:
1548
+ #
1549
+ # To filter the results of your request to packages with the name
1550
+ # `my-package` in project `my-project` in the `us-central` region, in
1551
+ # repository `my-repo`, append the following filter expression to your
1552
+ # request:
1553
+ #
1554
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"`
1555
+ #
1556
+ # You can also use wildcards to match any number of characters before or
1557
+ # after the value:
1558
+ #
1559
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"`
1560
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"`
1561
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"`
1562
+ #
1563
+ # To filter the results of your request to packages with the annotation
1564
+ # key-value pair [`external_link`: `external_link_value`], append the
1565
+ # following filter expression to your request":
1566
+ #
1567
+ # * `"annotations.external_link:external_link_value"`
1568
+ #
1569
+ # To filter the results just for a specific annotation key `external_link`,
1570
+ # append the following filter expression to your request:
1571
+ #
1572
+ # * `"annotations.external_link"`
1573
+ #
1574
+ # If the annotation key or value contains special characters, you can escape
1575
+ # them by surrounding the value with backticks. For example, to filter the
1576
+ # results of your request to packages with the annotation key-value pair
1577
+ # [`external.link`:`https://example.com/my-package`], append the following
1578
+ # filter expression to your request:
1579
+ #
1580
+ # * `` "annotations.`external.link`:`https://example.com/my-package`" ``
1581
+ #
1582
+ # You can also filter with annotations with a wildcard to
1583
+ # match any number of characters before or after the value:
1584
+ #
1585
+ # * `` "annotations.*_link:`*example.com*`" ``
1586
+ # @param order_by [::String]
1587
+ # Optional. The field to order the results by.
1518
1588
  # @yield [result, operation] Access the result along with the TransportOperation object
1519
1589
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>]
1520
1590
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1759,7 +1829,7 @@ module Google
1759
1829
  # @param options [::Gapic::CallOptions, ::Hash]
1760
1830
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1761
1831
  #
1762
- # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil)
1832
+ # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil, filter: nil)
1763
1833
  # Pass arguments to `list_versions` via keyword arguments. Note that at
1764
1834
  # least one keyword argument is required. To specify no parameters, or to keep all
1765
1835
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1774,6 +1844,52 @@ module Google
1774
1844
  # The view that should be returned in the response.
1775
1845
  # @param order_by [::String]
1776
1846
  # Optional. The field to order the results by.
1847
+ # @param filter [::String]
1848
+ # Optional. An expression for filtering the results of the request. Filter
1849
+ # rules are case insensitive. The fields eligible for filtering are:
1850
+ #
1851
+ # * `name`
1852
+ # * `annotations`
1853
+ #
1854
+ # Examples of using a filter:
1855
+ #
1856
+ # To filter the results of your request to versions with the name
1857
+ # `my-version` in project `my-project` in the `us-central` region, in
1858
+ # repository `my-repo`, append the following filter expression to your
1859
+ # request:
1860
+ #
1861
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"`
1862
+ #
1863
+ # You can also use wildcards to match any number of characters before or
1864
+ # after the value:
1865
+ #
1866
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"`
1867
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"`
1868
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"`
1869
+ #
1870
+ # To filter the results of your request to versions with the annotation
1871
+ # key-value pair [`external_link`: `external_link_value`], append the
1872
+ # following filter expression to your request:
1873
+ #
1874
+ # * `"annotations.external_link:external_link_value"`
1875
+ #
1876
+ # To filter just for a specific annotation key `external_link`, append the
1877
+ # following filter expression to your request:
1878
+ #
1879
+ # * `"annotations.external_link"`
1880
+ #
1881
+ # If the annotation key or value contains special characters, you can escape
1882
+ # them by surrounding the value with backticks. For example, to filter the
1883
+ # results of your request to versions with the annotation key-value pair
1884
+ # [`external.link`:`https://example.com/my-version`], append the following
1885
+ # filter expression to your request:
1886
+ #
1887
+ # * `` "annotations.`external.link`:`https://example.com/my-version`" ``
1888
+ #
1889
+ # You can also filter with annotations with a wildcard to
1890
+ # match any number of characters before or after the value:
1891
+ #
1892
+ # * `` "annotations.*_link:`*example.com*`" ``
1777
1893
  # @yield [result, operation] Access the result along with the TransportOperation object
1778
1894
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>]
1779
1895
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2103,6 +2219,89 @@ module Google
2103
2219
  raise ::Google::Cloud::Error.from_error(e)
2104
2220
  end
2105
2221
 
2222
+ ##
2223
+ # Updates a version.
2224
+ #
2225
+ # @overload update_version(request, options = nil)
2226
+ # Pass arguments to `update_version` via a request object, either of type
2227
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest} or an equivalent Hash.
2228
+ #
2229
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Hash]
2230
+ # A request object representing the call parameters. Required. To specify no
2231
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2232
+ # @param options [::Gapic::CallOptions, ::Hash]
2233
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2234
+ #
2235
+ # @overload update_version(version: nil, update_mask: nil)
2236
+ # Pass arguments to `update_version` via keyword arguments. Note that at
2237
+ # least one keyword argument is required. To specify no parameters, or to keep all
2238
+ # the default parameter values, pass an empty Hash as a request object (see above).
2239
+ #
2240
+ # @param version [::Google::Cloud::ArtifactRegistry::V1::Version, ::Hash]
2241
+ # Required. The Version that replaces the resource on the server.
2242
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2243
+ # The update mask applies to the resource. For the `FieldMask` definition,
2244
+ # see
2245
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
2246
+ # @yield [result, operation] Access the result along with the TransportOperation object
2247
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version]
2248
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2249
+ #
2250
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Version]
2251
+ #
2252
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2253
+ #
2254
+ # @example Basic example
2255
+ # require "google/cloud/artifact_registry/v1"
2256
+ #
2257
+ # # Create a client object. The client can be reused for multiple calls.
2258
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2259
+ #
2260
+ # # Create a request. To set request fields, pass in keyword arguments.
2261
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new
2262
+ #
2263
+ # # Call the update_version method.
2264
+ # result = client.update_version request
2265
+ #
2266
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version.
2267
+ # p result
2268
+ #
2269
+ def update_version request, options = nil
2270
+ raise ::ArgumentError, "request must be provided" if request.nil?
2271
+
2272
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest
2273
+
2274
+ # Converts hash and nil to an options object
2275
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2276
+
2277
+ # Customize the options with defaults
2278
+ call_metadata = @config.rpcs.update_version.metadata.to_h
2279
+
2280
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2281
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2282
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2283
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
2284
+ transports_version_send: [:rest]
2285
+
2286
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2287
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2288
+
2289
+ options.apply_defaults timeout: @config.rpcs.update_version.timeout,
2290
+ metadata: call_metadata,
2291
+ retry_policy: @config.rpcs.update_version.retry_policy
2292
+
2293
+ options.apply_defaults timeout: @config.timeout,
2294
+ metadata: @config.metadata,
2295
+ retry_policy: @config.retry_policy
2296
+
2297
+ @artifact_registry_stub.update_version request, options do |result, operation|
2298
+ yield result, operation if block_given?
2299
+ return result
2300
+ end
2301
+ rescue ::Gapic::Rest::Error => e
2302
+ raise ::Google::Cloud::Error.from_error(e)
2303
+ end
2304
+
2106
2305
  ##
2107
2306
  # Lists files.
2108
2307
  #
@@ -2130,15 +2329,53 @@ module Google
2130
2329
  #
2131
2330
  # * `name`
2132
2331
  # * `owner`
2332
+ # * `annotations`
2333
+ #
2334
+ # Examples of using a filter:
2335
+ #
2336
+ # To filter the results of your request to files with the name `my_file.txt`
2337
+ # in project `my-project` in the `us-central` region, in repository
2338
+ # `my-repo`, append the following filter expression to your request:
2339
+ #
2340
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"`
2133
2341
  #
2134
- # An example of using a filter:
2342
+ # You can also use wildcards to match any number of characters before or
2343
+ # after the value:
2135
2344
  #
2136
- # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an
2137
- # ID starting with "a/b/".
2138
- # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` -->
2139
- # Files owned by the version `1.0` in package `pkg1`.
2345
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"`
2346
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"`
2347
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"`
2348
+ #
2349
+ # To filter the results of your request to files owned by the version `1.0`
2350
+ # in package `pkg1`, append the following filter expression to your request:
2351
+ #
2352
+ # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"`
2353
+ #
2354
+ # To filter the results of your request to files with the annotation
2355
+ # key-value pair [`external_link`: `external_link_value`], append the
2356
+ # following filter expression to your request:
2357
+ #
2358
+ # * `"annotations.external_link:external_link_value"`
2359
+ #
2360
+ # To filter just for a specific annotation key `external_link`, append the
2361
+ # following filter expression to your request:
2362
+ #
2363
+ # * `"annotations.external_link"`
2364
+ #
2365
+ # If the annotation key or value contains special characters, you can escape
2366
+ # them by surrounding the value with backticks. For example, to filter the
2367
+ # results of your request to files with the annotation key-value pair
2368
+ # [`external.link`:`https://example.com/my-file`], append the following
2369
+ # filter expression to your request:
2370
+ #
2371
+ # * `` "annotations.`external.link`:`https://example.com/my-file`" ``
2372
+ #
2373
+ # You can also filter with annotations with a wildcard to
2374
+ # match any number of characters before or after the value:
2375
+ #
2376
+ # * `` "annotations.*_link:`*example.com*`" ``
2140
2377
  # @param page_size [::Integer]
2141
- # The maximum number of files to return.
2378
+ # The maximum number of files to return. Maximum page size is 1,000.
2142
2379
  # @param page_token [::String]
2143
2380
  # The next_page_token value returned from a previous list request, if any.
2144
2381
  # @param order_by [::String]
@@ -2287,46 +2524,32 @@ module Google
2287
2524
  end
2288
2525
 
2289
2526
  ##
2290
- # Lists tags.
2527
+ # Deletes a file and all of its content. It is only allowed on generic
2528
+ # repositories. The returned operation will complete once the file has been
2529
+ # deleted.
2291
2530
  #
2292
- # @overload list_tags(request, options = nil)
2293
- # Pass arguments to `list_tags` via a request object, either of type
2294
- # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash.
2531
+ # @overload delete_file(request, options = nil)
2532
+ # Pass arguments to `delete_file` via a request object, either of type
2533
+ # {::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest} or an equivalent Hash.
2295
2534
  #
2296
- # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash]
2535
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Hash]
2297
2536
  # A request object representing the call parameters. Required. To specify no
2298
2537
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2299
2538
  # @param options [::Gapic::CallOptions, ::Hash]
2300
2539
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2301
2540
  #
2302
- # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil)
2303
- # Pass arguments to `list_tags` via keyword arguments. Note that at
2541
+ # @overload delete_file(name: nil)
2542
+ # Pass arguments to `delete_file` via keyword arguments. Note that at
2304
2543
  # least one keyword argument is required. To specify no parameters, or to keep all
2305
2544
  # the default parameter values, pass an empty Hash as a request object (see above).
2306
2545
  #
2307
- # @param parent [::String]
2308
- # The name of the parent package whose tags will be listed.
2309
- # For example:
2310
- # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
2311
- # @param filter [::String]
2312
- # An expression for filtering the results of the request. Filter rules are
2313
- # case insensitive. The fields eligible for filtering are:
2314
- #
2315
- # * `version`
2316
- #
2317
- # An example of using a filter:
2318
- #
2319
- # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
2320
- # --> Tags that are applied to the version `1.0` in package `pkg1`.
2321
- # @param page_size [::Integer]
2322
- # The maximum number of tags to return. Maximum page size is 10,000.
2323
- # @param page_token [::String]
2324
- # The next_page_token value returned from a previous list request, if any.
2546
+ # @param name [::String]
2547
+ # Required. The name of the file to delete.
2325
2548
  # @yield [result, operation] Access the result along with the TransportOperation object
2326
- # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>]
2549
+ # @yieldparam result [::Gapic::Operation]
2327
2550
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2328
2551
  #
2329
- # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>]
2552
+ # @return [::Gapic::Operation]
2330
2553
  #
2331
2554
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2332
2555
  #
@@ -2337,28 +2560,31 @@ module Google
2337
2560
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2338
2561
  #
2339
2562
  # # Create a request. To set request fields, pass in keyword arguments.
2340
- # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new
2563
+ # request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new
2341
2564
  #
2342
- # # Call the list_tags method.
2343
- # result = client.list_tags request
2565
+ # # Call the delete_file method.
2566
+ # result = client.delete_file request
2344
2567
  #
2345
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2346
- # # over elements, and API calls will be issued to fetch pages as needed.
2347
- # result.each do |item|
2348
- # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag.
2349
- # p item
2568
+ # # The returned object is of type Gapic::Operation. You can use it to
2569
+ # # check the status of an operation, cancel it, or wait for results.
2570
+ # # Here is how to wait for a response.
2571
+ # result.wait_until_done! timeout: 60
2572
+ # if result.response?
2573
+ # p result.response
2574
+ # else
2575
+ # puts "No response received."
2350
2576
  # end
2351
2577
  #
2352
- def list_tags request, options = nil
2578
+ def delete_file request, options = nil
2353
2579
  raise ::ArgumentError, "request must be provided" if request.nil?
2354
2580
 
2355
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest
2581
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest
2356
2582
 
2357
2583
  # Converts hash and nil to an options object
2358
2584
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2359
2585
 
2360
2586
  # Customize the options with defaults
2361
- call_metadata = @config.rpcs.list_tags.metadata.to_h
2587
+ call_metadata = @config.rpcs.delete_file.metadata.to_h
2362
2588
 
2363
2589
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2364
2590
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2369,16 +2595,16 @@ module Google
2369
2595
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2370
2596
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2371
2597
 
2372
- options.apply_defaults timeout: @config.rpcs.list_tags.timeout,
2598
+ options.apply_defaults timeout: @config.rpcs.delete_file.timeout,
2373
2599
  metadata: call_metadata,
2374
- retry_policy: @config.rpcs.list_tags.retry_policy
2600
+ retry_policy: @config.rpcs.delete_file.retry_policy
2375
2601
 
2376
2602
  options.apply_defaults timeout: @config.timeout,
2377
2603
  metadata: @config.metadata,
2378
2604
  retry_policy: @config.retry_policy
2379
2605
 
2380
- @artifact_registry_stub.list_tags request, options do |result, operation|
2381
- result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, options
2606
+ @artifact_registry_stub.delete_file request, options do |result, operation|
2607
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2382
2608
  yield result, operation if block_given?
2383
2609
  return result
2384
2610
  end
@@ -2387,30 +2613,34 @@ module Google
2387
2613
  end
2388
2614
 
2389
2615
  ##
2390
- # Gets a tag.
2616
+ # Updates a file.
2391
2617
  #
2392
- # @overload get_tag(request, options = nil)
2393
- # Pass arguments to `get_tag` via a request object, either of type
2394
- # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash.
2618
+ # @overload update_file(request, options = nil)
2619
+ # Pass arguments to `update_file` via a request object, either of type
2620
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest} or an equivalent Hash.
2395
2621
  #
2396
- # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash]
2622
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Hash]
2397
2623
  # A request object representing the call parameters. Required. To specify no
2398
2624
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2399
2625
  # @param options [::Gapic::CallOptions, ::Hash]
2400
2626
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2401
2627
  #
2402
- # @overload get_tag(name: nil)
2403
- # Pass arguments to `get_tag` via keyword arguments. Note that at
2628
+ # @overload update_file(file: nil, update_mask: nil)
2629
+ # Pass arguments to `update_file` via keyword arguments. Note that at
2404
2630
  # least one keyword argument is required. To specify no parameters, or to keep all
2405
2631
  # the default parameter values, pass an empty Hash as a request object (see above).
2406
2632
  #
2407
- # @param name [::String]
2408
- # The name of the tag to retrieve.
2633
+ # @param file [::Google::Cloud::ArtifactRegistry::V1::File, ::Hash]
2634
+ # Required. The File that replaces the resource on the server.
2635
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2636
+ # Required. The update mask applies to the resource. For the `FieldMask`
2637
+ # definition, see
2638
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
2409
2639
  # @yield [result, operation] Access the result along with the TransportOperation object
2410
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag]
2640
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File]
2411
2641
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2412
2642
  #
2413
- # @return [::Google::Cloud::ArtifactRegistry::V1::Tag]
2643
+ # @return [::Google::Cloud::ArtifactRegistry::V1::File]
2414
2644
  #
2415
2645
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2416
2646
  #
@@ -2421,24 +2651,24 @@ module Google
2421
2651
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2422
2652
  #
2423
2653
  # # Create a request. To set request fields, pass in keyword arguments.
2424
- # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new
2654
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new
2425
2655
  #
2426
- # # Call the get_tag method.
2427
- # result = client.get_tag request
2656
+ # # Call the update_file method.
2657
+ # result = client.update_file request
2428
2658
  #
2429
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag.
2659
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File.
2430
2660
  # p result
2431
2661
  #
2432
- def get_tag request, options = nil
2662
+ def update_file request, options = nil
2433
2663
  raise ::ArgumentError, "request must be provided" if request.nil?
2434
2664
 
2435
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest
2665
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest
2436
2666
 
2437
2667
  # Converts hash and nil to an options object
2438
2668
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2439
2669
 
2440
2670
  # Customize the options with defaults
2441
- call_metadata = @config.rpcs.get_tag.metadata.to_h
2671
+ call_metadata = @config.rpcs.update_file.metadata.to_h
2442
2672
 
2443
2673
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2444
2674
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2449,15 +2679,15 @@ module Google
2449
2679
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2450
2680
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2451
2681
 
2452
- options.apply_defaults timeout: @config.rpcs.get_tag.timeout,
2682
+ options.apply_defaults timeout: @config.rpcs.update_file.timeout,
2453
2683
  metadata: call_metadata,
2454
- retry_policy: @config.rpcs.get_tag.retry_policy
2684
+ retry_policy: @config.rpcs.update_file.retry_policy
2455
2685
 
2456
2686
  options.apply_defaults timeout: @config.timeout,
2457
2687
  metadata: @config.metadata,
2458
2688
  retry_policy: @config.retry_policy
2459
2689
 
2460
- @artifact_registry_stub.get_tag request, options do |result, operation|
2690
+ @artifact_registry_stub.update_file request, options do |result, operation|
2461
2691
  yield result, operation if block_given?
2462
2692
  return result
2463
2693
  end
@@ -2466,34 +2696,64 @@ module Google
2466
2696
  end
2467
2697
 
2468
2698
  ##
2469
- # Creates a tag.
2699
+ # Lists tags.
2470
2700
  #
2471
- # @overload create_tag(request, options = nil)
2472
- # Pass arguments to `create_tag` via a request object, either of type
2473
- # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash.
2701
+ # @overload list_tags(request, options = nil)
2702
+ # Pass arguments to `list_tags` via a request object, either of type
2703
+ # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash.
2474
2704
  #
2475
- # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash]
2705
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash]
2476
2706
  # A request object representing the call parameters. Required. To specify no
2477
2707
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2478
2708
  # @param options [::Gapic::CallOptions, ::Hash]
2479
2709
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2480
2710
  #
2481
- # @overload create_tag(parent: nil, tag_id: nil, tag: nil)
2482
- # Pass arguments to `create_tag` via keyword arguments. Note that at
2711
+ # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil)
2712
+ # Pass arguments to `list_tags` via keyword arguments. Note that at
2483
2713
  # least one keyword argument is required. To specify no parameters, or to keep all
2484
2714
  # the default parameter values, pass an empty Hash as a request object (see above).
2485
2715
  #
2486
2716
  # @param parent [::String]
2487
- # The name of the parent resource where the tag will be created.
2488
- # @param tag_id [::String]
2489
- # The tag id to use for this repository.
2490
- # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash]
2491
- # The tag to be created.
2717
+ # The name of the parent package whose tags will be listed.
2718
+ # For example:
2719
+ # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
2720
+ # @param filter [::String]
2721
+ # An expression for filtering the results of the request. Filter rules are
2722
+ # case insensitive. The fields eligible for filtering are:
2723
+ #
2724
+ # * `name`
2725
+ # * `version`
2726
+ #
2727
+ # Examples of using a filter:
2728
+ #
2729
+ # To filter the results of your request to tags with the name `my-tag` in
2730
+ # package `my-package` in repository `my-repo` in project "`y-project` in
2731
+ # the us-central region, append the following filter expression to your
2732
+ # request:
2733
+ #
2734
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"`
2735
+ #
2736
+ # You can also use wildcards to match any number of characters before or
2737
+ # after the value:
2738
+ #
2739
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"`
2740
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"`
2741
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"`
2742
+ #
2743
+ # To filter the results of your request to tags applied to the version
2744
+ # `1.0` in package `my-package`, append the following filter expression to
2745
+ # your request:
2746
+ #
2747
+ # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"`
2748
+ # @param page_size [::Integer]
2749
+ # The maximum number of tags to return. Maximum page size is 1,000.
2750
+ # @param page_token [::String]
2751
+ # The next_page_token value returned from a previous list request, if any.
2492
2752
  # @yield [result, operation] Access the result along with the TransportOperation object
2493
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag]
2753
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>]
2494
2754
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2495
2755
  #
2496
- # @return [::Google::Cloud::ArtifactRegistry::V1::Tag]
2756
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>]
2497
2757
  #
2498
2758
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2499
2759
  #
@@ -2504,15 +2764,182 @@ module Google
2504
2764
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2505
2765
  #
2506
2766
  # # Create a request. To set request fields, pass in keyword arguments.
2507
- # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new
2767
+ # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new
2508
2768
  #
2509
- # # Call the create_tag method.
2510
- # result = client.create_tag request
2769
+ # # Call the list_tags method.
2770
+ # result = client.list_tags request
2511
2771
  #
2512
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag.
2513
- # p result
2772
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2773
+ # # over elements, and API calls will be issued to fetch pages as needed.
2774
+ # result.each do |item|
2775
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag.
2776
+ # p item
2777
+ # end
2514
2778
  #
2515
- def create_tag request, options = nil
2779
+ def list_tags request, options = nil
2780
+ raise ::ArgumentError, "request must be provided" if request.nil?
2781
+
2782
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest
2783
+
2784
+ # Converts hash and nil to an options object
2785
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2786
+
2787
+ # Customize the options with defaults
2788
+ call_metadata = @config.rpcs.list_tags.metadata.to_h
2789
+
2790
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2791
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2792
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2793
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
2794
+ transports_version_send: [:rest]
2795
+
2796
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2797
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2798
+
2799
+ options.apply_defaults timeout: @config.rpcs.list_tags.timeout,
2800
+ metadata: call_metadata,
2801
+ retry_policy: @config.rpcs.list_tags.retry_policy
2802
+
2803
+ options.apply_defaults timeout: @config.timeout,
2804
+ metadata: @config.metadata,
2805
+ retry_policy: @config.retry_policy
2806
+
2807
+ @artifact_registry_stub.list_tags request, options do |result, operation|
2808
+ result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, options
2809
+ yield result, operation if block_given?
2810
+ return result
2811
+ end
2812
+ rescue ::Gapic::Rest::Error => e
2813
+ raise ::Google::Cloud::Error.from_error(e)
2814
+ end
2815
+
2816
+ ##
2817
+ # Gets a tag.
2818
+ #
2819
+ # @overload get_tag(request, options = nil)
2820
+ # Pass arguments to `get_tag` via a request object, either of type
2821
+ # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash.
2822
+ #
2823
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash]
2824
+ # A request object representing the call parameters. Required. To specify no
2825
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2826
+ # @param options [::Gapic::CallOptions, ::Hash]
2827
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2828
+ #
2829
+ # @overload get_tag(name: nil)
2830
+ # Pass arguments to `get_tag` via keyword arguments. Note that at
2831
+ # least one keyword argument is required. To specify no parameters, or to keep all
2832
+ # the default parameter values, pass an empty Hash as a request object (see above).
2833
+ #
2834
+ # @param name [::String]
2835
+ # The name of the tag to retrieve.
2836
+ # @yield [result, operation] Access the result along with the TransportOperation object
2837
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag]
2838
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2839
+ #
2840
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Tag]
2841
+ #
2842
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2843
+ #
2844
+ # @example Basic example
2845
+ # require "google/cloud/artifact_registry/v1"
2846
+ #
2847
+ # # Create a client object. The client can be reused for multiple calls.
2848
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2849
+ #
2850
+ # # Create a request. To set request fields, pass in keyword arguments.
2851
+ # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new
2852
+ #
2853
+ # # Call the get_tag method.
2854
+ # result = client.get_tag request
2855
+ #
2856
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag.
2857
+ # p result
2858
+ #
2859
+ def get_tag request, options = nil
2860
+ raise ::ArgumentError, "request must be provided" if request.nil?
2861
+
2862
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest
2863
+
2864
+ # Converts hash and nil to an options object
2865
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2866
+
2867
+ # Customize the options with defaults
2868
+ call_metadata = @config.rpcs.get_tag.metadata.to_h
2869
+
2870
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2871
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2872
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2873
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
2874
+ transports_version_send: [:rest]
2875
+
2876
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2877
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2878
+
2879
+ options.apply_defaults timeout: @config.rpcs.get_tag.timeout,
2880
+ metadata: call_metadata,
2881
+ retry_policy: @config.rpcs.get_tag.retry_policy
2882
+
2883
+ options.apply_defaults timeout: @config.timeout,
2884
+ metadata: @config.metadata,
2885
+ retry_policy: @config.retry_policy
2886
+
2887
+ @artifact_registry_stub.get_tag request, options do |result, operation|
2888
+ yield result, operation if block_given?
2889
+ return result
2890
+ end
2891
+ rescue ::Gapic::Rest::Error => e
2892
+ raise ::Google::Cloud::Error.from_error(e)
2893
+ end
2894
+
2895
+ ##
2896
+ # Creates a tag.
2897
+ #
2898
+ # @overload create_tag(request, options = nil)
2899
+ # Pass arguments to `create_tag` via a request object, either of type
2900
+ # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash.
2901
+ #
2902
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash]
2903
+ # A request object representing the call parameters. Required. To specify no
2904
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2905
+ # @param options [::Gapic::CallOptions, ::Hash]
2906
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2907
+ #
2908
+ # @overload create_tag(parent: nil, tag_id: nil, tag: nil)
2909
+ # Pass arguments to `create_tag` via keyword arguments. Note that at
2910
+ # least one keyword argument is required. To specify no parameters, or to keep all
2911
+ # the default parameter values, pass an empty Hash as a request object (see above).
2912
+ #
2913
+ # @param parent [::String]
2914
+ # The name of the parent resource where the tag will be created.
2915
+ # @param tag_id [::String]
2916
+ # The tag id to use for this repository.
2917
+ # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash]
2918
+ # The tag to be created.
2919
+ # @yield [result, operation] Access the result along with the TransportOperation object
2920
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag]
2921
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2922
+ #
2923
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Tag]
2924
+ #
2925
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2926
+ #
2927
+ # @example Basic example
2928
+ # require "google/cloud/artifact_registry/v1"
2929
+ #
2930
+ # # Create a client object. The client can be reused for multiple calls.
2931
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2932
+ #
2933
+ # # Create a request. To set request fields, pass in keyword arguments.
2934
+ # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new
2935
+ #
2936
+ # # Call the create_tag method.
2937
+ # result = client.create_tag request
2938
+ #
2939
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag.
2940
+ # p result
2941
+ #
2942
+ def create_tag request, options = nil
2516
2943
  raise ::ArgumentError, "request must be provided" if request.nil?
2517
2944
 
2518
2945
  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest
@@ -2711,42 +3138,34 @@ module Google
2711
3138
  end
2712
3139
 
2713
3140
  ##
2714
- # Updates the IAM policy for a given resource.
3141
+ # Creates a rule.
2715
3142
  #
2716
- # @overload set_iam_policy(request, options = nil)
2717
- # Pass arguments to `set_iam_policy` via a request object, either of type
2718
- # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
3143
+ # @overload create_rule(request, options = nil)
3144
+ # Pass arguments to `create_rule` via a request object, either of type
3145
+ # {::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest} or an equivalent Hash.
2719
3146
  #
2720
- # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
3147
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Hash]
2721
3148
  # A request object representing the call parameters. Required. To specify no
2722
3149
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2723
3150
  # @param options [::Gapic::CallOptions, ::Hash]
2724
3151
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2725
3152
  #
2726
- # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
2727
- # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
3153
+ # @overload create_rule(parent: nil, rule_id: nil, rule: nil)
3154
+ # Pass arguments to `create_rule` via keyword arguments. Note that at
2728
3155
  # least one keyword argument is required. To specify no parameters, or to keep all
2729
3156
  # the default parameter values, pass an empty Hash as a request object (see above).
2730
3157
  #
2731
- # @param resource [::String]
2732
- # REQUIRED: The resource for which the policy is being specified.
2733
- # See the operation documentation for the appropriate value for this field.
2734
- # @param policy [::Google::Iam::V1::Policy, ::Hash]
2735
- # REQUIRED: The complete policy to be applied to the `resource`. The size of
2736
- # the policy is limited to a few 10s of KB. An empty policy is a
2737
- # valid policy but certain Cloud Platform services (such as Projects)
2738
- # might reject them.
2739
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2740
- # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
2741
- # the fields in the mask will be modified. If no mask is provided, the
2742
- # following default mask is used:
2743
- #
2744
- # `paths: "bindings, etag"`
3158
+ # @param parent [::String]
3159
+ # Required. The name of the parent resource where the rule will be created.
3160
+ # @param rule_id [::String]
3161
+ # The rule id to use for this repository.
3162
+ # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash]
3163
+ # The rule to be created.
2745
3164
  # @yield [result, operation] Access the result along with the TransportOperation object
2746
- # @yieldparam result [::Google::Iam::V1::Policy]
3165
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule]
2747
3166
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2748
3167
  #
2749
- # @return [::Google::Iam::V1::Policy]
3168
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Rule]
2750
3169
  #
2751
3170
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2752
3171
  #
@@ -2757,24 +3176,24 @@ module Google
2757
3176
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2758
3177
  #
2759
3178
  # # Create a request. To set request fields, pass in keyword arguments.
2760
- # request = Google::Iam::V1::SetIamPolicyRequest.new
3179
+ # request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new
2761
3180
  #
2762
- # # Call the set_iam_policy method.
2763
- # result = client.set_iam_policy request
3181
+ # # Call the create_rule method.
3182
+ # result = client.create_rule request
2764
3183
  #
2765
- # # The returned object is of type Google::Iam::V1::Policy.
3184
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule.
2766
3185
  # p result
2767
3186
  #
2768
- def set_iam_policy request, options = nil
3187
+ def create_rule request, options = nil
2769
3188
  raise ::ArgumentError, "request must be provided" if request.nil?
2770
3189
 
2771
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
3190
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest
2772
3191
 
2773
3192
  # Converts hash and nil to an options object
2774
3193
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2775
3194
 
2776
3195
  # Customize the options with defaults
2777
- call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
3196
+ call_metadata = @config.rpcs.create_rule.metadata.to_h
2778
3197
 
2779
3198
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2780
3199
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2785,15 +3204,844 @@ module Google
2785
3204
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2786
3205
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2787
3206
 
2788
- options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
3207
+ options.apply_defaults timeout: @config.rpcs.create_rule.timeout,
3208
+ metadata: call_metadata,
3209
+ retry_policy: @config.rpcs.create_rule.retry_policy
3210
+
3211
+ options.apply_defaults timeout: @config.timeout,
3212
+ metadata: @config.metadata,
3213
+ retry_policy: @config.retry_policy
3214
+
3215
+ @artifact_registry_stub.create_rule request, options do |result, operation|
3216
+ yield result, operation if block_given?
3217
+ return result
3218
+ end
3219
+ rescue ::Gapic::Rest::Error => e
3220
+ raise ::Google::Cloud::Error.from_error(e)
3221
+ end
3222
+
3223
+ ##
3224
+ # Lists rules.
3225
+ #
3226
+ # @overload list_rules(request, options = nil)
3227
+ # Pass arguments to `list_rules` via a request object, either of type
3228
+ # {::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest} or an equivalent Hash.
3229
+ #
3230
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Hash]
3231
+ # A request object representing the call parameters. Required. To specify no
3232
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3233
+ # @param options [::Gapic::CallOptions, ::Hash]
3234
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3235
+ #
3236
+ # @overload list_rules(parent: nil, page_size: nil, page_token: nil)
3237
+ # Pass arguments to `list_rules` via keyword arguments. Note that at
3238
+ # least one keyword argument is required. To specify no parameters, or to keep all
3239
+ # the default parameter values, pass an empty Hash as a request object (see above).
3240
+ #
3241
+ # @param parent [::String]
3242
+ # Required. The name of the parent repository whose rules will be listed.
3243
+ # For example:
3244
+ # `projects/p1/locations/us-central1/repositories/repo1`.
3245
+ # @param page_size [::Integer]
3246
+ # The maximum number of rules to return. Maximum page size is 1,000.
3247
+ # @param page_token [::String]
3248
+ # The next_page_token value returned from a previous list request, if any.
3249
+ # @yield [result, operation] Access the result along with the TransportOperation object
3250
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>]
3251
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3252
+ #
3253
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>]
3254
+ #
3255
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3256
+ #
3257
+ # @example Basic example
3258
+ # require "google/cloud/artifact_registry/v1"
3259
+ #
3260
+ # # Create a client object. The client can be reused for multiple calls.
3261
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3262
+ #
3263
+ # # Create a request. To set request fields, pass in keyword arguments.
3264
+ # request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new
3265
+ #
3266
+ # # Call the list_rules method.
3267
+ # result = client.list_rules request
3268
+ #
3269
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3270
+ # # over elements, and API calls will be issued to fetch pages as needed.
3271
+ # result.each do |item|
3272
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule.
3273
+ # p item
3274
+ # end
3275
+ #
3276
+ def list_rules request, options = nil
3277
+ raise ::ArgumentError, "request must be provided" if request.nil?
3278
+
3279
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest
3280
+
3281
+ # Converts hash and nil to an options object
3282
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3283
+
3284
+ # Customize the options with defaults
3285
+ call_metadata = @config.rpcs.list_rules.metadata.to_h
3286
+
3287
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3288
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3289
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3290
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3291
+ transports_version_send: [:rest]
3292
+
3293
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3294
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3295
+
3296
+ options.apply_defaults timeout: @config.rpcs.list_rules.timeout,
3297
+ metadata: call_metadata,
3298
+ retry_policy: @config.rpcs.list_rules.retry_policy
3299
+
3300
+ options.apply_defaults timeout: @config.timeout,
3301
+ metadata: @config.metadata,
3302
+ retry_policy: @config.retry_policy
3303
+
3304
+ @artifact_registry_stub.list_rules request, options do |result, operation|
3305
+ result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_rules, "rules", request, result, options
3306
+ yield result, operation if block_given?
3307
+ return result
3308
+ end
3309
+ rescue ::Gapic::Rest::Error => e
3310
+ raise ::Google::Cloud::Error.from_error(e)
3311
+ end
3312
+
3313
+ ##
3314
+ # Gets a rule.
3315
+ #
3316
+ # @overload get_rule(request, options = nil)
3317
+ # Pass arguments to `get_rule` via a request object, either of type
3318
+ # {::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest} or an equivalent Hash.
3319
+ #
3320
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Hash]
3321
+ # A request object representing the call parameters. Required. To specify no
3322
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3323
+ # @param options [::Gapic::CallOptions, ::Hash]
3324
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3325
+ #
3326
+ # @overload get_rule(name: nil)
3327
+ # Pass arguments to `get_rule` via keyword arguments. Note that at
3328
+ # least one keyword argument is required. To specify no parameters, or to keep all
3329
+ # the default parameter values, pass an empty Hash as a request object (see above).
3330
+ #
3331
+ # @param name [::String]
3332
+ # Required. The name of the rule to retrieve.
3333
+ # @yield [result, operation] Access the result along with the TransportOperation object
3334
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule]
3335
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3336
+ #
3337
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Rule]
3338
+ #
3339
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3340
+ #
3341
+ # @example Basic example
3342
+ # require "google/cloud/artifact_registry/v1"
3343
+ #
3344
+ # # Create a client object. The client can be reused for multiple calls.
3345
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3346
+ #
3347
+ # # Create a request. To set request fields, pass in keyword arguments.
3348
+ # request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new
3349
+ #
3350
+ # # Call the get_rule method.
3351
+ # result = client.get_rule request
3352
+ #
3353
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule.
3354
+ # p result
3355
+ #
3356
+ def get_rule request, options = nil
3357
+ raise ::ArgumentError, "request must be provided" if request.nil?
3358
+
3359
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest
3360
+
3361
+ # Converts hash and nil to an options object
3362
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3363
+
3364
+ # Customize the options with defaults
3365
+ call_metadata = @config.rpcs.get_rule.metadata.to_h
3366
+
3367
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3368
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3369
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3370
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3371
+ transports_version_send: [:rest]
3372
+
3373
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3374
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3375
+
3376
+ options.apply_defaults timeout: @config.rpcs.get_rule.timeout,
3377
+ metadata: call_metadata,
3378
+ retry_policy: @config.rpcs.get_rule.retry_policy
3379
+
3380
+ options.apply_defaults timeout: @config.timeout,
3381
+ metadata: @config.metadata,
3382
+ retry_policy: @config.retry_policy
3383
+
3384
+ @artifact_registry_stub.get_rule request, options do |result, operation|
3385
+ yield result, operation if block_given?
3386
+ return result
3387
+ end
3388
+ rescue ::Gapic::Rest::Error => e
3389
+ raise ::Google::Cloud::Error.from_error(e)
3390
+ end
3391
+
3392
+ ##
3393
+ # Updates a rule.
3394
+ #
3395
+ # @overload update_rule(request, options = nil)
3396
+ # Pass arguments to `update_rule` via a request object, either of type
3397
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest} or an equivalent Hash.
3398
+ #
3399
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Hash]
3400
+ # A request object representing the call parameters. Required. To specify no
3401
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3402
+ # @param options [::Gapic::CallOptions, ::Hash]
3403
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3404
+ #
3405
+ # @overload update_rule(rule: nil, update_mask: nil)
3406
+ # Pass arguments to `update_rule` via keyword arguments. Note that at
3407
+ # least one keyword argument is required. To specify no parameters, or to keep all
3408
+ # the default parameter values, pass an empty Hash as a request object (see above).
3409
+ #
3410
+ # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash]
3411
+ # The rule that replaces the resource on the server.
3412
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3413
+ # The update mask applies to the resource. For the `FieldMask` definition,
3414
+ # see
3415
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
3416
+ # @yield [result, operation] Access the result along with the TransportOperation object
3417
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule]
3418
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3419
+ #
3420
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Rule]
3421
+ #
3422
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3423
+ #
3424
+ # @example Basic example
3425
+ # require "google/cloud/artifact_registry/v1"
3426
+ #
3427
+ # # Create a client object. The client can be reused for multiple calls.
3428
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3429
+ #
3430
+ # # Create a request. To set request fields, pass in keyword arguments.
3431
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new
3432
+ #
3433
+ # # Call the update_rule method.
3434
+ # result = client.update_rule request
3435
+ #
3436
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule.
3437
+ # p result
3438
+ #
3439
+ def update_rule request, options = nil
3440
+ raise ::ArgumentError, "request must be provided" if request.nil?
3441
+
3442
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest
3443
+
3444
+ # Converts hash and nil to an options object
3445
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3446
+
3447
+ # Customize the options with defaults
3448
+ call_metadata = @config.rpcs.update_rule.metadata.to_h
3449
+
3450
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3451
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3452
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3453
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3454
+ transports_version_send: [:rest]
3455
+
3456
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3457
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3458
+
3459
+ options.apply_defaults timeout: @config.rpcs.update_rule.timeout,
3460
+ metadata: call_metadata,
3461
+ retry_policy: @config.rpcs.update_rule.retry_policy
3462
+
3463
+ options.apply_defaults timeout: @config.timeout,
3464
+ metadata: @config.metadata,
3465
+ retry_policy: @config.retry_policy
3466
+
3467
+ @artifact_registry_stub.update_rule request, options do |result, operation|
3468
+ yield result, operation if block_given?
3469
+ return result
3470
+ end
3471
+ rescue ::Gapic::Rest::Error => e
3472
+ raise ::Google::Cloud::Error.from_error(e)
3473
+ end
3474
+
3475
+ ##
3476
+ # Deletes a rule.
3477
+ #
3478
+ # @overload delete_rule(request, options = nil)
3479
+ # Pass arguments to `delete_rule` via a request object, either of type
3480
+ # {::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest} or an equivalent Hash.
3481
+ #
3482
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Hash]
3483
+ # A request object representing the call parameters. Required. To specify no
3484
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3485
+ # @param options [::Gapic::CallOptions, ::Hash]
3486
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3487
+ #
3488
+ # @overload delete_rule(name: nil)
3489
+ # Pass arguments to `delete_rule` via keyword arguments. Note that at
3490
+ # least one keyword argument is required. To specify no parameters, or to keep all
3491
+ # the default parameter values, pass an empty Hash as a request object (see above).
3492
+ #
3493
+ # @param name [::String]
3494
+ # Required. The name of the rule to delete.
3495
+ # @yield [result, operation] Access the result along with the TransportOperation object
3496
+ # @yieldparam result [::Google::Protobuf::Empty]
3497
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3498
+ #
3499
+ # @return [::Google::Protobuf::Empty]
3500
+ #
3501
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3502
+ #
3503
+ # @example Basic example
3504
+ # require "google/cloud/artifact_registry/v1"
3505
+ #
3506
+ # # Create a client object. The client can be reused for multiple calls.
3507
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3508
+ #
3509
+ # # Create a request. To set request fields, pass in keyword arguments.
3510
+ # request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new
3511
+ #
3512
+ # # Call the delete_rule method.
3513
+ # result = client.delete_rule request
3514
+ #
3515
+ # # The returned object is of type Google::Protobuf::Empty.
3516
+ # p result
3517
+ #
3518
+ def delete_rule request, options = nil
3519
+ raise ::ArgumentError, "request must be provided" if request.nil?
3520
+
3521
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest
3522
+
3523
+ # Converts hash and nil to an options object
3524
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3525
+
3526
+ # Customize the options with defaults
3527
+ call_metadata = @config.rpcs.delete_rule.metadata.to_h
3528
+
3529
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3530
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3531
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3532
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3533
+ transports_version_send: [:rest]
3534
+
3535
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3536
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3537
+
3538
+ options.apply_defaults timeout: @config.rpcs.delete_rule.timeout,
3539
+ metadata: call_metadata,
3540
+ retry_policy: @config.rpcs.delete_rule.retry_policy
3541
+
3542
+ options.apply_defaults timeout: @config.timeout,
3543
+ metadata: @config.metadata,
3544
+ retry_policy: @config.retry_policy
3545
+
3546
+ @artifact_registry_stub.delete_rule request, options do |result, operation|
3547
+ yield result, operation if block_given?
3548
+ return result
3549
+ end
3550
+ rescue ::Gapic::Rest::Error => e
3551
+ raise ::Google::Cloud::Error.from_error(e)
3552
+ end
3553
+
3554
+ ##
3555
+ # Updates the IAM policy for a given resource.
3556
+ #
3557
+ # @overload set_iam_policy(request, options = nil)
3558
+ # Pass arguments to `set_iam_policy` via a request object, either of type
3559
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
3560
+ #
3561
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
3562
+ # A request object representing the call parameters. Required. To specify no
3563
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3564
+ # @param options [::Gapic::CallOptions, ::Hash]
3565
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3566
+ #
3567
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
3568
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
3569
+ # least one keyword argument is required. To specify no parameters, or to keep all
3570
+ # the default parameter values, pass an empty Hash as a request object (see above).
3571
+ #
3572
+ # @param resource [::String]
3573
+ # REQUIRED: The resource for which the policy is being specified.
3574
+ # See the operation documentation for the appropriate value for this field.
3575
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
3576
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
3577
+ # the policy is limited to a few 10s of KB. An empty policy is a
3578
+ # valid policy but certain Cloud Platform services (such as Projects)
3579
+ # might reject them.
3580
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3581
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
3582
+ # the fields in the mask will be modified. If no mask is provided, the
3583
+ # following default mask is used:
3584
+ #
3585
+ # `paths: "bindings, etag"`
3586
+ # @yield [result, operation] Access the result along with the TransportOperation object
3587
+ # @yieldparam result [::Google::Iam::V1::Policy]
3588
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3589
+ #
3590
+ # @return [::Google::Iam::V1::Policy]
3591
+ #
3592
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3593
+ #
3594
+ # @example Basic example
3595
+ # require "google/cloud/artifact_registry/v1"
3596
+ #
3597
+ # # Create a client object. The client can be reused for multiple calls.
3598
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3599
+ #
3600
+ # # Create a request. To set request fields, pass in keyword arguments.
3601
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
3602
+ #
3603
+ # # Call the set_iam_policy method.
3604
+ # result = client.set_iam_policy request
3605
+ #
3606
+ # # The returned object is of type Google::Iam::V1::Policy.
3607
+ # p result
3608
+ #
3609
+ def set_iam_policy request, options = nil
3610
+ raise ::ArgumentError, "request must be provided" if request.nil?
3611
+
3612
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
3613
+
3614
+ # Converts hash and nil to an options object
3615
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3616
+
3617
+ # Customize the options with defaults
3618
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
3619
+
3620
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3621
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3622
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3623
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3624
+ transports_version_send: [:rest]
3625
+
3626
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3627
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3628
+
3629
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
3630
+ metadata: call_metadata,
3631
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
3632
+
3633
+ options.apply_defaults timeout: @config.timeout,
3634
+ metadata: @config.metadata,
3635
+ retry_policy: @config.retry_policy
3636
+
3637
+ @artifact_registry_stub.set_iam_policy request, options do |result, operation|
3638
+ yield result, operation if block_given?
3639
+ return result
3640
+ end
3641
+ rescue ::Gapic::Rest::Error => e
3642
+ raise ::Google::Cloud::Error.from_error(e)
3643
+ end
3644
+
3645
+ ##
3646
+ # Gets the IAM policy for a given resource.
3647
+ #
3648
+ # @overload get_iam_policy(request, options = nil)
3649
+ # Pass arguments to `get_iam_policy` via a request object, either of type
3650
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
3651
+ #
3652
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
3653
+ # A request object representing the call parameters. Required. To specify no
3654
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3655
+ # @param options [::Gapic::CallOptions, ::Hash]
3656
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3657
+ #
3658
+ # @overload get_iam_policy(resource: nil, options: nil)
3659
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
3660
+ # least one keyword argument is required. To specify no parameters, or to keep all
3661
+ # the default parameter values, pass an empty Hash as a request object (see above).
3662
+ #
3663
+ # @param resource [::String]
3664
+ # REQUIRED: The resource for which the policy is being requested.
3665
+ # See the operation documentation for the appropriate value for this field.
3666
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
3667
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
3668
+ # `GetIamPolicy`.
3669
+ # @yield [result, operation] Access the result along with the TransportOperation object
3670
+ # @yieldparam result [::Google::Iam::V1::Policy]
3671
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3672
+ #
3673
+ # @return [::Google::Iam::V1::Policy]
3674
+ #
3675
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3676
+ #
3677
+ # @example Basic example
3678
+ # require "google/cloud/artifact_registry/v1"
3679
+ #
3680
+ # # Create a client object. The client can be reused for multiple calls.
3681
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3682
+ #
3683
+ # # Create a request. To set request fields, pass in keyword arguments.
3684
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
3685
+ #
3686
+ # # Call the get_iam_policy method.
3687
+ # result = client.get_iam_policy request
3688
+ #
3689
+ # # The returned object is of type Google::Iam::V1::Policy.
3690
+ # p result
3691
+ #
3692
+ def get_iam_policy request, options = nil
3693
+ raise ::ArgumentError, "request must be provided" if request.nil?
3694
+
3695
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
3696
+
3697
+ # Converts hash and nil to an options object
3698
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3699
+
3700
+ # Customize the options with defaults
3701
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
3702
+
3703
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3704
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3705
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3706
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3707
+ transports_version_send: [:rest]
3708
+
3709
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3710
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3711
+
3712
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
3713
+ metadata: call_metadata,
3714
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
3715
+
3716
+ options.apply_defaults timeout: @config.timeout,
3717
+ metadata: @config.metadata,
3718
+ retry_policy: @config.retry_policy
3719
+
3720
+ @artifact_registry_stub.get_iam_policy request, options do |result, operation|
3721
+ yield result, operation if block_given?
3722
+ return result
3723
+ end
3724
+ rescue ::Gapic::Rest::Error => e
3725
+ raise ::Google::Cloud::Error.from_error(e)
3726
+ end
3727
+
3728
+ ##
3729
+ # Tests if the caller has a list of permissions on a resource.
3730
+ #
3731
+ # @overload test_iam_permissions(request, options = nil)
3732
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
3733
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
3734
+ #
3735
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
3736
+ # A request object representing the call parameters. Required. To specify no
3737
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3738
+ # @param options [::Gapic::CallOptions, ::Hash]
3739
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3740
+ #
3741
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
3742
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
3743
+ # least one keyword argument is required. To specify no parameters, or to keep all
3744
+ # the default parameter values, pass an empty Hash as a request object (see above).
3745
+ #
3746
+ # @param resource [::String]
3747
+ # REQUIRED: The resource for which the policy detail is being requested.
3748
+ # See the operation documentation for the appropriate value for this field.
3749
+ # @param permissions [::Array<::String>]
3750
+ # The set of permissions to check for the `resource`. Permissions with
3751
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
3752
+ # information see
3753
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
3754
+ # @yield [result, operation] Access the result along with the TransportOperation object
3755
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
3756
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3757
+ #
3758
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
3759
+ #
3760
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3761
+ #
3762
+ # @example Basic example
3763
+ # require "google/cloud/artifact_registry/v1"
3764
+ #
3765
+ # # Create a client object. The client can be reused for multiple calls.
3766
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3767
+ #
3768
+ # # Create a request. To set request fields, pass in keyword arguments.
3769
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
3770
+ #
3771
+ # # Call the test_iam_permissions method.
3772
+ # result = client.test_iam_permissions request
3773
+ #
3774
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
3775
+ # p result
3776
+ #
3777
+ def test_iam_permissions request, options = nil
3778
+ raise ::ArgumentError, "request must be provided" if request.nil?
3779
+
3780
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
3781
+
3782
+ # Converts hash and nil to an options object
3783
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3784
+
3785
+ # Customize the options with defaults
3786
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
3787
+
3788
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3789
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3790
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3791
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3792
+ transports_version_send: [:rest]
3793
+
3794
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3795
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3796
+
3797
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
3798
+ metadata: call_metadata,
3799
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
3800
+
3801
+ options.apply_defaults timeout: @config.timeout,
3802
+ metadata: @config.metadata,
3803
+ retry_policy: @config.retry_policy
3804
+
3805
+ @artifact_registry_stub.test_iam_permissions request, options do |result, operation|
3806
+ yield result, operation if block_given?
3807
+ return result
3808
+ end
3809
+ rescue ::Gapic::Rest::Error => e
3810
+ raise ::Google::Cloud::Error.from_error(e)
3811
+ end
3812
+
3813
+ ##
3814
+ # Retrieves the Settings for the Project.
3815
+ #
3816
+ # @overload get_project_settings(request, options = nil)
3817
+ # Pass arguments to `get_project_settings` via a request object, either of type
3818
+ # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash.
3819
+ #
3820
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash]
3821
+ # A request object representing the call parameters. Required. To specify no
3822
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3823
+ # @param options [::Gapic::CallOptions, ::Hash]
3824
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3825
+ #
3826
+ # @overload get_project_settings(name: nil)
3827
+ # Pass arguments to `get_project_settings` via keyword arguments. Note that at
3828
+ # least one keyword argument is required. To specify no parameters, or to keep all
3829
+ # the default parameter values, pass an empty Hash as a request object (see above).
3830
+ #
3831
+ # @param name [::String]
3832
+ # Required. The name of the projectSettings resource.
3833
+ # @yield [result, operation] Access the result along with the TransportOperation object
3834
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
3835
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3836
+ #
3837
+ # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
3838
+ #
3839
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3840
+ #
3841
+ # @example Basic example
3842
+ # require "google/cloud/artifact_registry/v1"
3843
+ #
3844
+ # # Create a client object. The client can be reused for multiple calls.
3845
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3846
+ #
3847
+ # # Create a request. To set request fields, pass in keyword arguments.
3848
+ # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new
3849
+ #
3850
+ # # Call the get_project_settings method.
3851
+ # result = client.get_project_settings request
3852
+ #
3853
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings.
3854
+ # p result
3855
+ #
3856
+ def get_project_settings request, options = nil
3857
+ raise ::ArgumentError, "request must be provided" if request.nil?
3858
+
3859
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest
3860
+
3861
+ # Converts hash and nil to an options object
3862
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3863
+
3864
+ # Customize the options with defaults
3865
+ call_metadata = @config.rpcs.get_project_settings.metadata.to_h
3866
+
3867
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3868
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3869
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3870
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3871
+ transports_version_send: [:rest]
3872
+
3873
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3874
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3875
+
3876
+ options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout,
3877
+ metadata: call_metadata,
3878
+ retry_policy: @config.rpcs.get_project_settings.retry_policy
3879
+
3880
+ options.apply_defaults timeout: @config.timeout,
3881
+ metadata: @config.metadata,
3882
+ retry_policy: @config.retry_policy
3883
+
3884
+ @artifact_registry_stub.get_project_settings request, options do |result, operation|
3885
+ yield result, operation if block_given?
3886
+ return result
3887
+ end
3888
+ rescue ::Gapic::Rest::Error => e
3889
+ raise ::Google::Cloud::Error.from_error(e)
3890
+ end
3891
+
3892
+ ##
3893
+ # Updates the Settings for the Project.
3894
+ #
3895
+ # @overload update_project_settings(request, options = nil)
3896
+ # Pass arguments to `update_project_settings` via a request object, either of type
3897
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash.
3898
+ #
3899
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash]
3900
+ # A request object representing the call parameters. Required. To specify no
3901
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3902
+ # @param options [::Gapic::CallOptions, ::Hash]
3903
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3904
+ #
3905
+ # @overload update_project_settings(project_settings: nil, update_mask: nil)
3906
+ # Pass arguments to `update_project_settings` via keyword arguments. Note that at
3907
+ # least one keyword argument is required. To specify no parameters, or to keep all
3908
+ # the default parameter values, pass an empty Hash as a request object (see above).
3909
+ #
3910
+ # @param project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash]
3911
+ # The project settings.
3912
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3913
+ # Field mask to support partial updates.
3914
+ # @yield [result, operation] Access the result along with the TransportOperation object
3915
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
3916
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3917
+ #
3918
+ # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
3919
+ #
3920
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3921
+ #
3922
+ # @example Basic example
3923
+ # require "google/cloud/artifact_registry/v1"
3924
+ #
3925
+ # # Create a client object. The client can be reused for multiple calls.
3926
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3927
+ #
3928
+ # # Create a request. To set request fields, pass in keyword arguments.
3929
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new
3930
+ #
3931
+ # # Call the update_project_settings method.
3932
+ # result = client.update_project_settings request
3933
+ #
3934
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings.
3935
+ # p result
3936
+ #
3937
+ def update_project_settings request, options = nil
3938
+ raise ::ArgumentError, "request must be provided" if request.nil?
3939
+
3940
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest
3941
+
3942
+ # Converts hash and nil to an options object
3943
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3944
+
3945
+ # Customize the options with defaults
3946
+ call_metadata = @config.rpcs.update_project_settings.metadata.to_h
3947
+
3948
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3949
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3950
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3951
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3952
+ transports_version_send: [:rest]
3953
+
3954
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3955
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3956
+
3957
+ options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout,
3958
+ metadata: call_metadata,
3959
+ retry_policy: @config.rpcs.update_project_settings.retry_policy
3960
+
3961
+ options.apply_defaults timeout: @config.timeout,
3962
+ metadata: @config.metadata,
3963
+ retry_policy: @config.retry_policy
3964
+
3965
+ @artifact_registry_stub.update_project_settings request, options do |result, operation|
3966
+ yield result, operation if block_given?
3967
+ return result
3968
+ end
3969
+ rescue ::Gapic::Rest::Error => e
3970
+ raise ::Google::Cloud::Error.from_error(e)
3971
+ end
3972
+
3973
+ ##
3974
+ # Retrieves the VPCSC Config for the Project.
3975
+ #
3976
+ # @overload get_vpcsc_config(request, options = nil)
3977
+ # Pass arguments to `get_vpcsc_config` via a request object, either of type
3978
+ # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash.
3979
+ #
3980
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash]
3981
+ # A request object representing the call parameters. Required. To specify no
3982
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3983
+ # @param options [::Gapic::CallOptions, ::Hash]
3984
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3985
+ #
3986
+ # @overload get_vpcsc_config(name: nil)
3987
+ # Pass arguments to `get_vpcsc_config` via keyword arguments. Note that at
3988
+ # least one keyword argument is required. To specify no parameters, or to keep all
3989
+ # the default parameter values, pass an empty Hash as a request object (see above).
3990
+ #
3991
+ # @param name [::String]
3992
+ # Required. The name of the VPCSCConfig resource.
3993
+ # @yield [result, operation] Access the result along with the TransportOperation object
3994
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3995
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3996
+ #
3997
+ # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3998
+ #
3999
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4000
+ #
4001
+ # @example Basic example
4002
+ # require "google/cloud/artifact_registry/v1"
4003
+ #
4004
+ # # Create a client object. The client can be reused for multiple calls.
4005
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
4006
+ #
4007
+ # # Create a request. To set request fields, pass in keyword arguments.
4008
+ # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new
4009
+ #
4010
+ # # Call the get_vpcsc_config method.
4011
+ # result = client.get_vpcsc_config request
4012
+ #
4013
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
4014
+ # p result
4015
+ #
4016
+ def get_vpcsc_config request, options = nil
4017
+ raise ::ArgumentError, "request must be provided" if request.nil?
4018
+
4019
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest
4020
+
4021
+ # Converts hash and nil to an options object
4022
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4023
+
4024
+ # Customize the options with defaults
4025
+ call_metadata = @config.rpcs.get_vpcsc_config.metadata.to_h
4026
+
4027
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4028
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4029
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4030
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
4031
+ transports_version_send: [:rest]
4032
+
4033
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4034
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4035
+
4036
+ options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout,
2789
4037
  metadata: call_metadata,
2790
- retry_policy: @config.rpcs.set_iam_policy.retry_policy
4038
+ retry_policy: @config.rpcs.get_vpcsc_config.retry_policy
2791
4039
 
2792
4040
  options.apply_defaults timeout: @config.timeout,
2793
4041
  metadata: @config.metadata,
2794
4042
  retry_policy: @config.retry_policy
2795
4043
 
2796
- @artifact_registry_stub.set_iam_policy request, options do |result, operation|
4044
+ @artifact_registry_stub.get_vpcsc_config request, options do |result, operation|
2797
4045
  yield result, operation if block_given?
2798
4046
  return result
2799
4047
  end
@@ -2802,34 +4050,32 @@ module Google
2802
4050
  end
2803
4051
 
2804
4052
  ##
2805
- # Gets the IAM policy for a given resource.
4053
+ # Updates the VPCSC Config for the Project.
2806
4054
  #
2807
- # @overload get_iam_policy(request, options = nil)
2808
- # Pass arguments to `get_iam_policy` via a request object, either of type
2809
- # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
4055
+ # @overload update_vpcsc_config(request, options = nil)
4056
+ # Pass arguments to `update_vpcsc_config` via a request object, either of type
4057
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash.
2810
4058
  #
2811
- # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
4059
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash]
2812
4060
  # A request object representing the call parameters. Required. To specify no
2813
4061
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2814
4062
  # @param options [::Gapic::CallOptions, ::Hash]
2815
4063
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2816
4064
  #
2817
- # @overload get_iam_policy(resource: nil, options: nil)
2818
- # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
4065
+ # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil)
4066
+ # Pass arguments to `update_vpcsc_config` via keyword arguments. Note that at
2819
4067
  # least one keyword argument is required. To specify no parameters, or to keep all
2820
4068
  # the default parameter values, pass an empty Hash as a request object (see above).
2821
4069
  #
2822
- # @param resource [::String]
2823
- # REQUIRED: The resource for which the policy is being requested.
2824
- # See the operation documentation for the appropriate value for this field.
2825
- # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
2826
- # OPTIONAL: A `GetPolicyOptions` object for specifying options to
2827
- # `GetIamPolicy`.
4070
+ # @param vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash]
4071
+ # The project config.
4072
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
4073
+ # Field mask to support partial updates.
2828
4074
  # @yield [result, operation] Access the result along with the TransportOperation object
2829
- # @yieldparam result [::Google::Iam::V1::Policy]
4075
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
2830
4076
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2831
4077
  #
2832
- # @return [::Google::Iam::V1::Policy]
4078
+ # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
2833
4079
  #
2834
4080
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2835
4081
  #
@@ -2840,24 +4086,24 @@ module Google
2840
4086
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2841
4087
  #
2842
4088
  # # Create a request. To set request fields, pass in keyword arguments.
2843
- # request = Google::Iam::V1::GetIamPolicyRequest.new
4089
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new
2844
4090
  #
2845
- # # Call the get_iam_policy method.
2846
- # result = client.get_iam_policy request
4091
+ # # Call the update_vpcsc_config method.
4092
+ # result = client.update_vpcsc_config request
2847
4093
  #
2848
- # # The returned object is of type Google::Iam::V1::Policy.
4094
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
2849
4095
  # p result
2850
4096
  #
2851
- def get_iam_policy request, options = nil
4097
+ def update_vpcsc_config request, options = nil
2852
4098
  raise ::ArgumentError, "request must be provided" if request.nil?
2853
4099
 
2854
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
4100
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest
2855
4101
 
2856
4102
  # Converts hash and nil to an options object
2857
4103
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2858
4104
 
2859
4105
  # Customize the options with defaults
2860
- call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
4106
+ call_metadata = @config.rpcs.update_vpcsc_config.metadata.to_h
2861
4107
 
2862
4108
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2863
4109
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2868,15 +4114,15 @@ module Google
2868
4114
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2869
4115
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2870
4116
 
2871
- options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
4117
+ options.apply_defaults timeout: @config.rpcs.update_vpcsc_config.timeout,
2872
4118
  metadata: call_metadata,
2873
- retry_policy: @config.rpcs.get_iam_policy.retry_policy
4119
+ retry_policy: @config.rpcs.update_vpcsc_config.retry_policy
2874
4120
 
2875
4121
  options.apply_defaults timeout: @config.timeout,
2876
4122
  metadata: @config.metadata,
2877
4123
  retry_policy: @config.retry_policy
2878
4124
 
2879
- @artifact_registry_stub.get_iam_policy request, options do |result, operation|
4125
+ @artifact_registry_stub.update_vpcsc_config request, options do |result, operation|
2880
4126
  yield result, operation if block_given?
2881
4127
  return result
2882
4128
  end
@@ -2885,36 +4131,34 @@ module Google
2885
4131
  end
2886
4132
 
2887
4133
  ##
2888
- # Tests if the caller has a list of permissions on a resource.
4134
+ # Updates a package.
2889
4135
  #
2890
- # @overload test_iam_permissions(request, options = nil)
2891
- # Pass arguments to `test_iam_permissions` via a request object, either of type
2892
- # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
4136
+ # @overload update_package(request, options = nil)
4137
+ # Pass arguments to `update_package` via a request object, either of type
4138
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest} or an equivalent Hash.
2893
4139
  #
2894
- # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
4140
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Hash]
2895
4141
  # A request object representing the call parameters. Required. To specify no
2896
4142
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2897
4143
  # @param options [::Gapic::CallOptions, ::Hash]
2898
4144
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2899
4145
  #
2900
- # @overload test_iam_permissions(resource: nil, permissions: nil)
2901
- # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
4146
+ # @overload update_package(package: nil, update_mask: nil)
4147
+ # Pass arguments to `update_package` via keyword arguments. Note that at
2902
4148
  # least one keyword argument is required. To specify no parameters, or to keep all
2903
4149
  # the default parameter values, pass an empty Hash as a request object (see above).
2904
4150
  #
2905
- # @param resource [::String]
2906
- # REQUIRED: The resource for which the policy detail is being requested.
2907
- # See the operation documentation for the appropriate value for this field.
2908
- # @param permissions [::Array<::String>]
2909
- # The set of permissions to check for the `resource`. Permissions with
2910
- # wildcards (such as '*' or 'storage.*') are not allowed. For more
2911
- # information see
2912
- # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
4151
+ # @param package [::Google::Cloud::ArtifactRegistry::V1::Package, ::Hash]
4152
+ # The package that replaces the resource on the server.
4153
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
4154
+ # The update mask applies to the resource. For the `FieldMask` definition,
4155
+ # see
4156
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
2913
4157
  # @yield [result, operation] Access the result along with the TransportOperation object
2914
- # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
4158
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package]
2915
4159
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2916
4160
  #
2917
- # @return [::Google::Iam::V1::TestIamPermissionsResponse]
4161
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Package]
2918
4162
  #
2919
4163
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2920
4164
  #
@@ -2925,24 +4169,24 @@ module Google
2925
4169
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2926
4170
  #
2927
4171
  # # Create a request. To set request fields, pass in keyword arguments.
2928
- # request = Google::Iam::V1::TestIamPermissionsRequest.new
4172
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new
2929
4173
  #
2930
- # # Call the test_iam_permissions method.
2931
- # result = client.test_iam_permissions request
4174
+ # # Call the update_package method.
4175
+ # result = client.update_package request
2932
4176
  #
2933
- # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
4177
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package.
2934
4178
  # p result
2935
4179
  #
2936
- def test_iam_permissions request, options = nil
4180
+ def update_package request, options = nil
2937
4181
  raise ::ArgumentError, "request must be provided" if request.nil?
2938
4182
 
2939
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
4183
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest
2940
4184
 
2941
4185
  # Converts hash and nil to an options object
2942
4186
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2943
4187
 
2944
4188
  # Customize the options with defaults
2945
- call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
4189
+ call_metadata = @config.rpcs.update_package.metadata.to_h
2946
4190
 
2947
4191
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2948
4192
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2953,15 +4197,15 @@ module Google
2953
4197
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2954
4198
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2955
4199
 
2956
- options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
4200
+ options.apply_defaults timeout: @config.rpcs.update_package.timeout,
2957
4201
  metadata: call_metadata,
2958
- retry_policy: @config.rpcs.test_iam_permissions.retry_policy
4202
+ retry_policy: @config.rpcs.update_package.retry_policy
2959
4203
 
2960
4204
  options.apply_defaults timeout: @config.timeout,
2961
4205
  metadata: @config.metadata,
2962
4206
  retry_policy: @config.retry_policy
2963
4207
 
2964
- @artifact_registry_stub.test_iam_permissions request, options do |result, operation|
4208
+ @artifact_registry_stub.update_package request, options do |result, operation|
2965
4209
  yield result, operation if block_given?
2966
4210
  return result
2967
4211
  end
@@ -2970,30 +4214,41 @@ module Google
2970
4214
  end
2971
4215
 
2972
4216
  ##
2973
- # Retrieves the Settings for the Project.
4217
+ # Lists attachments.
2974
4218
  #
2975
- # @overload get_project_settings(request, options = nil)
2976
- # Pass arguments to `get_project_settings` via a request object, either of type
2977
- # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash.
4219
+ # @overload list_attachments(request, options = nil)
4220
+ # Pass arguments to `list_attachments` via a request object, either of type
4221
+ # {::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest} or an equivalent Hash.
2978
4222
  #
2979
- # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash]
4223
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Hash]
2980
4224
  # A request object representing the call parameters. Required. To specify no
2981
4225
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2982
4226
  # @param options [::Gapic::CallOptions, ::Hash]
2983
4227
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2984
4228
  #
2985
- # @overload get_project_settings(name: nil)
2986
- # Pass arguments to `get_project_settings` via keyword arguments. Note that at
4229
+ # @overload list_attachments(parent: nil, filter: nil, page_size: nil, page_token: nil)
4230
+ # Pass arguments to `list_attachments` via keyword arguments. Note that at
2987
4231
  # least one keyword argument is required. To specify no parameters, or to keep all
2988
4232
  # the default parameter values, pass an empty Hash as a request object (see above).
2989
4233
  #
2990
- # @param name [::String]
2991
- # Required. The name of the projectSettings resource.
4234
+ # @param parent [::String]
4235
+ # Required. The name of the parent resource whose attachments will be listed.
4236
+ # @param filter [::String]
4237
+ # Optional. An expression for filtering the results of the request. Filter
4238
+ # rules are case insensitive. The fields eligible for filtering are:
4239
+ #
4240
+ # * `target`
4241
+ # * `type`
4242
+ # * `attachment_namespace`
4243
+ # @param page_size [::Integer]
4244
+ # The maximum number of attachments to return. Maximum page size is 1,000.
4245
+ # @param page_token [::String]
4246
+ # The next_page_token value returned from a previous list request, if any.
2992
4247
  # @yield [result, operation] Access the result along with the TransportOperation object
2993
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
4248
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>]
2994
4249
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2995
4250
  #
2996
- # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
4251
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>]
2997
4252
  #
2998
4253
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2999
4254
  #
@@ -3004,24 +4259,28 @@ module Google
3004
4259
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3005
4260
  #
3006
4261
  # # Create a request. To set request fields, pass in keyword arguments.
3007
- # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new
4262
+ # request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new
3008
4263
  #
3009
- # # Call the get_project_settings method.
3010
- # result = client.get_project_settings request
4264
+ # # Call the list_attachments method.
4265
+ # result = client.list_attachments request
3011
4266
  #
3012
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings.
3013
- # p result
4267
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4268
+ # # over elements, and API calls will be issued to fetch pages as needed.
4269
+ # result.each do |item|
4270
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment.
4271
+ # p item
4272
+ # end
3014
4273
  #
3015
- def get_project_settings request, options = nil
4274
+ def list_attachments request, options = nil
3016
4275
  raise ::ArgumentError, "request must be provided" if request.nil?
3017
4276
 
3018
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest
4277
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest
3019
4278
 
3020
4279
  # Converts hash and nil to an options object
3021
4280
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3022
4281
 
3023
4282
  # Customize the options with defaults
3024
- call_metadata = @config.rpcs.get_project_settings.metadata.to_h
4283
+ call_metadata = @config.rpcs.list_attachments.metadata.to_h
3025
4284
 
3026
4285
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3027
4286
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3032,15 +4291,16 @@ module Google
3032
4291
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3033
4292
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3034
4293
 
3035
- options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout,
4294
+ options.apply_defaults timeout: @config.rpcs.list_attachments.timeout,
3036
4295
  metadata: call_metadata,
3037
- retry_policy: @config.rpcs.get_project_settings.retry_policy
4296
+ retry_policy: @config.rpcs.list_attachments.retry_policy
3038
4297
 
3039
4298
  options.apply_defaults timeout: @config.timeout,
3040
4299
  metadata: @config.metadata,
3041
4300
  retry_policy: @config.retry_policy
3042
4301
 
3043
- @artifact_registry_stub.get_project_settings request, options do |result, operation|
4302
+ @artifact_registry_stub.list_attachments request, options do |result, operation|
4303
+ result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_attachments, "attachments", request, result, options
3044
4304
  yield result, operation if block_given?
3045
4305
  return result
3046
4306
  end
@@ -3049,32 +4309,30 @@ module Google
3049
4309
  end
3050
4310
 
3051
4311
  ##
3052
- # Updates the Settings for the Project.
4312
+ # Gets an attachment.
3053
4313
  #
3054
- # @overload update_project_settings(request, options = nil)
3055
- # Pass arguments to `update_project_settings` via a request object, either of type
3056
- # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash.
4314
+ # @overload get_attachment(request, options = nil)
4315
+ # Pass arguments to `get_attachment` via a request object, either of type
4316
+ # {::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest} or an equivalent Hash.
3057
4317
  #
3058
- # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash]
4318
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Hash]
3059
4319
  # A request object representing the call parameters. Required. To specify no
3060
4320
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3061
4321
  # @param options [::Gapic::CallOptions, ::Hash]
3062
4322
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3063
4323
  #
3064
- # @overload update_project_settings(project_settings: nil, update_mask: nil)
3065
- # Pass arguments to `update_project_settings` via keyword arguments. Note that at
4324
+ # @overload get_attachment(name: nil)
4325
+ # Pass arguments to `get_attachment` via keyword arguments. Note that at
3066
4326
  # least one keyword argument is required. To specify no parameters, or to keep all
3067
4327
  # the default parameter values, pass an empty Hash as a request object (see above).
3068
4328
  #
3069
- # @param project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash]
3070
- # The project settings.
3071
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3072
- # Field mask to support partial updates.
4329
+ # @param name [::String]
4330
+ # Required. The name of the attachment to retrieve.
3073
4331
  # @yield [result, operation] Access the result along with the TransportOperation object
3074
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
4332
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Attachment]
3075
4333
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3076
4334
  #
3077
- # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
4335
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment]
3078
4336
  #
3079
4337
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3080
4338
  #
@@ -3085,24 +4343,24 @@ module Google
3085
4343
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3086
4344
  #
3087
4345
  # # Create a request. To set request fields, pass in keyword arguments.
3088
- # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new
4346
+ # request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new
3089
4347
  #
3090
- # # Call the update_project_settings method.
3091
- # result = client.update_project_settings request
4348
+ # # Call the get_attachment method.
4349
+ # result = client.get_attachment request
3092
4350
  #
3093
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings.
4351
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment.
3094
4352
  # p result
3095
4353
  #
3096
- def update_project_settings request, options = nil
4354
+ def get_attachment request, options = nil
3097
4355
  raise ::ArgumentError, "request must be provided" if request.nil?
3098
4356
 
3099
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest
4357
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest
3100
4358
 
3101
4359
  # Converts hash and nil to an options object
3102
4360
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3103
4361
 
3104
4362
  # Customize the options with defaults
3105
- call_metadata = @config.rpcs.update_project_settings.metadata.to_h
4363
+ call_metadata = @config.rpcs.get_attachment.metadata.to_h
3106
4364
 
3107
4365
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3108
4366
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3113,15 +4371,15 @@ module Google
3113
4371
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3114
4372
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3115
4373
 
3116
- options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout,
4374
+ options.apply_defaults timeout: @config.rpcs.get_attachment.timeout,
3117
4375
  metadata: call_metadata,
3118
- retry_policy: @config.rpcs.update_project_settings.retry_policy
4376
+ retry_policy: @config.rpcs.get_attachment.retry_policy
3119
4377
 
3120
4378
  options.apply_defaults timeout: @config.timeout,
3121
4379
  metadata: @config.metadata,
3122
4380
  retry_policy: @config.retry_policy
3123
4381
 
3124
- @artifact_registry_stub.update_project_settings request, options do |result, operation|
4382
+ @artifact_registry_stub.get_attachment request, options do |result, operation|
3125
4383
  yield result, operation if block_given?
3126
4384
  return result
3127
4385
  end
@@ -3130,30 +4388,36 @@ module Google
3130
4388
  end
3131
4389
 
3132
4390
  ##
3133
- # Retrieves the VPCSC Config for the Project.
4391
+ # Creates an attachment. The returned Operation will finish once the
4392
+ # attachment has been created. Its response will be the created attachment.
3134
4393
  #
3135
- # @overload get_vpcsc_config(request, options = nil)
3136
- # Pass arguments to `get_vpcsc_config` via a request object, either of type
3137
- # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash.
4394
+ # @overload create_attachment(request, options = nil)
4395
+ # Pass arguments to `create_attachment` via a request object, either of type
4396
+ # {::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest} or an equivalent Hash.
3138
4397
  #
3139
- # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash]
4398
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Hash]
3140
4399
  # A request object representing the call parameters. Required. To specify no
3141
4400
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3142
4401
  # @param options [::Gapic::CallOptions, ::Hash]
3143
4402
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3144
4403
  #
3145
- # @overload get_vpcsc_config(name: nil)
3146
- # Pass arguments to `get_vpcsc_config` via keyword arguments. Note that at
4404
+ # @overload create_attachment(parent: nil, attachment_id: nil, attachment: nil)
4405
+ # Pass arguments to `create_attachment` via keyword arguments. Note that at
3147
4406
  # least one keyword argument is required. To specify no parameters, or to keep all
3148
4407
  # the default parameter values, pass an empty Hash as a request object (see above).
3149
4408
  #
3150
- # @param name [::String]
3151
- # Required. The name of the VPCSCConfig resource.
4409
+ # @param parent [::String]
4410
+ # Required. The name of the parent resource where the attachment will be
4411
+ # created.
4412
+ # @param attachment_id [::String]
4413
+ # Required. The attachment id to use for this attachment.
4414
+ # @param attachment [::Google::Cloud::ArtifactRegistry::V1::Attachment, ::Hash]
4415
+ # Required. The attachment to be created.
3152
4416
  # @yield [result, operation] Access the result along with the TransportOperation object
3153
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
4417
+ # @yieldparam result [::Gapic::Operation]
3154
4418
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3155
4419
  #
3156
- # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
4420
+ # @return [::Gapic::Operation]
3157
4421
  #
3158
4422
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3159
4423
  #
@@ -3164,24 +4428,31 @@ module Google
3164
4428
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3165
4429
  #
3166
4430
  # # Create a request. To set request fields, pass in keyword arguments.
3167
- # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new
4431
+ # request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new
3168
4432
  #
3169
- # # Call the get_vpcsc_config method.
3170
- # result = client.get_vpcsc_config request
4433
+ # # Call the create_attachment method.
4434
+ # result = client.create_attachment request
3171
4435
  #
3172
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
3173
- # p result
4436
+ # # The returned object is of type Gapic::Operation. You can use it to
4437
+ # # check the status of an operation, cancel it, or wait for results.
4438
+ # # Here is how to wait for a response.
4439
+ # result.wait_until_done! timeout: 60
4440
+ # if result.response?
4441
+ # p result.response
4442
+ # else
4443
+ # puts "No response received."
4444
+ # end
3174
4445
  #
3175
- def get_vpcsc_config request, options = nil
4446
+ def create_attachment request, options = nil
3176
4447
  raise ::ArgumentError, "request must be provided" if request.nil?
3177
4448
 
3178
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest
4449
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest
3179
4450
 
3180
4451
  # Converts hash and nil to an options object
3181
4452
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3182
4453
 
3183
4454
  # Customize the options with defaults
3184
- call_metadata = @config.rpcs.get_vpcsc_config.metadata.to_h
4455
+ call_metadata = @config.rpcs.create_attachment.metadata.to_h
3185
4456
 
3186
4457
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3187
4458
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3192,15 +4463,16 @@ module Google
3192
4463
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3193
4464
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3194
4465
 
3195
- options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout,
4466
+ options.apply_defaults timeout: @config.rpcs.create_attachment.timeout,
3196
4467
  metadata: call_metadata,
3197
- retry_policy: @config.rpcs.get_vpcsc_config.retry_policy
4468
+ retry_policy: @config.rpcs.create_attachment.retry_policy
3198
4469
 
3199
4470
  options.apply_defaults timeout: @config.timeout,
3200
4471
  metadata: @config.metadata,
3201
4472
  retry_policy: @config.retry_policy
3202
4473
 
3203
- @artifact_registry_stub.get_vpcsc_config request, options do |result, operation|
4474
+ @artifact_registry_stub.create_attachment request, options do |result, operation|
4475
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3204
4476
  yield result, operation if block_given?
3205
4477
  return result
3206
4478
  end
@@ -3209,32 +4481,32 @@ module Google
3209
4481
  end
3210
4482
 
3211
4483
  ##
3212
- # Updates the VPCSC Config for the Project.
4484
+ # Deletes an attachment. The returned Operation will
4485
+ # finish once the attachments has been deleted. It will not have any
4486
+ # Operation metadata and will return a `google.protobuf.Empty` response.
3213
4487
  #
3214
- # @overload update_vpcsc_config(request, options = nil)
3215
- # Pass arguments to `update_vpcsc_config` via a request object, either of type
3216
- # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash.
4488
+ # @overload delete_attachment(request, options = nil)
4489
+ # Pass arguments to `delete_attachment` via a request object, either of type
4490
+ # {::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest} or an equivalent Hash.
3217
4491
  #
3218
- # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash]
4492
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Hash]
3219
4493
  # A request object representing the call parameters. Required. To specify no
3220
4494
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3221
4495
  # @param options [::Gapic::CallOptions, ::Hash]
3222
4496
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3223
4497
  #
3224
- # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil)
3225
- # Pass arguments to `update_vpcsc_config` via keyword arguments. Note that at
4498
+ # @overload delete_attachment(name: nil)
4499
+ # Pass arguments to `delete_attachment` via keyword arguments. Note that at
3226
4500
  # least one keyword argument is required. To specify no parameters, or to keep all
3227
4501
  # the default parameter values, pass an empty Hash as a request object (see above).
3228
4502
  #
3229
- # @param vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash]
3230
- # The project config.
3231
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3232
- # Field mask to support partial updates.
4503
+ # @param name [::String]
4504
+ # Required. The name of the attachment to delete.
3233
4505
  # @yield [result, operation] Access the result along with the TransportOperation object
3234
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
4506
+ # @yieldparam result [::Gapic::Operation]
3235
4507
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3236
4508
  #
3237
- # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
4509
+ # @return [::Gapic::Operation]
3238
4510
  #
3239
4511
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3240
4512
  #
@@ -3245,24 +4517,31 @@ module Google
3245
4517
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3246
4518
  #
3247
4519
  # # Create a request. To set request fields, pass in keyword arguments.
3248
- # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new
4520
+ # request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new
3249
4521
  #
3250
- # # Call the update_vpcsc_config method.
3251
- # result = client.update_vpcsc_config request
4522
+ # # Call the delete_attachment method.
4523
+ # result = client.delete_attachment request
3252
4524
  #
3253
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
3254
- # p result
4525
+ # # The returned object is of type Gapic::Operation. You can use it to
4526
+ # # check the status of an operation, cancel it, or wait for results.
4527
+ # # Here is how to wait for a response.
4528
+ # result.wait_until_done! timeout: 60
4529
+ # if result.response?
4530
+ # p result.response
4531
+ # else
4532
+ # puts "No response received."
4533
+ # end
3255
4534
  #
3256
- def update_vpcsc_config request, options = nil
4535
+ def delete_attachment request, options = nil
3257
4536
  raise ::ArgumentError, "request must be provided" if request.nil?
3258
4537
 
3259
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest
4538
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest
3260
4539
 
3261
4540
  # Converts hash and nil to an options object
3262
4541
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3263
4542
 
3264
4543
  # Customize the options with defaults
3265
- call_metadata = @config.rpcs.update_vpcsc_config.metadata.to_h
4544
+ call_metadata = @config.rpcs.delete_attachment.metadata.to_h
3266
4545
 
3267
4546
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3268
4547
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3273,15 +4552,16 @@ module Google
3273
4552
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3274
4553
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3275
4554
 
3276
- options.apply_defaults timeout: @config.rpcs.update_vpcsc_config.timeout,
4555
+ options.apply_defaults timeout: @config.rpcs.delete_attachment.timeout,
3277
4556
  metadata: call_metadata,
3278
- retry_policy: @config.rpcs.update_vpcsc_config.retry_policy
4557
+ retry_policy: @config.rpcs.delete_attachment.retry_policy
3279
4558
 
3280
4559
  options.apply_defaults timeout: @config.timeout,
3281
4560
  metadata: @config.metadata,
3282
4561
  retry_policy: @config.retry_policy
3283
4562
 
3284
- @artifact_registry_stub.update_vpcsc_config request, options do |result, operation|
4563
+ @artifact_registry_stub.delete_attachment request, options do |result, operation|
4564
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3285
4565
  yield result, operation if block_given?
3286
4566
  return result
3287
4567
  end
@@ -3540,6 +4820,11 @@ module Google
3540
4820
  #
3541
4821
  attr_reader :batch_delete_versions
3542
4822
  ##
4823
+ # RPC-specific configuration for `update_version`
4824
+ # @return [::Gapic::Config::Method]
4825
+ #
4826
+ attr_reader :update_version
4827
+ ##
3543
4828
  # RPC-specific configuration for `list_files`
3544
4829
  # @return [::Gapic::Config::Method]
3545
4830
  #
@@ -3550,6 +4835,16 @@ module Google
3550
4835
  #
3551
4836
  attr_reader :get_file
3552
4837
  ##
4838
+ # RPC-specific configuration for `delete_file`
4839
+ # @return [::Gapic::Config::Method]
4840
+ #
4841
+ attr_reader :delete_file
4842
+ ##
4843
+ # RPC-specific configuration for `update_file`
4844
+ # @return [::Gapic::Config::Method]
4845
+ #
4846
+ attr_reader :update_file
4847
+ ##
3553
4848
  # RPC-specific configuration for `list_tags`
3554
4849
  # @return [::Gapic::Config::Method]
3555
4850
  #
@@ -3575,6 +4870,31 @@ module Google
3575
4870
  #
3576
4871
  attr_reader :delete_tag
3577
4872
  ##
4873
+ # RPC-specific configuration for `create_rule`
4874
+ # @return [::Gapic::Config::Method]
4875
+ #
4876
+ attr_reader :create_rule
4877
+ ##
4878
+ # RPC-specific configuration for `list_rules`
4879
+ # @return [::Gapic::Config::Method]
4880
+ #
4881
+ attr_reader :list_rules
4882
+ ##
4883
+ # RPC-specific configuration for `get_rule`
4884
+ # @return [::Gapic::Config::Method]
4885
+ #
4886
+ attr_reader :get_rule
4887
+ ##
4888
+ # RPC-specific configuration for `update_rule`
4889
+ # @return [::Gapic::Config::Method]
4890
+ #
4891
+ attr_reader :update_rule
4892
+ ##
4893
+ # RPC-specific configuration for `delete_rule`
4894
+ # @return [::Gapic::Config::Method]
4895
+ #
4896
+ attr_reader :delete_rule
4897
+ ##
3578
4898
  # RPC-specific configuration for `set_iam_policy`
3579
4899
  # @return [::Gapic::Config::Method]
3580
4900
  #
@@ -3609,6 +4929,31 @@ module Google
3609
4929
  # @return [::Gapic::Config::Method]
3610
4930
  #
3611
4931
  attr_reader :update_vpcsc_config
4932
+ ##
4933
+ # RPC-specific configuration for `update_package`
4934
+ # @return [::Gapic::Config::Method]
4935
+ #
4936
+ attr_reader :update_package
4937
+ ##
4938
+ # RPC-specific configuration for `list_attachments`
4939
+ # @return [::Gapic::Config::Method]
4940
+ #
4941
+ attr_reader :list_attachments
4942
+ ##
4943
+ # RPC-specific configuration for `get_attachment`
4944
+ # @return [::Gapic::Config::Method]
4945
+ #
4946
+ attr_reader :get_attachment
4947
+ ##
4948
+ # RPC-specific configuration for `create_attachment`
4949
+ # @return [::Gapic::Config::Method]
4950
+ #
4951
+ attr_reader :create_attachment
4952
+ ##
4953
+ # RPC-specific configuration for `delete_attachment`
4954
+ # @return [::Gapic::Config::Method]
4955
+ #
4956
+ attr_reader :delete_attachment
3612
4957
 
3613
4958
  # @private
3614
4959
  def initialize parent_rpcs = nil
@@ -3656,10 +5001,16 @@ module Google
3656
5001
  @delete_version = ::Gapic::Config::Method.new delete_version_config
3657
5002
  batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions
3658
5003
  @batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config
5004
+ update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version
5005
+ @update_version = ::Gapic::Config::Method.new update_version_config
3659
5006
  list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files
3660
5007
  @list_files = ::Gapic::Config::Method.new list_files_config
3661
5008
  get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file
3662
5009
  @get_file = ::Gapic::Config::Method.new get_file_config
5010
+ delete_file_config = parent_rpcs.delete_file if parent_rpcs.respond_to? :delete_file
5011
+ @delete_file = ::Gapic::Config::Method.new delete_file_config
5012
+ update_file_config = parent_rpcs.update_file if parent_rpcs.respond_to? :update_file
5013
+ @update_file = ::Gapic::Config::Method.new update_file_config
3663
5014
  list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags
3664
5015
  @list_tags = ::Gapic::Config::Method.new list_tags_config
3665
5016
  get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag
@@ -3670,6 +5021,16 @@ module Google
3670
5021
  @update_tag = ::Gapic::Config::Method.new update_tag_config
3671
5022
  delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag
3672
5023
  @delete_tag = ::Gapic::Config::Method.new delete_tag_config
5024
+ create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule
5025
+ @create_rule = ::Gapic::Config::Method.new create_rule_config
5026
+ list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules
5027
+ @list_rules = ::Gapic::Config::Method.new list_rules_config
5028
+ get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule
5029
+ @get_rule = ::Gapic::Config::Method.new get_rule_config
5030
+ update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule
5031
+ @update_rule = ::Gapic::Config::Method.new update_rule_config
5032
+ delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule
5033
+ @delete_rule = ::Gapic::Config::Method.new delete_rule_config
3673
5034
  set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
3674
5035
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
3675
5036
  get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
@@ -3684,6 +5045,16 @@ module Google
3684
5045
  @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config
3685
5046
  update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config
3686
5047
  @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config
5048
+ update_package_config = parent_rpcs.update_package if parent_rpcs.respond_to? :update_package
5049
+ @update_package = ::Gapic::Config::Method.new update_package_config
5050
+ list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments
5051
+ @list_attachments = ::Gapic::Config::Method.new list_attachments_config
5052
+ get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment
5053
+ @get_attachment = ::Gapic::Config::Method.new get_attachment_config
5054
+ create_attachment_config = parent_rpcs.create_attachment if parent_rpcs.respond_to? :create_attachment
5055
+ @create_attachment = ::Gapic::Config::Method.new create_attachment_config
5056
+ delete_attachment_config = parent_rpcs.delete_attachment if parent_rpcs.respond_to? :delete_attachment
5057
+ @delete_attachment = ::Gapic::Config::Method.new delete_attachment_config
3687
5058
 
3688
5059
  yield self if block_given?
3689
5060
  end