google-cloud-network_services-v1 2.6.1 → 2.7.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e91feaa61276b27da13a51e9952288b2030b680f9c17b1f9a736e83843dffd5
4
- data.tar.gz: b98c69decdfe113e538936fff1e079b3765bcd0607a9451b4bb2cc59275877e1
3
+ metadata.gz: 724e4116f352272ab9f93d8d520e5959af9ea8cf1451edad828fdbdf50af3331
4
+ data.tar.gz: 8ca83dbdc3e88849969129c07df0fc3ed02071abf5b97b423379324d1dcc3011
5
5
  SHA512:
6
- metadata.gz: 274c01417f91918651ed9e4391f70030e240f75cb08b401b832fe0019dc0be7ba35850fc1e80eeb2bcfb072ff3612a967296c74fb2dcdd96a8486af2405b790f
7
- data.tar.gz: dd879e38ca0966d0e3f0cc1fec51927e65968ba28b12e2a8df2bb1290ee1cf76a04bf5b943fb44504511b367d3f2911ef0fdb79a1cbc6ad3b03869522a3ded16
6
+ metadata.gz: b6d74f48c04a297e74c4feffae6eb3f4a860782dd11bb8ccba2550e06a1579478d95d53e7f0cf5dd84404f418db6c13707043a5254d65bd7b3b7efd5a99bebb4
7
+ data.tar.gz: 0ace33ae9da0106fa558afb6d35a3a7c335d76ab9ab29ec3d5b7d1de10c91130187e22f0575e901c0da1e7b0c751b44f6ccdaa9e463052791b67ee00086bb8e4
@@ -1280,6 +1280,529 @@ module Google
1280
1280
  raise ::Google::Cloud::Error.from_error(e)
1281
1281
  end
1282
1282
 
