google-cloud-secure_source_manager-v1 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 307c08060c671df7388deeb7f0a542e03e5c714a50ee14009614144807ca6e3d
4
- data.tar.gz: 7343a57463df34cc3dd3a8d613511278fb6cdaa0626235d0a931c043401084d4
3
+ metadata.gz: 6be47686a07eebc4c9ba12077b0513e85f739f810bd93822a58a88435cdfca74
4
+ data.tar.gz: c6d0a9b1e82e7f827350a35f26b9d268ce8eda684bc1dfb90f52ed1d507c417d
5
5
  SHA512:
6
- metadata.gz: 01acb318531b2837f4016aa818997b0a7662689d3b0c2eed1fce105ba5aa0fd409ed3dea737d228bf947e7bf2b6228d2b67782f1efc261291b5b33bec643329c
7
- data.tar.gz: 639974bcc5d71f8772d99060265df34fd5ba87d2bc5a940fc72e4fe067efda85995a68de1cb343b803b0da9d767987a4ebd4dc7cd28d0826c1b766b921941bf5
6
+ metadata.gz: 26a7b6dd027718d6d3ea03352500a79e6ee76428b1346aa5446bc1bc079b6f413e20099c392b79b7cf851dc0f61e8f6160181856795b61ac24f060dd65297ac4
7
+ data.tar.gz: 711d170f6dfbfb43d4917fb7588517a08cd851dee7d4569f46149f741905f971f14d89cadf12f96f64225d13cefbcd57880e75046eeb274aad07628ed0705f99
@@ -672,7 +672,7 @@ module Google
672
672
  # @param options [::Gapic::CallOptions, ::Hash]
673
673
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
674
674
  #
675
- # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil)
675
+ # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, instance: nil)
676
676
  # Pass arguments to `list_repositories` via keyword arguments. Note that at
677
677
  # least one keyword argument is required. To specify no parameters, or to keep all
678
678
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -686,6 +686,14 @@ module Google
686
686
  # A token identifying a page of results the server should return.
687
687
  # @param filter [::String]
688
688
  # Optional. Filter results.
689
+ # @param instance [::String]
690
+ # Optional. The name of the instance in which the repository is hosted,
691
+ # formatted as
692
+ # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
693
+ # When listing repositories via
694
+ # securesourcemanager.googleapis.com (Control Plane API), this field is
695
+ # required. When listing repositories via *.sourcemanager.dev (Data Plane
696
+ # API), this field is ignored.
689
697
  #
690
698
  # @yield [response, operation] Access the result along with the RPC operation
691
699
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>]
@@ -1332,6 +1340,479 @@ module Google
1332
1340
  raise ::Google::Cloud::Error.from_error(e)
1333
1341
  end
1334
1342
 
