google-cloud-netapp-v1 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/netapp/v1/active_directory_pb.rb +1 -1
  3. data/lib/google/cloud/netapp/v1/backup_pb.rb +57 -0
  4. data/lib/google/cloud/netapp/v1/backup_policy_pb.rb +56 -0
  5. data/lib/google/cloud/netapp/v1/backup_vault_pb.rb +56 -0
  6. data/lib/google/cloud/netapp/v1/bindings_override.rb +102 -0
  7. data/lib/google/cloud/netapp/v1/cloud_netapp_service_pb.rb +4 -1
  8. data/lib/google/cloud/netapp/v1/cloud_netapp_service_services_pb.rb +33 -0
  9. data/lib/google/cloud/netapp/v1/kms_pb.rb +1 -1
  10. data/lib/google/cloud/netapp/v1/netapp/client.rb +1742 -120
  11. data/lib/google/cloud/netapp/v1/netapp/operations.rb +10 -1
  12. data/lib/google/cloud/netapp/v1/netapp/paths.rb +59 -0
  13. data/lib/google/cloud/netapp/v1/netapp/rest/client.rb +2314 -40
  14. data/lib/google/cloud/netapp/v1/netapp/rest/operations.rb +80 -5
  15. data/lib/google/cloud/netapp/v1/netapp/rest/service_stub.rb +891 -0
  16. data/lib/google/cloud/netapp/v1/netapp/rest.rb +1 -0
  17. data/lib/google/cloud/netapp/v1/replication_pb.rb +1 -1
  18. data/lib/google/cloud/netapp/v1/rest.rb +1 -0
  19. data/lib/google/cloud/netapp/v1/snapshot_pb.rb +1 -1
  20. data/lib/google/cloud/netapp/v1/storage_pool_pb.rb +1 -1
  21. data/lib/google/cloud/netapp/v1/version.rb +1 -1
  22. data/lib/google/cloud/netapp/v1/volume_pb.rb +3 -1
  23. data/proto_docs/google/api/client.rb +13 -0
  24. data/proto_docs/google/api/field_behavior.rb +14 -0
  25. data/proto_docs/google/cloud/netapp/v1/active_directory.rb +2 -2
  26. data/proto_docs/google/cloud/netapp/v1/backup.rb +231 -0
  27. data/proto_docs/google/cloud/netapp/v1/backup_policy.rb +190 -0
  28. data/proto_docs/google/cloud/netapp/v1/backup_vault.rb +177 -0
  29. data/proto_docs/google/cloud/netapp/v1/common.rb +3 -0
  30. data/proto_docs/google/cloud/netapp/v1/kms.rb +8 -2
  31. data/proto_docs/google/cloud/netapp/v1/replication.rb +2 -2
  32. data/proto_docs/google/cloud/netapp/v1/snapshot.rb +3 -2
  33. data/proto_docs/google/cloud/netapp/v1/storage_pool.rb +10 -3
  34. data/proto_docs/google/cloud/netapp/v1/volume.rb +43 -2
  35. metadata +12 -5
@@ -1408,6 +1408,576 @@ module Google
1408
1408
  result
1409
1409
  end
1410
1410
 