1283
+ ##
1284
+ # Lists `LbEdgeExtension` resources in a given project and location.
1285
+ #
1286
+ # @overload list_lb_edge_extensions(request, options = nil)
1287
+ # Pass arguments to `list_lb_edge_extensions` via a request object, either of type
1288
+ # {::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest} or an equivalent Hash.
1289
+ #
1290
+ # @param request [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, ::Hash]
1291
+ # A request object representing the call parameters. Required. To specify no
1292
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1293
+ # @param options [::Gapic::CallOptions, ::Hash]
1294
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1295
+ #
1296
+ # @overload list_lb_edge_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1297
+ # Pass arguments to `list_lb_edge_extensions` via keyword arguments. Note that at
1298
+ # least one keyword argument is required. To specify no parameters, or to keep all
1299
+ # the default parameter values, pass an empty Hash as a request object (see above).
1300
+ #
1301
+ # @param parent [::String]
1302
+ # Required. The project and location from which the `LbEdgeExtension`
1303
+ # resources are listed. These values are specified in the following format:
1304
+ # `projects/{project}/locations/{location}`.
1305
+ # @param page_size [::Integer]
1306
+ # Optional. Requested page size. The server might return fewer items than
1307
+ # requested. If unspecified, the server picks an appropriate default.
1308
+ # @param page_token [::String]
1309
+ # Optional. A token identifying a page of results that the server returns.
1310
+ # @param filter [::String]
1311
+ # Optional. Filtering results.
1312
+ # @param order_by [::String]
1313
+ # Optional. Hint about how to order the results.
1314
+ #
1315
+ # @yield [response, operation] Access the result along with the RPC operation
1316
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>]
1317
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1318
+ #
1319
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>]
1320
+ #
1321
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1322
+ #
1323
+ # @example Basic example
1324
+ # require "google/cloud/network_services/v1"
1325
+ #
1326
+ # # Create a client object. The client can be reused for multiple calls.
1327
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
1328
+ #
1329
+ # # Create a request. To set request fields, pass in keyword arguments.
1330
+ # request = Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.new
1331
+ #
1332
+ # # Call the list_lb_edge_extensions method.
1333
+ # result = client.list_lb_edge_extensions request
1334
+ #
1335
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1336
+ # # over elements, and API calls will be issued to fetch pages as needed.
1337
+ # result.each do |item|
1338
+ # # Each element is of type ::Google::Cloud::NetworkServices::V1::LbEdgeExtension.
1339
+ # p item
1340
+ # end
1341
+ #
1342
+ def list_lb_edge_extensions request, options = nil
1343
+ raise ::ArgumentError, "request must be provided" if request.nil?
1344
+
1345
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest
1346
+
1347
+ # Converts hash and nil to an options object
1348
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1349
+
1350
+ # Customize the options with defaults
1351
+ metadata = @config.rpcs.list_lb_edge_extensions.metadata.to_h
1352
+
1353
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1354
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1355
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1356
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
1357
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1358
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1359
+
1360
+ header_params = {}
1361
+ if request.parent
1362
+ header_params["parent"] = request.parent
1363
+ end
1364
+
1365
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1366
+ metadata[:"x-goog-request-params"] ||= request_params_header
1367
+
1368
+ options.apply_defaults timeout: @config.rpcs.list_lb_edge_extensions.timeout,
1369
+ metadata: metadata,
1370
+ retry_policy: @config.rpcs.list_lb_edge_extensions.retry_policy
1371
+
1372
+ options.apply_defaults timeout: @config.timeout,
1373
+ metadata: @config.metadata,
1374
+ retry_policy: @config.retry_policy
1375
+
1376
+ @dep_service_stub.call_rpc :list_lb_edge_extensions, request, options: options do |response, operation|
1377
+ response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_edge_extensions, request, response, operation, options
1378
+ yield response, operation if block_given?
1379
+ throw :response, response
1380
+ end
1381
+ rescue ::GRPC::BadStatus => e
1382
+ raise ::Google::Cloud::Error.from_error(e)
1383
+ end
1384
+
1385
+ ##
1386
+ # Gets details of the specified `LbEdgeExtension` resource.
1387
+ #
1388
+ # @overload get_lb_edge_extension(request, options = nil)
1389
+ # Pass arguments to `get_lb_edge_extension` via a request object, either of type
1390
+ # {::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest} or an equivalent Hash.
1391
+ #
1392
+ # @param request [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, ::Hash]
1393
+ # A request object representing the call parameters. Required. To specify no
1394
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1395
+ # @param options [::Gapic::CallOptions, ::Hash]
1396
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1397
+ #
1398
+ # @overload get_lb_edge_extension(name: nil)
1399
+ # Pass arguments to `get_lb_edge_extension` via keyword arguments. Note that at
1400
+ # least one keyword argument is required. To specify no parameters, or to keep all
1401
+ # the default parameter values, pass an empty Hash as a request object (see above).
1402
+ #
1403
+ # @param name [::String]
1404
+ # Required. A name of the `LbEdgeExtension` resource to get. Must be in the
1405
+ # format
1406
+ # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.
1407
+ #
1408
+ # @yield [response, operation] Access the result along with the RPC operation
1409
+ # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbEdgeExtension]
1410
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1411
+ #
1412
+ # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension]
1413
+ #
1414
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1415
+ #
1416
+ # @example Basic example
1417
+ # require "google/cloud/network_services/v1"
1418
+ #
1419
+ # # Create a client object. The client can be reused for multiple calls.
1420
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
1421
+ #
1422
+ # # Create a request. To set request fields, pass in keyword arguments.
1423
+ # request = Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new
1424
+ #
1425
+ # # Call the get_lb_edge_extension method.
1426
+ # result = client.get_lb_edge_extension request
1427
+ #
1428
+ # # The returned object is of type Google::Cloud::NetworkServices::V1::LbEdgeExtension.
1429
+ # p result
1430
+ #
1431
+ def get_lb_edge_extension request, options = nil
1432
+ raise ::ArgumentError, "request must be provided" if request.nil?
1433
+
1434
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest
1435
+
1436
+ # Converts hash and nil to an options object
1437
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1438
+
1439
+ # Customize the options with defaults
1440
+ metadata = @config.rpcs.get_lb_edge_extension.metadata.to_h
1441
+
1442
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1443
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1444
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1445
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
1446
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1447
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1448
+
1449
+ header_params = {}
1450
+ if request.name
1451
+ header_params["name"] = request.name
1452
+ end
1453
+
1454
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1455
+ metadata[:"x-goog-request-params"] ||= request_params_header
1456
+
1457
+ options.apply_defaults timeout: @config.rpcs.get_lb_edge_extension.timeout,
1458
+ metadata: metadata,
1459
+ retry_policy: @config.rpcs.get_lb_edge_extension.retry_policy
1460
+
1461
+ options.apply_defaults timeout: @config.timeout,
1462
+ metadata: @config.metadata,
1463
+ retry_policy: @config.retry_policy
1464
+
1465
+ @dep_service_stub.call_rpc :get_lb_edge_extension, request, options: options do |response, operation|
1466
+ yield response, operation if block_given?
1467
+ end
1468
+ rescue ::GRPC::BadStatus => e
1469
+ raise ::Google::Cloud::Error.from_error(e)
1470
+ end
1471
+
1472
+ ##
1473
+ # Creates a new `LbEdgeExtension` resource in a given project and location.
1474
+ #
1475
+ # @overload create_lb_edge_extension(request, options = nil)
1476
+ # Pass arguments to `create_lb_edge_extension` via a request object, either of type
1477
+ # {::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest} or an equivalent Hash.
1478
+ #
1479
+ # @param request [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, ::Hash]
1480
+ # A request object representing the call parameters. Required. To specify no
1481
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1482
+ # @param options [::Gapic::CallOptions, ::Hash]
1483
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1484
+ #
1485
+ # @overload create_lb_edge_extension(parent: nil, lb_edge_extension_id: nil, lb_edge_extension: nil, request_id: nil)
1486
+ # Pass arguments to `create_lb_edge_extension` via keyword arguments. Note that at
1487
+ # least one keyword argument is required. To specify no parameters, or to keep all
1488
+ # the default parameter values, pass an empty Hash as a request object (see above).
1489
+ #
1490
+ # @param parent [::String]
1491
+ # Required. The parent resource of the `LbEdgeExtension` resource. Must be in
1492
+ # the format `projects/{project}/locations/{location}`.
1493
+ # @param lb_edge_extension_id [::String]
1494
+ # Required. User-provided ID of the `LbEdgeExtension` resource to be created.
1495
+ # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash]
1496
+ # Required. `LbEdgeExtension` resource to be created.
1497
+ # @param request_id [::String]
1498
+ # Optional. An optional request ID to identify requests. Specify a unique
1499
+ # request ID so that if you must retry your request, the server can ignore
1500
+ # the request if it has already been completed. The server guarantees
1501
+ # that for 60 minutes since the first request.
1502
+ #
1503
+ # For example, consider a situation where you make an initial request and the
1504
+ # request times out. If you make the request again with the same request
1505
+ # ID, the server ignores the second request This prevents
1506
+ # clients from accidentally creating duplicate commitments.
1507
+ #
1508
+ # The request ID must be a valid UUID with the exception that zero UUID is
1509
+ # not supported (00000000-0000-0000-0000-000000000000).
1510
+ #
1511
+ # @yield [response, operation] Access the result along with the RPC operation
1512
+ # @yieldparam response [::Gapic::Operation]
1513
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1514
+ #
1515
+ # @return [::Gapic::Operation]
1516
+ #
1517
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1518
+ #
1519
+ # @example Basic example
1520
+ # require "google/cloud/network_services/v1"
1521
+ #
1522
+ # # Create a client object. The client can be reused for multiple calls.
1523
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
1524
+ #
1525
+ # # Create a request. To set request fields, pass in keyword arguments.
1526
+ # request = Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new
1527
+ #
1528
+ # # Call the create_lb_edge_extension method.
1529
+ # result = client.create_lb_edge_extension request
1530
+ #
1531
+ # # The returned object is of type Gapic::Operation. You can use it to
1532
+ # # check the status of an operation, cancel it, or wait for results.
1533
+ # # Here is how to wait for a response.
1534
+ # result.wait_until_done! timeout: 60
1535
+ # if result.response?
1536
+ # p result.response
1537
+ # else
1538
+ # puts "No response received."
1539
+ # end
1540
+ #
1541
+ def create_lb_edge_extension request, options = nil
1542
+ raise ::ArgumentError, "request must be provided" if request.nil?
1543
+
1544
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest
1545
+
1546
+ # Converts hash and nil to an options object
1547
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1548
+
1549
+ # Customize the options with defaults
1550
+ metadata = @config.rpcs.create_lb_edge_extension.metadata.to_h
1551
+
1552
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1553
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1554
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1555
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
1556
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1557
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1558
+
1559
+ header_params = {}
1560
+ if request.parent
1561
+ header_params["parent"] = request.parent
1562
+ end
1563
+
1564
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1565
+ metadata[:"x-goog-request-params"] ||= request_params_header
1566
+
1567
+ options.apply_defaults timeout: @config.rpcs.create_lb_edge_extension.timeout,
1568
+ metadata: metadata,
1569
+ retry_policy: @config.rpcs.create_lb_edge_extension.retry_policy
1570
+
1571
+ options.apply_defaults timeout: @config.timeout,
1572
+ metadata: @config.metadata,
1573
+ retry_policy: @config.retry_policy
1574
+
1575
+ @dep_service_stub.call_rpc :create_lb_edge_extension, request, options: options do |response, operation|
1576
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1577
+ yield response, operation if block_given?
1578
+ throw :response, response
1579
+ end
1580
+ rescue ::GRPC::BadStatus => e
1581
+ raise ::Google::Cloud::Error.from_error(e)
1582
+ end
1583
+
1584
+ ##
1585
+ # Updates the parameters of the specified `LbEdgeExtension` resource.
1586
+ #
1587
+ # @overload update_lb_edge_extension(request, options = nil)
1588
+ # Pass arguments to `update_lb_edge_extension` via a request object, either of type
1589
+ # {::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest} or an equivalent Hash.
1590
+ #
1591
+ # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, ::Hash]
1592
+ # A request object representing the call parameters. Required. To specify no
1593
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1594
+ # @param options [::Gapic::CallOptions, ::Hash]
1595
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1596
+ #
1597
+ # @overload update_lb_edge_extension(update_mask: nil, lb_edge_extension: nil, request_id: nil)
1598
+ # Pass arguments to `update_lb_edge_extension` via keyword arguments. Note that at
1599
+ # least one keyword argument is required. To specify no parameters, or to keep all
1600
+ # the default parameter values, pass an empty Hash as a request object (see above).
1601
+ #
1602
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1603
+ # Optional. Used to specify the fields to be overwritten in the
1604
+ # `LbEdgeExtension` resource by the update.
1605
+ # The fields specified in the `update_mask` are relative to the resource, not
1606
+ # the full request. A field is overwritten if it is in the mask. If the
1607
+ # user does not specify a mask, then all fields are overwritten.
1608
+ # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash]
1609
+ # Required. `LbEdgeExtension` resource being updated.
1610
+ # @param request_id [::String]
1611
+ # Optional. An optional request ID to identify requests. Specify a unique
1612
+ # request ID so that if you must retry your request, the server can ignore
1613
+ # the request if it has already been completed. The server guarantees
1614
+ # that for 60 minutes since the first request.
1615
+ #
1616
+ # For example, consider a situation where you make an initial request and the
1617
+ # request times out. If you make the request again with the same request
1618
+ # ID, the server ignores the second request This prevents
1619
+ # clients from accidentally creating duplicate commitments.
1620
+ #
1621
+ # The request ID must be a valid UUID with the exception that zero UUID is
1622
+ # not supported (00000000-0000-0000-0000-000000000000).
1623
+ #
1624
+ # @yield [response, operation] Access the result along with the RPC operation
1625
+ # @yieldparam response [::Gapic::Operation]
1626
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1627
+ #
1628
+ # @return [::Gapic::Operation]
1629
+ #
1630
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1631
+ #
1632
+ # @example Basic example
1633
+ # require "google/cloud/network_services/v1"
1634
+ #
1635
+ # # Create a client object. The client can be reused for multiple calls.
1636
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
1637
+ #
1638
+ # # Create a request. To set request fields, pass in keyword arguments.
1639
+ # request = Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new
1640
+ #
1641
+ # # Call the update_lb_edge_extension method.
1642
+ # result = client.update_lb_edge_extension request
1643
+ #
1644
+ # # The returned object is of type Gapic::Operation. You can use it to
1645
+ # # check the status of an operation, cancel it, or wait for results.
1646
+ # # Here is how to wait for a response.
1647
+ # result.wait_until_done! timeout: 60
1648
+ # if result.response?
1649
+ # p result.response
1650
+ # else
1651
+ # puts "No response received."
1652
+ # end
1653
+ #
1654
+ def update_lb_edge_extension request, options = nil
1655
+ raise ::ArgumentError, "request must be provided" if request.nil?
1656
+
1657
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest
1658
+
1659
+ # Converts hash and nil to an options object
1660
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1661
+
1662
+ # Customize the options with defaults
1663
+ metadata = @config.rpcs.update_lb_edge_extension.metadata.to_h
1664
+
1665
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1666
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1667
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1668
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
1669
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1670
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1671
+
1672
+ header_params = {}
1673
+ if request.lb_edge_extension&.name
1674
+ header_params["lb_edge_extension.name"] = request.lb_edge_extension.name
1675
+ end
1676
+
1677
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1678
+ metadata[:"x-goog-request-params"] ||= request_params_header
1679
+
1680
+ options.apply_defaults timeout: @config.rpcs.update_lb_edge_extension.timeout,
1681
+ metadata: metadata,
1682
+ retry_policy: @config.rpcs.update_lb_edge_extension.retry_policy
1683
+
1684
+ options.apply_defaults timeout: @config.timeout,
1685
+ metadata: @config.metadata,
1686
+ retry_policy: @config.retry_policy
1687
+
1688
+ @dep_service_stub.call_rpc :update_lb_edge_extension, request, options: options do |response, operation|
1689
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1690
+ yield response, operation if block_given?
1691
+ throw :response, response
1692
+ end
1693
+ rescue ::GRPC::BadStatus => e
1694
+ raise ::Google::Cloud::Error.from_error(e)
1695
+ end
1696
+
1697
+ ##
1698
+ # Deletes the specified `LbEdgeExtension` resource.
1699
+ #
1700
+ # @overload delete_lb_edge_extension(request, options = nil)
1701
+ # Pass arguments to `delete_lb_edge_extension` via a request object, either of type
1702
+ # {::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest} or an equivalent Hash.
1703
+ #
1704
+ # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, ::Hash]
1705
+ # A request object representing the call parameters. Required. To specify no
1706
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1707
+ # @param options [::Gapic::CallOptions, ::Hash]
1708
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1709
+ #
1710
+ # @overload delete_lb_edge_extension(name: nil, request_id: nil)
1711
+ # Pass arguments to `delete_lb_edge_extension` via keyword arguments. Note that at
1712
+ # least one keyword argument is required. To specify no parameters, or to keep all
1713
+ # the default parameter values, pass an empty Hash as a request object (see above).
1714
+ #
1715
+ # @param name [::String]
1716
+ # Required. The name of the `LbEdgeExtension` resource to delete. Must be in
1717
+ # the format
1718
+ # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.
1719
+ # @param request_id [::String]
1720
+ # Optional. An optional request ID to identify requests. Specify a unique
1721
+ # request ID so that if you must retry your request, the server can ignore
1722
+ # the request if it has already been completed. The server guarantees
1723
+ # that for 60 minutes after the first request.
1724
+ #
1725
+ # For example, consider a situation where you make an initial request and the
1726
+ # request times out. If you make the request again with the same request
1727
+ # ID, the server ignores the second request This prevents
1728
+ # clients from accidentally creating duplicate commitments.
1729
+ #
1730
+ # The request ID must be a valid UUID with the exception that zero UUID is
1731
+ # not supported (00000000-0000-0000-0000-000000000000).
1732
+ #
1733
+ # @yield [response, operation] Access the result along with the RPC operation
1734
+ # @yieldparam response [::Gapic::Operation]
1735
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1736
+ #
1737
+ # @return [::Gapic::Operation]
1738
+ #
1739
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1740
+ #
1741
+ # @example Basic example
1742
+ # require "google/cloud/network_services/v1"
1743
+ #
1744
+ # # Create a client object. The client can be reused for multiple calls.
1745
+ # client = Google::Cloud::NetworkServices::V1::DepService::Client.new
1746
+ #
1747
+ # # Create a request. To set request fields, pass in keyword arguments.
1748
+ # request = Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new
1749
+ #
1750
+ # # Call the delete_lb_edge_extension method.
1751
+ # result = client.delete_lb_edge_extension request
1752
+ #
1753
+ # # The returned object is of type Gapic::Operation. You can use it to
1754
+ # # check the status of an operation, cancel it, or wait for results.
1755
+ # # Here is how to wait for a response.
1756
+ # result.wait_until_done! timeout: 60
1757
+ # if result.response?
1758
+ # p result.response
1759
+ # else
1760
+ # puts "No response received."
1761
+ # end
1762
+ #
1763
+ def delete_lb_edge_extension request, options = nil
1764
+ raise ::ArgumentError, "request must be provided" if request.nil?
1765
+
1766
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest
1767
+
1768
+ # Converts hash and nil to an options object
1769
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1770
+
1771
+ # Customize the options with defaults
1772
+ metadata = @config.rpcs.delete_lb_edge_extension.metadata.to_h
1773
+
1774
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1775
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1776
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1777
+ gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION
1778
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1779
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1780
+
1781
+ header_params = {}
1782
+ if request.name
1783
+ header_params["name"] = request.name
1784
+ end
1785
+
1786
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1787
+ metadata[:"x-goog-request-params"] ||= request_params_header
1788
+
1789
+ options.apply_defaults timeout: @config.rpcs.delete_lb_edge_extension.timeout,
1790
+ metadata: metadata,
1791
+ retry_policy: @config.rpcs.delete_lb_edge_extension.retry_policy
1792
+
1793
+ options.apply_defaults timeout: @config.timeout,
1794
+ metadata: @config.metadata,
1795
+ retry_policy: @config.retry_policy
1796
+
1797
+ @dep_service_stub.call_rpc :delete_lb_edge_extension, request, options: options do |response, operation|
1798
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1799
+ yield response, operation if block_given?
1800
+ throw :response, response
1801
+ end
1802
+ rescue ::GRPC::BadStatus => e
1803
+ raise ::Google::Cloud::Error.from_error(e)
1804
+ end
1805
+
1283
1806
  ##