1343
+ ##
1344
+ # CreateBranchRule creates a branch rule in a given repository.
1345
+ #
1346
+ # @overload create_branch_rule(request, options = nil)
1347
+ # Pass arguments to `create_branch_rule` via a request object, either of type
1348
+ # {::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest} or an equivalent Hash.
1349
+ #
1350
+ # @param request [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::Hash]
1351
+ # A request object representing the call parameters. Required. To specify no
1352
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1353
+ # @param options [::Gapic::CallOptions, ::Hash]
1354
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1355
+ #
1356
+ # @overload create_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil)
1357
+ # Pass arguments to `create_branch_rule` via keyword arguments. Note that at
1358
+ # least one keyword argument is required. To specify no parameters, or to keep all
1359
+ # the default parameter values, pass an empty Hash as a request object (see above).
1360
+ #
1361
+ # @param parent [::String]
1362
+ # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash]
1363
+ # @param branch_rule_id [::String]
1364
+ #
1365
+ # @yield [response, operation] Access the result along with the RPC operation
1366
+ # @yieldparam response [::Gapic::Operation]
1367
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1368
+ #
1369
+ # @return [::Gapic::Operation]
1370
+ #
1371
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1372
+ #
1373
+ # @example Basic example
1374
+ # require "google/cloud/secure_source_manager/v1"
1375
+ #
1376
+ # # Create a client object. The client can be reused for multiple calls.
1377
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new
1378
+ #
1379
+ # # Create a request. To set request fields, pass in keyword arguments.
1380
+ # request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new
1381
+ #
1382
+ # # Call the create_branch_rule method.
1383
+ # result = client.create_branch_rule request
1384
+ #
1385
+ # # The returned object is of type Gapic::Operation. You can use it to
1386
+ # # check the status of an operation, cancel it, or wait for results.
1387
+ # # Here is how to wait for a response.
1388
+ # result.wait_until_done! timeout: 60
1389
+ # if result.response?
1390
+ # p result.response
1391
+ # else
1392
+ # puts "No response received."
1393
+ # end
1394
+ #
1395
+ def create_branch_rule request, options = nil
1396
+ raise ::ArgumentError, "request must be provided" if request.nil?
1397
+
1398
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest
1399
+
1400
+ # Converts hash and nil to an options object
1401
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1402
+
1403
+ # Customize the options with defaults
1404
+ metadata = @config.rpcs.create_branch_rule.metadata.to_h
1405
+
1406
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1407
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1408
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1409
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
1410
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1411
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1412
+
1413
+ header_params = {}
1414
+ if request.parent
1415
+ header_params["parent"] = request.parent
1416
+ end
1417
+
1418
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1419
+ metadata[:"x-goog-request-params"] ||= request_params_header
1420
+
1421
+ options.apply_defaults timeout: @config.rpcs.create_branch_rule.timeout,
1422
+ metadata: metadata,
1423
+ retry_policy: @config.rpcs.create_branch_rule.retry_policy
1424
+
1425
+ options.apply_defaults timeout: @config.timeout,
1426
+ metadata: @config.metadata,
1427
+ retry_policy: @config.retry_policy
1428
+
1429
+ @secure_source_manager_stub.call_rpc :create_branch_rule, request, options: options do |response, operation|
1430
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1431
+ yield response, operation if block_given?
1432
+ return response
1433
+ end
1434
+ rescue ::GRPC::BadStatus => e
1435
+ raise ::Google::Cloud::Error.from_error(e)
1436
+ end
1437
+
1438
+ ##
1439
+ # ListBranchRules lists branch rules in a given repository.
1440
+ #
1441
+ # @overload list_branch_rules(request, options = nil)
1442
+ # Pass arguments to `list_branch_rules` via a request object, either of type
1443
+ # {::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest} or an equivalent Hash.
1444
+ #
1445
+ # @param request [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::Hash]
1446
+ # A request object representing the call parameters. Required. To specify no
1447
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1448
+ # @param options [::Gapic::CallOptions, ::Hash]
1449
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1450
+ #
1451
+ # @overload list_branch_rules(parent: nil, page_size: nil, page_token: nil)
1452
+ # Pass arguments to `list_branch_rules` via keyword arguments. Note that at
1453
+ # least one keyword argument is required. To specify no parameters, or to keep all
1454
+ # the default parameter values, pass an empty Hash as a request object (see above).
1455
+ #
1456
+ # @param parent [::String]
1457
+ # @param page_size [::Integer]
1458
+ # @param page_token [::String]
1459
+ #
1460
+ # @yield [response, operation] Access the result along with the RPC operation
1461
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>]
1462
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1463
+ #
1464
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>]
1465
+ #
1466
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1467
+ #
1468
+ # @example Basic example
1469
+ # require "google/cloud/secure_source_manager/v1"
1470
+ #
1471
+ # # Create a client object. The client can be reused for multiple calls.
1472
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new
1473
+ #
1474
+ # # Create a request. To set request fields, pass in keyword arguments.
1475
+ # request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new
1476
+ #
1477
+ # # Call the list_branch_rules method.
1478
+ # result = client.list_branch_rules request
1479
+ #
1480
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1481
+ # # over elements, and API calls will be issued to fetch pages as needed.
1482
+ # result.each do |item|
1483
+ # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::BranchRule.
1484
+ # p item
1485
+ # end
1486
+ #
1487
+ def list_branch_rules request, options = nil
1488
+ raise ::ArgumentError, "request must be provided" if request.nil?
1489
+
1490
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest
1491
+
1492
+ # Converts hash and nil to an options object
1493
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1494
+
1495
+ # Customize the options with defaults
1496
+ metadata = @config.rpcs.list_branch_rules.metadata.to_h
1497
+
1498
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1499
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1500
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1501
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
1502
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1503
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1504
+
1505
+ header_params = {}
1506
+ if request.parent
1507
+ header_params["parent"] = request.parent
1508
+ end
1509
+
1510
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1511
+ metadata[:"x-goog-request-params"] ||= request_params_header
1512
+
1513
+ options.apply_defaults timeout: @config.rpcs.list_branch_rules.timeout,
1514
+ metadata: metadata,
1515
+ retry_policy: @config.rpcs.list_branch_rules.retry_policy
1516
+
1517
+ options.apply_defaults timeout: @config.timeout,
1518
+ metadata: @config.metadata,
1519
+ retry_policy: @config.retry_policy
1520
+
1521
+ @secure_source_manager_stub.call_rpc :list_branch_rules, request, options: options do |response, operation|
1522
+ response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, request, response, operation, options
1523
+ yield response, operation if block_given?
1524
+ return response
1525
+ end
1526
+ rescue ::GRPC::BadStatus => e
1527
+ raise ::Google::Cloud::Error.from_error(e)
1528
+ end
1529
+
1530
+ ##
1531
+ # GetBranchRule gets a branch rule.
1532
+ #
1533
+ # @overload get_branch_rule(request, options = nil)
1534
+ # Pass arguments to `get_branch_rule` via a request object, either of type
1535
+ # {::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest} or an equivalent Hash.
1536
+ #
1537
+ # @param request [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::Hash]
1538
+ # A request object representing the call parameters. Required. To specify no
1539
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1540
+ # @param options [::Gapic::CallOptions, ::Hash]
1541
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1542
+ #
1543
+ # @overload get_branch_rule(name: nil)
1544
+ # Pass arguments to `get_branch_rule` via keyword arguments. Note that at
1545
+ # least one keyword argument is required. To specify no parameters, or to keep all
1546
+ # the default parameter values, pass an empty Hash as a request object (see above).
1547
+ #
1548
+ # @param name [::String]
1549
+ # Required. Name of the repository to retrieve.
1550
+ # The format is
1551
+ # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`.
1552
+ #
1553
+ # @yield [response, operation] Access the result along with the RPC operation
1554
+ # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::BranchRule]
1555
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1556
+ #
1557
+ # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule]
1558
+ #
1559
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1560
+ #
1561
+ # @example Basic example
1562
+ # require "google/cloud/secure_source_manager/v1"
1563
+ #
1564
+ # # Create a client object. The client can be reused for multiple calls.
1565
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new
1566
+ #
1567
+ # # Create a request. To set request fields, pass in keyword arguments.
1568
+ # request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new
1569
+ #
1570
+ # # Call the get_branch_rule method.
1571
+ # result = client.get_branch_rule request
1572
+ #
1573
+ # # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule.
1574
+ # p result
1575
+ #
1576
+ def get_branch_rule request, options = nil
1577
+ raise ::ArgumentError, "request must be provided" if request.nil?
1578
+
1579
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest
1580
+
1581
+ # Converts hash and nil to an options object
1582
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1583
+
1584
+ # Customize the options with defaults
1585
+ metadata = @config.rpcs.get_branch_rule.metadata.to_h
1586
+
1587
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1588
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1589
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1590
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
1591
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1592
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1593
+
1594
+ header_params = {}
1595
+ if request.name
1596
+ header_params["name"] = request.name
1597
+ end
1598
+
1599
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1600
+ metadata[:"x-goog-request-params"] ||= request_params_header
1601
+
1602
+ options.apply_defaults timeout: @config.rpcs.get_branch_rule.timeout,
1603
+ metadata: metadata,
1604
+ retry_policy: @config.rpcs.get_branch_rule.retry_policy
1605
+
1606
+ options.apply_defaults timeout: @config.timeout,
1607
+ metadata: @config.metadata,
1608
+ retry_policy: @config.retry_policy
1609
+
1610
+ @secure_source_manager_stub.call_rpc :get_branch_rule, request, options: options do |response, operation|
1611
+ yield response, operation if block_given?
1612
+ return response
1613
+ end
1614
+ rescue ::GRPC::BadStatus => e
1615
+ raise ::Google::Cloud::Error.from_error(e)
1616
+ end
1617
+
1618
+ ##
1619
+ # UpdateBranchRule updates a branch rule.
1620
+ #
1621
+ # @overload update_branch_rule(request, options = nil)
1622
+ # Pass arguments to `update_branch_rule` via a request object, either of type
1623
+ # {::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest} or an equivalent Hash.
1624
+ #
1625
+ # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Hash]
1626
+ # A request object representing the call parameters. Required. To specify no
1627
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1628
+ # @param options [::Gapic::CallOptions, ::Hash]
1629
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1630
+ #
1631
+ # @overload update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil)
1632
+ # Pass arguments to `update_branch_rule` via keyword arguments. Note that at
1633
+ # least one keyword argument is required. To specify no parameters, or to keep all
1634
+ # the default parameter values, pass an empty Hash as a request object (see above).
1635
+ #
1636
+ # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash]
1637
+ # @param validate_only [::Boolean]
1638
+ # Optional. If set, validate the request and preview the review, but do not
1639
+ # actually post it. (https://google.aip.dev/163, for declarative friendly)
1640
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1641
+ # Required. Field mask is used to specify the fields to be overwritten in the
1642
+ # branchRule resource by the update.
1643
+ # The fields specified in the update_mask are relative to the resource, not
1644
+ # the full request. A field will be overwritten if it is in the mask.
1645
+ # The special value "*" means full replacement.
1646
+ #
1647
+ # @yield [response, operation] Access the result along with the RPC operation
1648
+ # @yieldparam response [::Gapic::Operation]
1649
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1650
+ #
1651
+ # @return [::Gapic::Operation]
1652
+ #
1653
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1654
+ #
1655
+ # @example Basic example
1656
+ # require "google/cloud/secure_source_manager/v1"
1657
+ #
1658
+ # # Create a client object. The client can be reused for multiple calls.
1659
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new
1660
+ #
1661
+ # # Create a request. To set request fields, pass in keyword arguments.
1662
+ # request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new
1663
+ #
1664
+ # # Call the update_branch_rule method.
1665
+ # result = client.update_branch_rule request
1666
+ #
1667
+ # # The returned object is of type Gapic::Operation. You can use it to
1668
+ # # check the status of an operation, cancel it, or wait for results.
1669
+ # # Here is how to wait for a response.
1670
+ # result.wait_until_done! timeout: 60
1671
+ # if result.response?
1672
+ # p result.response
1673
+ # else
1674
+ # puts "No response received."
1675
+ # end
1676
+ #
1677
+ def update_branch_rule request, options = nil
1678
+ raise ::ArgumentError, "request must be provided" if request.nil?
1679
+
1680
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest
1681
+
1682
+ # Converts hash and nil to an options object
1683
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1684
+
1685
+ # Customize the options with defaults
1686
+ metadata = @config.rpcs.update_branch_rule.metadata.to_h
1687
+
1688
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1689
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1690
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1691
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
1692
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1693
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1694
+
1695
+ header_params = {}
1696
+ if request.branch_rule&.name
1697
+ header_params["branch_rule.name"] = request.branch_rule.name
1698
+ end
1699
+
1700
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1701
+ metadata[:"x-goog-request-params"] ||= request_params_header
1702
+
1703
+ options.apply_defaults timeout: @config.rpcs.update_branch_rule.timeout,
1704
+ metadata: metadata,
1705
+ retry_policy: @config.rpcs.update_branch_rule.retry_policy
1706
+
1707
+ options.apply_defaults timeout: @config.timeout,
1708
+ metadata: @config.metadata,
1709
+ retry_policy: @config.retry_policy
1710
+
1711
+ @secure_source_manager_stub.call_rpc :update_branch_rule, request, options: options do |response, operation|
1712
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1713
+ yield response, operation if block_given?
1714
+ return response
1715
+ end
1716
+ rescue ::GRPC::BadStatus => e
1717
+ raise ::Google::Cloud::Error.from_error(e)
1718
+ end
1719
+
1720
+ ##
1721
+ # DeleteBranchRule deletes a branch rule.
1722
+ #
1723
+ # @overload delete_branch_rule(request, options = nil)
1724
+ # Pass arguments to `delete_branch_rule` via a request object, either of type
1725
+ # {::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest} or an equivalent Hash.
1726
+ #
1727
+ # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Hash]
1728
+ # A request object representing the call parameters. Required. To specify no
1729
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1730
+ # @param options [::Gapic::CallOptions, ::Hash]
1731
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1732
+ #
1733
+ # @overload delete_branch_rule(name: nil, allow_missing: nil)
1734
+ # Pass arguments to `delete_branch_rule` via keyword arguments. Note that at
1735
+ # least one keyword argument is required. To specify no parameters, or to keep all
1736
+ # the default parameter values, pass an empty Hash as a request object (see above).
1737
+ #
1738
+ # @param name [::String]
1739
+ # @param allow_missing [::Boolean]
1740
+ # Optional. If set to true, and the branch rule is not found, the request
1741
+ # will succeed but no action will be taken on the server.
1742
+ #
1743
+ # @yield [response, operation] Access the result along with the RPC operation
1744
+ # @yieldparam response [::Gapic::Operation]
1745
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1746
+ #
1747
+ # @return [::Gapic::Operation]
1748
+ #
1749
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1750
+ #
1751
+ # @example Basic example
1752
+ # require "google/cloud/secure_source_manager/v1"
1753
+ #
1754
+ # # Create a client object. The client can be reused for multiple calls.
1755
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new
1756
+ #
1757
+ # # Create a request. To set request fields, pass in keyword arguments.
1758
+ # request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new
1759
+ #
1760
+ # # Call the delete_branch_rule method.
1761
+ # result = client.delete_branch_rule request
1762
+ #
1763
+ # # The returned object is of type Gapic::Operation. You can use it to
1764
+ # # check the status of an operation, cancel it, or wait for results.
1765
+ # # Here is how to wait for a response.
1766
+ # result.wait_until_done! timeout: 60
1767
+ # if result.response?
1768
+ # p result.response
1769
+ # else
1770
+ # puts "No response received."
1771
+ # end
1772
+ #
1773
+ def delete_branch_rule request, options = nil
1774
+ raise ::ArgumentError, "request must be provided" if request.nil?
1775
+
1776
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest
1777
+
1778
+ # Converts hash and nil to an options object
1779
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1780
+
1781
+ # Customize the options with defaults
1782
+ metadata = @config.rpcs.delete_branch_rule.metadata.to_h
1783
+
1784
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1785
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1786
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1787
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
1788
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1789
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1790
+
1791
+ header_params = {}
1792
+ if request.name
1793
+ header_params["name"] = request.name
1794
+ end
1795
+
1796
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1797
+ metadata[:"x-goog-request-params"] ||= request_params_header
1798
+
1799
+ options.apply_defaults timeout: @config.rpcs.delete_branch_rule.timeout,
1800
+ metadata: metadata,
1801
+ retry_policy: @config.rpcs.delete_branch_rule.retry_policy
1802
+
1803
+ options.apply_defaults timeout: @config.timeout,
1804
+ metadata: @config.metadata,
1805
+ retry_policy: @config.retry_policy
1806
+
1807
+ @secure_source_manager_stub.call_rpc :delete_branch_rule, request, options: options do |response, operation|
1808
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1809
+ yield response, operation if block_given?
1810
+ return response
1811
+ end
1812
+ rescue ::GRPC::BadStatus => e
1813
+ raise ::Google::Cloud::Error.from_error(e)
1814
+ end
1815
+
1335
1816
  ##