1411
+ ##
1412
+ # Baseline implementation for the create_backup_vault REST call
1413
+ #
1414
+ # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupVaultRequest]
1415
+ # A request object representing the call parameters. Required.
1416
+ # @param options [::Gapic::CallOptions]
1417
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1418
+ #
1419
+ # @yield [result, operation] Access the result along with the TransportOperation object
1420
+ # @yieldparam result [::Google::Longrunning::Operation]
1421
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1422
+ #
1423
+ # @return [::Google::Longrunning::Operation]
1424
+ # A result object deserialized from the server's reply
1425
+ def create_backup_vault request_pb, options = nil
1426
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1427
+
1428
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_vault_request request_pb
1429
+ query_string_params = if query_string_params.any?
1430
+ query_string_params.to_h { |p| p.split "=", 2 }
1431
+ else
1432
+ {}
1433
+ end
1434
+
1435
+ response = @client_stub.make_http_request(
1436
+ verb,
1437
+ uri: uri,
1438
+ body: body || "",
1439
+ params: query_string_params,
1440
+ options: options
1441
+ )
1442
+ operation = ::Gapic::Rest::TransportOperation.new response
1443
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1444
+
1445
+ yield result, operation if block_given?
1446
+ result
1447
+ end
1448
+
1449
+ ##
1450
+ # Baseline implementation for the get_backup_vault REST call
1451
+ #
1452
+ # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupVaultRequest]
1453
+ # A request object representing the call parameters. Required.
1454
+ # @param options [::Gapic::CallOptions]
1455
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1456
+ #
1457
+ # @yield [result, operation] Access the result along with the TransportOperation object
1458
+ # @yieldparam result [::Google::Cloud::NetApp::V1::BackupVault]
1459
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1460
+ #
1461
+ # @return [::Google::Cloud::NetApp::V1::BackupVault]
1462
+ # A result object deserialized from the server's reply
1463
+ def get_backup_vault request_pb, options = nil
1464
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1465
+
1466
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_vault_request request_pb
1467
+ query_string_params = if query_string_params.any?
1468
+ query_string_params.to_h { |p| p.split "=", 2 }
1469
+ else
1470
+ {}
1471
+ end
1472
+
1473
+ response = @client_stub.make_http_request(
1474
+ verb,
1475
+ uri: uri,
1476
+ body: body || "",
1477
+ params: query_string_params,
1478
+ options: options
1479
+ )
1480
+ operation = ::Gapic::Rest::TransportOperation.new response
1481
+ result = ::Google::Cloud::NetApp::V1::BackupVault.decode_json response.body, ignore_unknown_fields: true
1482
+
1483
+ yield result, operation if block_given?
1484
+ result
1485
+ end
1486
+
1487
+ ##
1488
+ # Baseline implementation for the list_backup_vaults REST call
1489
+ #
1490
+ # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupVaultsRequest]
1491
+ # A request object representing the call parameters. Required.
1492
+ # @param options [::Gapic::CallOptions]
1493
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1494
+ #
1495
+ # @yield [result, operation] Access the result along with the TransportOperation object
1496
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListBackupVaultsResponse]
1497
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1498
+ #
1499
+ # @return [::Google::Cloud::NetApp::V1::ListBackupVaultsResponse]
1500
+ # A result object deserialized from the server's reply
1501
+ def list_backup_vaults request_pb, options = nil
1502
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1503
+
1504
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_vaults_request request_pb
1505
+ query_string_params = if query_string_params.any?
1506
+ query_string_params.to_h { |p| p.split "=", 2 }
1507
+ else
1508
+ {}
1509
+ end
1510
+
1511
+ response = @client_stub.make_http_request(
1512
+ verb,
1513
+ uri: uri,
1514
+ body: body || "",
1515
+ params: query_string_params,
1516
+ options: options
1517
+ )
1518
+ operation = ::Gapic::Rest::TransportOperation.new response
1519
+ result = ::Google::Cloud::NetApp::V1::ListBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true
1520
+
1521
+ yield result, operation if block_given?
1522
+ result
1523
+ end
1524
+
1525
+ ##
1526
+ # Baseline implementation for the update_backup_vault REST call
1527
+ #
1528
+ # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest]
1529
+ # A request object representing the call parameters. Required.
1530
+ # @param options [::Gapic::CallOptions]
1531
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1532
+ #
1533
+ # @yield [result, operation] Access the result along with the TransportOperation object
1534
+ # @yieldparam result [::Google::Longrunning::Operation]
1535
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1536
+ #
1537
+ # @return [::Google::Longrunning::Operation]
1538
+ # A result object deserialized from the server's reply
1539
+ def update_backup_vault request_pb, options = nil
1540
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1541
+
1542
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_vault_request request_pb
1543
+ query_string_params = if query_string_params.any?
1544
+ query_string_params.to_h { |p| p.split "=", 2 }
1545
+ else
1546
+ {}
1547
+ end
1548
+
1549
+ response = @client_stub.make_http_request(
1550
+ verb,
1551
+ uri: uri,
1552
+ body: body || "",
1553
+ params: query_string_params,
1554
+ options: options
1555
+ )
1556
+ operation = ::Gapic::Rest::TransportOperation.new response
1557
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1558
+
1559
+ yield result, operation if block_given?
1560
+ result
1561
+ end
1562
+
1563
+ ##
1564
+ # Baseline implementation for the delete_backup_vault REST call
1565
+ #
1566
+ # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest]
1567
+ # A request object representing the call parameters. Required.
1568
+ # @param options [::Gapic::CallOptions]
1569
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1570
+ #
1571
+ # @yield [result, operation] Access the result along with the TransportOperation object
1572
+ # @yieldparam result [::Google::Longrunning::Operation]
1573
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1574
+ #
1575
+ # @return [::Google::Longrunning::Operation]
1576
+ # A result object deserialized from the server's reply
1577
+ def delete_backup_vault request_pb, options = nil
1578
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1579
+
1580
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_vault_request request_pb
1581
+ query_string_params = if query_string_params.any?
1582
+ query_string_params.to_h { |p| p.split "=", 2 }
1583
+ else
1584
+ {}
1585
+ end
1586
+
1587
+ response = @client_stub.make_http_request(
1588
+ verb,
1589
+ uri: uri,
1590
+ body: body || "",
1591
+ params: query_string_params,
1592
+ options: options
1593
+ )
1594
+ operation = ::Gapic::Rest::TransportOperation.new response
1595
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1596
+
1597
+ yield result, operation if block_given?
1598
+ result
1599
+ end
1600
+
1601
+ ##
1602
+ # Baseline implementation for the create_backup REST call
1603
+ #
1604
+ # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupRequest]
1605
+ # A request object representing the call parameters. Required.
1606
+ # @param options [::Gapic::CallOptions]
1607
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1608
+ #
1609
+ # @yield [result, operation] Access the result along with the TransportOperation object
1610
+ # @yieldparam result [::Google::Longrunning::Operation]
1611
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1612
+ #
1613
+ # @return [::Google::Longrunning::Operation]
1614
+ # A result object deserialized from the server's reply
1615
+ def create_backup request_pb, options = nil
1616
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1617
+
1618
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_request request_pb
1619
+ query_string_params = if query_string_params.any?
1620
+ query_string_params.to_h { |p| p.split "=", 2 }
1621
+ else
1622
+ {}
1623
+ end
1624
+
1625
+ response = @client_stub.make_http_request(
1626
+ verb,
1627
+ uri: uri,
1628
+ body: body || "",
1629
+ params: query_string_params,
1630
+ options: options
1631
+ )
1632
+ operation = ::Gapic::Rest::TransportOperation.new response
1633
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1634
+
1635
+ yield result, operation if block_given?
1636
+ result
1637
+ end
1638
+
1639
+ ##
1640
+ # Baseline implementation for the get_backup REST call
1641
+ #
1642
+ # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupRequest]
1643
+ # A request object representing the call parameters. Required.
1644
+ # @param options [::Gapic::CallOptions]
1645
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1646
+ #
1647
+ # @yield [result, operation] Access the result along with the TransportOperation object
1648
+ # @yieldparam result [::Google::Cloud::NetApp::V1::Backup]
1649
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1650
+ #
1651
+ # @return [::Google::Cloud::NetApp::V1::Backup]
1652
+ # A result object deserialized from the server's reply
1653
+ def get_backup request_pb, options = nil
1654
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1655
+
1656
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb
1657
+ query_string_params = if query_string_params.any?
1658
+ query_string_params.to_h { |p| p.split "=", 2 }
1659
+ else
1660
+ {}
1661
+ end
1662
+
1663
+ response = @client_stub.make_http_request(
1664
+ verb,
1665
+ uri: uri,
1666
+ body: body || "",
1667
+ params: query_string_params,
1668
+ options: options
1669
+ )
1670
+ operation = ::Gapic::Rest::TransportOperation.new response
1671
+ result = ::Google::Cloud::NetApp::V1::Backup.decode_json response.body, ignore_unknown_fields: true
1672
+
1673
+ yield result, operation if block_given?
1674
+ result
1675
+ end
1676
+
1677
+ ##
1678
+ # Baseline implementation for the list_backups REST call
1679
+ #
1680
+ # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupsRequest]
1681
+ # A request object representing the call parameters. Required.
1682
+ # @param options [::Gapic::CallOptions]
1683
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1684
+ #
1685
+ # @yield [result, operation] Access the result along with the TransportOperation object
1686
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListBackupsResponse]
1687
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1688
+ #
1689
+ # @return [::Google::Cloud::NetApp::V1::ListBackupsResponse]
1690
+ # A result object deserialized from the server's reply
1691
+ def list_backups request_pb, options = nil
1692
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1693
+
1694
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb
1695
+ query_string_params = if query_string_params.any?
1696
+ query_string_params.to_h { |p| p.split "=", 2 }
1697
+ else
1698
+ {}
1699
+ end
1700
+
1701
+ response = @client_stub.make_http_request(
1702
+ verb,
1703
+ uri: uri,
1704
+ body: body || "",
1705
+ params: query_string_params,
1706
+ options: options
1707
+ )
1708
+ operation = ::Gapic::Rest::TransportOperation.new response
1709
+ result = ::Google::Cloud::NetApp::V1::ListBackupsResponse.decode_json response.body, ignore_unknown_fields: true
1710
+
1711
+ yield result, operation if block_given?
1712
+ result
1713
+ end
1714
+
1715
+ ##
1716
+ # Baseline implementation for the delete_backup REST call
1717
+ #
1718
+ # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupRequest]
1719
+ # A request object representing the call parameters. Required.
1720
+ # @param options [::Gapic::CallOptions]
1721
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1722
+ #
1723
+ # @yield [result, operation] Access the result along with the TransportOperation object
1724
+ # @yieldparam result [::Google::Longrunning::Operation]
1725
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1726
+ #
1727
+ # @return [::Google::Longrunning::Operation]
1728
+ # A result object deserialized from the server's reply
1729
+ def delete_backup request_pb, options = nil
1730
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1731
+
1732
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb
1733
+ query_string_params = if query_string_params.any?
1734
+ query_string_params.to_h { |p| p.split "=", 2 }
1735
+ else
1736
+ {}
1737
+ end
1738
+
1739
+ response = @client_stub.make_http_request(
1740
+ verb,
1741
+ uri: uri,
1742
+ body: body || "",
1743
+ params: query_string_params,
1744
+ options: options
1745
+ )
1746
+ operation = ::Gapic::Rest::TransportOperation.new response
1747
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1748
+
1749
+ yield result, operation if block_given?
1750
+ result
1751
+ end
1752
+
1753
+ ##
1754
+ # Baseline implementation for the update_backup REST call
1755
+ #
1756
+ # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupRequest]
1757
+ # A request object representing the call parameters. Required.
1758
+ # @param options [::Gapic::CallOptions]
1759
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1760
+ #
1761
+ # @yield [result, operation] Access the result along with the TransportOperation object
1762
+ # @yieldparam result [::Google::Longrunning::Operation]
1763
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1764
+ #
1765
+ # @return [::Google::Longrunning::Operation]
1766
+ # A result object deserialized from the server's reply
1767
+ def update_backup request_pb, options = nil
1768
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1769
+
1770
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb
1771
+ query_string_params = if query_string_params.any?
1772
+ query_string_params.to_h { |p| p.split "=", 2 }
1773
+ else
1774
+ {}
1775
+ end
1776
+
1777
+ response = @client_stub.make_http_request(
1778
+ verb,
1779
+ uri: uri,
1780
+ body: body || "",
1781
+ params: query_string_params,
1782
+ options: options
1783
+ )
1784
+ operation = ::Gapic::Rest::TransportOperation.new response
1785
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1786
+
1787
+ yield result, operation if block_given?
1788
+ result
1789
+ end
1790
+
1791
+ ##
1792
+ # Baseline implementation for the create_backup_policy REST call
1793
+ #
1794
+ # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest]
1795
+ # A request object representing the call parameters. Required.
1796
+ # @param options [::Gapic::CallOptions]
1797
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1798
+ #
1799
+ # @yield [result, operation] Access the result along with the TransportOperation object
1800
+ # @yieldparam result [::Google::Longrunning::Operation]
1801
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1802
+ #
1803
+ # @return [::Google::Longrunning::Operation]
1804
+ # A result object deserialized from the server's reply
1805
+ def create_backup_policy request_pb, options = nil
1806
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1807
+
1808
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_policy_request request_pb
1809
+ query_string_params = if query_string_params.any?
1810
+ query_string_params.to_h { |p| p.split "=", 2 }
1811
+ else
1812
+ {}
1813
+ end
1814
+
1815
+ response = @client_stub.make_http_request(
1816
+ verb,
1817
+ uri: uri,
1818
+ body: body || "",
1819
+ params: query_string_params,
1820
+ options: options
1821
+ )
1822
+ operation = ::Gapic::Rest::TransportOperation.new response
1823
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1824
+
1825
+ yield result, operation if block_given?
1826
+ result
1827
+ end
1828
+
1829
+ ##
1830
+ # Baseline implementation for the get_backup_policy REST call
1831
+ #
1832
+ # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupPolicyRequest]
1833
+ # A request object representing the call parameters. Required.
1834
+ # @param options [::Gapic::CallOptions]
1835
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1836
+ #
1837
+ # @yield [result, operation] Access the result along with the TransportOperation object
1838
+ # @yieldparam result [::Google::Cloud::NetApp::V1::BackupPolicy]
1839
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1840
+ #
1841
+ # @return [::Google::Cloud::NetApp::V1::BackupPolicy]
1842
+ # A result object deserialized from the server's reply
1843
+ def get_backup_policy request_pb, options = nil
1844
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1845
+
1846
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_policy_request request_pb
1847
+ query_string_params = if query_string_params.any?
1848
+ query_string_params.to_h { |p| p.split "=", 2 }
1849
+ else
1850
+ {}
1851
+ end
1852
+
1853
+ response = @client_stub.make_http_request(
1854
+ verb,
1855
+ uri: uri,
1856
+ body: body || "",
1857
+ params: query_string_params,
1858
+ options: options
1859
+ )
1860
+ operation = ::Gapic::Rest::TransportOperation.new response
1861
+ result = ::Google::Cloud::NetApp::V1::BackupPolicy.decode_json response.body, ignore_unknown_fields: true
1862
+
1863
+ yield result, operation if block_given?
1864
+ result
1865
+ end
1866
+
1867
+ ##
1868
+ # Baseline implementation for the list_backup_policies REST call
1869
+ #
1870
+ # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest]
1871
+ # A request object representing the call parameters. Required.
1872
+ # @param options [::Gapic::CallOptions]
1873
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1874
+ #
1875
+ # @yield [result, operation] Access the result along with the TransportOperation object
1876
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListBackupPoliciesResponse]
1877
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1878
+ #
1879
+ # @return [::Google::Cloud::NetApp::V1::ListBackupPoliciesResponse]
1880
+ # A result object deserialized from the server's reply
1881
+ def list_backup_policies request_pb, options = nil
1882
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1883
+
1884
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_policies_request request_pb
1885
+ query_string_params = if query_string_params.any?
1886
+ query_string_params.to_h { |p| p.split "=", 2 }
1887
+ else
1888
+ {}
1889
+ end
1890
+
1891
+ response = @client_stub.make_http_request(
1892
+ verb,
1893
+ uri: uri,
1894
+ body: body || "",
1895
+ params: query_string_params,
1896
+ options: options
1897
+ )
1898
+ operation = ::Gapic::Rest::TransportOperation.new response
1899
+ result = ::Google::Cloud::NetApp::V1::ListBackupPoliciesResponse.decode_json response.body, ignore_unknown_fields: true
1900
+
1901
+ yield result, operation if block_given?
1902
+ result
1903
+ end
1904
+
1905
+ ##
1906
+ # Baseline implementation for the update_backup_policy REST call
1907
+ #
1908
+ # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest]
1909
+ # A request object representing the call parameters. Required.
1910
+ # @param options [::Gapic::CallOptions]
1911
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1912
+ #
1913
+ # @yield [result, operation] Access the result along with the TransportOperation object
1914
+ # @yieldparam result [::Google::Longrunning::Operation]
1915
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1916
+ #
1917
+ # @return [::Google::Longrunning::Operation]
1918
+ # A result object deserialized from the server's reply
1919
+ def update_backup_policy request_pb, options = nil
1920
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1921
+
1922
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_policy_request request_pb
1923
+ query_string_params = if query_string_params.any?
1924
+ query_string_params.to_h { |p| p.split "=", 2 }
1925
+ else
1926
+ {}
1927
+ end
1928
+
1929
+ response = @client_stub.make_http_request(
1930
+ verb,
1931
+ uri: uri,
1932
+ body: body || "",
1933
+ params: query_string_params,
1934
+ options: options
1935
+ )
1936
+ operation = ::Gapic::Rest::TransportOperation.new response
1937
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1938
+
1939
+ yield result, operation if block_given?
1940
+ result
1941
+ end
1942
+
1943
+ ##
1944
+ # Baseline implementation for the delete_backup_policy REST call
1945
+ #
1946
+ # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest]
1947
+ # A request object representing the call parameters. Required.
1948
+ # @param options [::Gapic::CallOptions]
1949
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1950
+ #
1951
+ # @yield [result, operation] Access the result along with the TransportOperation object
1952
+ # @yieldparam result [::Google::Longrunning::Operation]
1953
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1954
+ #
1955
+ # @return [::Google::Longrunning::Operation]
1956
+ # A result object deserialized from the server's reply
1957
+ def delete_backup_policy request_pb, options = nil
1958
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1959
+
1960
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_policy_request request_pb
1961
+ query_string_params = if query_string_params.any?
1962
+ query_string_params.to_h { |p| p.split "=", 2 }
1963
+ else
1964
+ {}
1965
+ end
1966
+
1967
+ response = @client_stub.make_http_request(
1968
+ verb,
1969
+ uri: uri,
1970
+ body: body || "",
1971
+ params: query_string_params,
1972
+ options: options
1973
+ )
1974
+ operation = ::Gapic::Rest::TransportOperation.new response
1975
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1976
+
1977
+ yield result, operation if block_given?
1978
+ result
1979
+ end
1980
+
1411
1981
  ##