1284
1807
  # Lists `AuthzExtension` resources in a given project and location.
1285
1808
  #
@@ -2040,6 +2563,31 @@ module Google
2040
2563
  #
2041
2564
  attr_reader :delete_lb_route_extension
2042
2565
  ##
2566
+ # RPC-specific configuration for `list_lb_edge_extensions`
2567
+ # @return [::Gapic::Config::Method]
2568
+ #
2569
+ attr_reader :list_lb_edge_extensions
2570
+ ##
2571
+ # RPC-specific configuration for `get_lb_edge_extension`
2572
+ # @return [::Gapic::Config::Method]
2573
+ #
2574
+ attr_reader :get_lb_edge_extension
2575
+ ##
2576
+ # RPC-specific configuration for `create_lb_edge_extension`
2577
+ # @return [::Gapic::Config::Method]
2578
+ #
2579
+ attr_reader :create_lb_edge_extension
2580
+ ##
2581
+ # RPC-specific configuration for `update_lb_edge_extension`
2582
+ # @return [::Gapic::Config::Method]
2583
+ #
2584
+ attr_reader :update_lb_edge_extension
2585
+ ##
2586
+ # RPC-specific configuration for `delete_lb_edge_extension`
2587
+ # @return [::Gapic::Config::Method]
2588
+ #
2589
+ attr_reader :delete_lb_edge_extension
2590
+ ##
2043
2591
  # RPC-specific configuration for `list_authz_extensions`