1336
1817
  # Configuration class for the SecureSourceManager API.
1337
1818
  #
@@ -1540,6 +2021,31 @@ module Google
1540
2021
  # @return [::Gapic::Config::Method]
1541
2022
  #
1542
2023
  attr_reader :test_iam_permissions_repo
2024
+ ##
2025
+ # RPC-specific configuration for `create_branch_rule`
2026
+ # @return [::Gapic::Config::Method]
2027
+ #
2028
+ attr_reader :create_branch_rule
2029
+ ##
2030
+ # RPC-specific configuration for `list_branch_rules`
2031
+ # @return [::Gapic::Config::Method]
2032
+ #
2033
+ attr_reader :list_branch_rules
2034
+ ##
2035
+ # RPC-specific configuration for `get_branch_rule`
2036
+ # @return [::Gapic::Config::Method]
2037
+ #
2038
+ attr_reader :get_branch_rule
2039
+ ##
2040
+ # RPC-specific configuration for `update_branch_rule`
2041
+ # @return [::Gapic::Config::Method]
2042
+ #
2043
+ attr_reader :update_branch_rule
2044
+ ##
2045
+ # RPC-specific configuration for `delete_branch_rule`
2046
+ # @return [::Gapic::Config::Method]
2047
+ #
2048
+ attr_reader :delete_branch_rule
1543
2049
 