1412
1982
  # @private
1413
1983
  #
@@ -2181,6 +2751,327 @@ module Google
2181
2751
  )
2182
2752
  transcoder.transcode request_pb
2183
2753
  end
2754
+
2755
+ ##
2756
+ # @private
2757
+ #
2758
+ # GRPC transcoding helper method for the create_backup_vault REST call
2759
+ #
2760
+ # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupVaultRequest]
2761
+ # A request object representing the call parameters. Required.
2762
+ # @return [Array(String, [String, nil], Hash{String => String})]
2763
+ # Uri, Body, Query string parameters
2764
+ def self.transcode_create_backup_vault_request request_pb
2765
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2766
+ .with_bindings(
2767
+ uri_method: :post,
2768
+ uri_template: "/v1/{parent}/backupVaults",
2769
+ body: "backup_vault",
2770
+ matches: [
2771
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2772
+ ]
2773
+ )
2774
+ transcoder.transcode request_pb
2775
+ end
2776
+
2777
+ ##
2778
+ # @private
2779
+ #
2780
+ # GRPC transcoding helper method for the get_backup_vault REST call
2781
+ #
2782
+ # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupVaultRequest]
2783
+ # A request object representing the call parameters. Required.
2784
+ # @return [Array(String, [String, nil], Hash{String => String})]
2785
+ # Uri, Body, Query string parameters
2786
+ def self.transcode_get_backup_vault_request request_pb
2787
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2788
+ .with_bindings(
2789
+ uri_method: :get,
2790
+ uri_template: "/v1/{name}",
2791
+ matches: [
2792
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
2793
+ ]
2794
+ )
2795
+ transcoder.transcode request_pb
2796
+ end
2797
+
2798
+ ##
2799
+ # @private
2800
+ #
2801
+ # GRPC transcoding helper method for the list_backup_vaults REST call
2802
+ #
2803
+ # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupVaultsRequest]
2804
+ # A request object representing the call parameters. Required.
2805
+ # @return [Array(String, [String, nil], Hash{String => String})]
2806
+ # Uri, Body, Query string parameters
2807
+ def self.transcode_list_backup_vaults_request request_pb
2808
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2809
+ .with_bindings(
2810
+ uri_method: :get,
2811
+ uri_template: "/v1/{parent}/backupVaults",
2812
+ matches: [
2813
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2814
+ ]
2815
+ )
2816
+ transcoder.transcode request_pb
2817
+ end
2818
+
2819
+ ##
2820
+ # @private
2821
+ #
2822
+ # GRPC transcoding helper method for the update_backup_vault REST call
2823
+ #
2824
+ # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest]
2825
+ # A request object representing the call parameters. Required.
2826
+ # @return [Array(String, [String, nil], Hash{String => String})]
2827
+ # Uri, Body, Query string parameters
2828
+ def self.transcode_update_backup_vault_request request_pb
2829
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2830
+ .with_bindings(
2831
+ uri_method: :patch,
2832
+ uri_template: "/v1/{backup_vault.name}",
2833
+ body: "backup_vault",
2834
+ matches: [
2835
+ ["backup_vault.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
2836
+ ]
2837
+ )
2838
+ transcoder.transcode request_pb
2839
+ end
2840
+
2841
+ ##
2842
+ # @private
2843
+ #
2844
+ # GRPC transcoding helper method for the delete_backup_vault REST call
2845
+ #
2846
+ # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest]
2847
+ # A request object representing the call parameters. Required.
2848
+ # @return [Array(String, [String, nil], Hash{String => String})]
2849
+ # Uri, Body, Query string parameters
2850
+ def self.transcode_delete_backup_vault_request request_pb
2851
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2852
+ .with_bindings(
2853
+ uri_method: :delete,
2854
+ uri_template: "/v1/{name}",
2855
+ matches: [
2856
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
2857
+ ]
2858
+ )
2859
+ transcoder.transcode request_pb
2860
+ end
2861
+
2862
+ ##
2863
+ # @private
2864
+ #
2865
+ # GRPC transcoding helper method for the create_backup REST call
2866
+ #
2867
+ # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupRequest]
2868
+ # A request object representing the call parameters. Required.
2869
+ # @return [Array(String, [String, nil], Hash{String => String})]
2870
+ # Uri, Body, Query string parameters
2871
+ def self.transcode_create_backup_request request_pb
2872
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2873
+ .with_bindings(
2874
+ uri_method: :post,
2875
+ uri_template: "/v1/{parent}/backups",
2876
+ body: "backup",
2877
+ matches: [
2878
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
2879
+ ]
2880
+ )
2881
+ transcoder.transcode request_pb
2882
+ end
2883
+
2884
+ ##
2885
+ # @private
2886
+ #
2887
+ # GRPC transcoding helper method for the get_backup REST call
2888
+ #
2889
+ # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupRequest]
2890
+ # A request object representing the call parameters. Required.
2891
+ # @return [Array(String, [String, nil], Hash{String => String})]
2892
+ # Uri, Body, Query string parameters
2893
+ def self.transcode_get_backup_request request_pb
2894
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2895
+ .with_bindings(
2896
+ uri_method: :get,
2897
+ uri_template: "/v1/{name}",
2898
+ matches: [
2899
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+/?$}, false]
2900
+ ]
2901
+ )
2902
+ transcoder.transcode request_pb
2903
+ end
2904
+
2905
+ ##
2906
+ # @private
2907
+ #
2908
+ # GRPC transcoding helper method for the list_backups REST call
2909
+ #
2910
+ # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupsRequest]
2911
+ # A request object representing the call parameters. Required.
2912
+ # @return [Array(String, [String, nil], Hash{String => String})]
2913
+ # Uri, Body, Query string parameters
2914
+ def self.transcode_list_backups_request request_pb
2915
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2916
+ .with_bindings(
2917
+ uri_method: :get,
2918
+ uri_template: "/v1/{parent}/backups",
2919
+ matches: [
2920
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false]
2921
+ ]
2922
+ )
2923
+ transcoder.transcode request_pb
2924
+ end
2925
+
2926
+ ##
2927
+ # @private
2928
+ #
2929
+ # GRPC transcoding helper method for the delete_backup REST call
2930
+ #
2931
+ # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupRequest]
2932
+ # A request object representing the call parameters. Required.
2933
+ # @return [Array(String, [String, nil], Hash{String => String})]
2934
+ # Uri, Body, Query string parameters
2935
+ def self.transcode_delete_backup_request request_pb
2936
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2937
+ .with_bindings(
2938
+ uri_method: :delete,
2939
+ uri_template: "/v1/{name}",
2940
+ matches: [
2941
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+/?$}, false]
2942
+ ]
2943
+ )
2944
+ transcoder.transcode request_pb
2945
+ end
2946
+
2947
+ ##
2948
+ # @private
2949
+ #
2950
+ # GRPC transcoding helper method for the update_backup REST call
2951
+ #
2952
+ # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupRequest]
2953
+ # A request object representing the call parameters. Required.
2954
+ # @return [Array(String, [String, nil], Hash{String => String})]
2955
+ # Uri, Body, Query string parameters
2956
+ def self.transcode_update_backup_request request_pb
2957
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2958
+ .with_bindings(
2959
+ uri_method: :patch,
2960
+ uri_template: "/v1/{backup.name}",
2961
+ body: "backup",
2962
+ matches: [
2963
+ ["backup.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+/?$}, false]
2964
+ ]
2965
+ )
2966
+ transcoder.transcode request_pb
2967
+ end
2968
+
2969
+ ##
2970
+ # @private
2971
+ #
2972
+ # GRPC transcoding helper method for the create_backup_policy REST call
2973
+ #
2974
+ # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest]
2975
+ # A request object representing the call parameters. Required.
2976
+ # @return [Array(String, [String, nil], Hash{String => String})]
2977
+ # Uri, Body, Query string parameters
2978
+ def self.transcode_create_backup_policy_request request_pb
2979
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2980
+ .with_bindings(
2981
+ uri_method: :post,
2982
+ uri_template: "/v1/{parent}/backupPolicies",
2983
+ body: "backup_policy",
2984
+ matches: [
2985
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2986
+ ]
2987
+ )
2988
+ transcoder.transcode request_pb
2989
+ end
2990
+
2991
+ ##
2992
+ # @private
2993
+ #
2994
+ # GRPC transcoding helper method for the get_backup_policy REST call
2995
+ #
2996
+ # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupPolicyRequest]
2997
+ # A request object representing the call parameters. Required.
2998
+ # @return [Array(String, [String, nil], Hash{String => String})]
2999
+ # Uri, Body, Query string parameters
3000
+ def self.transcode_get_backup_policy_request request_pb
3001
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3002
+ .with_bindings(
3003
+ uri_method: :get,
3004
+ uri_template: "/v1/{name}",
3005
+ matches: [
3006
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+/?$}, false]
3007
+ ]
3008
+ )
3009
+ transcoder.transcode request_pb
3010
+ end
3011
+
3012
+ ##
3013
+ # @private
3014
+ #
3015
+ # GRPC transcoding helper method for the list_backup_policies REST call
3016
+ #
3017
+ # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest]
3018
+ # A request object representing the call parameters. Required.
3019
+ # @return [Array(String, [String, nil], Hash{String => String})]
3020
+ # Uri, Body, Query string parameters
3021
+ def self.transcode_list_backup_policies_request request_pb
3022
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3023
+ .with_bindings(
3024
+ uri_method: :get,
3025
+ uri_template: "/v1/{parent}/backupPolicies",
3026
+ matches: [
3027
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
3028
+ ]
3029
+ )
3030
+ transcoder.transcode request_pb
3031
+ end
3032
+
3033
+ ##
3034
+ # @private
3035
+ #
3036
+ # GRPC transcoding helper method for the update_backup_policy REST call
3037
+ #
3038
+ # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest]
3039
+ # A request object representing the call parameters. Required.
3040
+ # @return [Array(String, [String, nil], Hash{String => String})]
3041
+ # Uri, Body, Query string parameters
3042
+ def self.transcode_update_backup_policy_request request_pb
3043
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3044
+ .with_bindings(
3045
+ uri_method: :patch,
3046
+ uri_template: "/v1/{backup_policy.name}",
3047
+ body: "backup_policy",
3048
+ matches: [
3049
+ ["backup_policy.name", %r{^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+/?$}, false]
3050
+ ]
3051
+ )
3052
+ transcoder.transcode request_pb
3053
+ end
3054
+
3055
+ ##
3056
+ # @private
3057
+ #
3058
+ # GRPC transcoding helper method for the delete_backup_policy REST call
3059
+ #
3060
+ # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest]
3061
+ # A request object representing the call parameters. Required.
3062
+ # @return [Array(String, [String, nil], Hash{String => String})]
3063
+ # Uri, Body, Query string parameters
3064
+ def self.transcode_delete_backup_policy_request request_pb
3065
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3066
+ .with_bindings(
3067
+ uri_method: :delete,
3068
+ uri_template: "/v1/{name}",
3069
+ matches: [
3070
+ ["name", %r{^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+/?$}, false]
3071
+ ]
3072
+ )
3073
+ transcoder.transcode request_pb
3074
+ end
2184
3075
  end
2185
3076
  end
2186
3077
  end