2044
2592
  # @return [::Gapic::Config::Method]
2045
2593
  #
@@ -2087,6 +2635,16 @@ module Google
2087
2635
  @update_lb_route_extension = ::Gapic::Config::Method.new update_lb_route_extension_config
2088
2636
  delete_lb_route_extension_config = parent_rpcs.delete_lb_route_extension if parent_rpcs.respond_to? :delete_lb_route_extension
2089
2637
  @delete_lb_route_extension = ::Gapic::Config::Method.new delete_lb_route_extension_config
2638
+ list_lb_edge_extensions_config = parent_rpcs.list_lb_edge_extensions if parent_rpcs.respond_to? :list_lb_edge_extensions
2639
+ @list_lb_edge_extensions = ::Gapic::Config::Method.new list_lb_edge_extensions_config
2640
+ get_lb_edge_extension_config = parent_rpcs.get_lb_edge_extension if parent_rpcs.respond_to? :get_lb_edge_extension
2641
+ @get_lb_edge_extension = ::Gapic::Config::Method.new get_lb_edge_extension_config
2642
+ create_lb_edge_extension_config = parent_rpcs.create_lb_edge_extension if parent_rpcs.respond_to? :create_lb_edge_extension
2643
+ @create_lb_edge_extension = ::Gapic::Config::Method.new create_lb_edge_extension_config
2644
+ update_lb_edge_extension_config = parent_rpcs.update_lb_edge_extension if parent_rpcs.respond_to? :update_lb_edge_extension
2645
+ @update_lb_edge_extension = ::Gapic::Config::Method.new update_lb_edge_extension_config
2646
+ delete_lb_edge_extension_config = parent_rpcs.delete_lb_edge_extension if parent_rpcs.respond_to? :delete_lb_edge_extension
2647
+ @delete_lb_edge_extension = ::Gapic::Config::Method.new delete_lb_edge_extension_config
2090
2648
  list_authz_extensions_config = parent_rpcs.list_authz_extensions if parent_rpcs.respond_to? :list_authz_extensions
2091
2649
  @list_authz_extensions = ::Gapic::Config::Method.new list_authz_extensions_config
2092
2650
  get_authz_extension_config = parent_rpcs.get_authz_extension if parent_rpcs.respond_to? :get_authz_extension
@@ -43,6 +43,25 @@ module Google
43
43
  "projects/#{project}/locations/#{location}/authzExtensions/#{authz_extension}"
44
44
  end
45
45
 
46
+ ##
47
+ # Create a fully-qualified LbEdgeExtension resource string.
48
+ #
49
+ # The resource will be in the following format:
50
+ #
51
+ # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`
52
+ #
53
+ # @param project [String]
54
+ # @param location [String]
55
+ # @param lb_edge_extension [String]
56
+ #
57
+ # @return [::String]
58
+ def lb_edge_extension_path project:, location:, lb_edge_extension:
59
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
60
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
61
+
62
+ "projects/#{project}/locations/#{location}/lbEdgeExtensions/#{lb_edge_extension}"
63
+ end
64
+
46
65
  ##
47
66
  # Create a fully-qualified LbRouteExtension resource string.
48
67
  #