1544
2050
  # @private
1545
2051
  def initialize parent_rpcs = nil
@@ -1565,6 +2071,16 @@ module Google
1565
2071
  @set_iam_policy_repo = ::Gapic::Config::Method.new set_iam_policy_repo_config
1566
2072
  test_iam_permissions_repo_config = parent_rpcs.test_iam_permissions_repo if parent_rpcs.respond_to? :test_iam_permissions_repo
1567
2073
  @test_iam_permissions_repo = ::Gapic::Config::Method.new test_iam_permissions_repo_config
2074
+ create_branch_rule_config = parent_rpcs.create_branch_rule if parent_rpcs.respond_to? :create_branch_rule
2075
+ @create_branch_rule = ::Gapic::Config::Method.new create_branch_rule_config
2076
+ list_branch_rules_config = parent_rpcs.list_branch_rules if parent_rpcs.respond_to? :list_branch_rules
2077
+ @list_branch_rules = ::Gapic::Config::Method.new list_branch_rules_config
2078
+ get_branch_rule_config = parent_rpcs.get_branch_rule if parent_rpcs.respond_to? :get_branch_rule
2079
+ @get_branch_rule = ::Gapic::Config::Method.new get_branch_rule_config
2080
+ update_branch_rule_config = parent_rpcs.update_branch_rule if parent_rpcs.respond_to? :update_branch_rule
2081
+ @update_branch_rule = ::Gapic::Config::Method.new update_branch_rule_config
2082
+ delete_branch_rule_config = parent_rpcs.delete_branch_rule if parent_rpcs.respond_to? :delete_branch_rule
2083
+ @delete_branch_rule = ::Gapic::Config::Method.new delete_branch_rule_config
1568
2084
 
1569
2085
  yield self if block_given?
1570
2086
  end
@@ -24,6 +24,27 @@ module Google
24
24
  module SecureSourceManager
25
25
  # Path helper methods for the SecureSourceManager API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified BranchRule resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param repository [String]
37
+ # @param branch_rule [String]
38
+ #
39
+ # @return [::String]
40
+ def branch_rule_path project:, location:, repository:, branch_rule:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
43
+ raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/"
44
+
45
+ "projects/#{project}/locations/#{location}/repositories/#{repository}/branchRules/#{branch_rule}"
46
+ end
47
+
27
48
  ##
28
49
  # Create a fully-qualified CaPool resource string.
29
50
  #