google-cloud-developer_connect-v1 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/developer_connect/v1/developer_connect/client.rb +1087 -0
  3. data/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb +40 -0
  4. data/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb +1017 -0
  5. data/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb +613 -0
  6. data/lib/google/cloud/developer_connect/v1/rest.rb +1 -0
  7. data/lib/google/cloud/developer_connect/v1/version.rb +1 -1
  8. data/lib/google/cloud/developer_connect/v1.rb +1 -0
  9. data/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb +22 -1
  10. data/lib/google/cloud/developerconnect/v1/developer_connect_services_pb.rb +20 -0
  11. data/lib/google/cloud/developerconnect/v1/insights_config_pb.rb +69 -0
  12. data/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb +956 -0
  13. data/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb +47 -0
  14. data/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb +813 -0
  15. data/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb +69 -0
  16. data/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb +903 -0
  17. data/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb +914 -0
  18. data/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb +388 -0
  19. data/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb +62 -0
  20. data/lib/google/cloud/developerconnect/v1/insights_config_service.rb +64 -0
  21. data/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb +61 -0
  22. data/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb +515 -8
  23. data/proto_docs/google/cloud/developerconnect/v1/insights_config.rb +353 -0
  24. metadata +23 -23
@@ -1576,6 +1576,953 @@ module Google
1576
1576
  raise ::Google::Cloud::Error.from_error(e)
1577
1577
  end
1578
1578
 
1579
+ ##
1580
+ # Lists AccountConnectors in a given project and location.
1581
+ #
1582
+ # @overload list_account_connectors(request, options = nil)
1583
+ # Pass arguments to `list_account_connectors` via a request object, either of type
1584
+ # {::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest} or an equivalent Hash.
1585
+ #
1586
+ # @param request [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, ::Hash]
1587
+ # A request object representing the call parameters. Required. To specify no
1588
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1589
+ # @param options [::Gapic::CallOptions, ::Hash]
1590
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1591
+ #
1592
+ # @overload list_account_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1593
+ # Pass arguments to `list_account_connectors` via keyword arguments. Note that at
1594
+ # least one keyword argument is required. To specify no parameters, or to keep all
1595
+ # the default parameter values, pass an empty Hash as a request object (see above).
1596
+ #
1597
+ # @param parent [::String]
1598
+ # Required. Parent value for ListAccountConnectorsRequest
1599
+ # @param page_size [::Integer]
1600
+ # Optional. Requested page size. Server may return fewer items than
1601
+ # requested. If unspecified, server will pick an appropriate default.
1602
+ # @param page_token [::String]
1603
+ # Optional. A token identifying a page of results the server should return.
1604
+ # @param filter [::String]
1605
+ # Optional. Filtering results
1606
+ # @param order_by [::String]
1607
+ # Optional. Hint for how to order the results
1608
+ # @yield [result, operation] Access the result along with the TransportOperation object
1609
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>]
1610
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1611
+ #
1612
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>]
1613
+ #
1614
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1615
+ #
1616
+ # @example Basic example
1617
+ # require "google/cloud/developer_connect/v1"
1618
+ #
1619
+ # # Create a client object. The client can be reused for multiple calls.
1620
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
1621
+ #
1622
+ # # Create a request. To set request fields, pass in keyword arguments.
1623
+ # request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new
1624
+ #
1625
+ # # Call the list_account_connectors method.
1626
+ # result = client.list_account_connectors request
1627
+ #
1628
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1629
+ # # over elements, and API calls will be issued to fetch pages as needed.
1630
+ # result.each do |item|
1631
+ # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::AccountConnector.
1632
+ # p item
1633
+ # end
1634
+ #
1635
+ def list_account_connectors request, options = nil
1636
+ raise ::ArgumentError, "request must be provided" if request.nil?
1637
+
1638
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest
1639
+
1640
+ # Converts hash and nil to an options object
1641
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1642
+
1643
+ # Customize the options with defaults
1644
+ call_metadata = @config.rpcs.list_account_connectors.metadata.to_h
1645
+
1646
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1647
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1648
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1649
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
1650
+ transports_version_send: [:rest]
1651
+
1652
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1653
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1654
+
1655
+ options.apply_defaults timeout: @config.rpcs.list_account_connectors.timeout,
1656
+ metadata: call_metadata,
1657
+ retry_policy: @config.rpcs.list_account_connectors.retry_policy
1658
+
1659
+ options.apply_defaults timeout: @config.timeout,
1660
+ metadata: @config.metadata,
1661
+ retry_policy: @config.retry_policy
1662
+
1663
+ @developer_connect_stub.list_account_connectors request, options do |result, operation|
1664
+ result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_account_connectors, "account_connectors", request, result, options
1665
+ yield result, operation if block_given?
1666
+ throw :response, result
1667
+ end
1668
+ rescue ::Gapic::Rest::Error => e
1669
+ raise ::Google::Cloud::Error.from_error(e)
1670
+ end
1671
+
1672
+ ##
1673
+ # Gets details of a single AccountConnector.
1674
+ #
1675
+ # @overload get_account_connector(request, options = nil)
1676
+ # Pass arguments to `get_account_connector` via a request object, either of type
1677
+ # {::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest} or an equivalent Hash.
1678
+ #
1679
+ # @param request [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, ::Hash]
1680
+ # A request object representing the call parameters. Required. To specify no
1681
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1682
+ # @param options [::Gapic::CallOptions, ::Hash]
1683
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1684
+ #
1685
+ # @overload get_account_connector(name: nil)
1686
+ # Pass arguments to `get_account_connector` via keyword arguments. Note that at
1687
+ # least one keyword argument is required. To specify no parameters, or to keep all
1688
+ # the default parameter values, pass an empty Hash as a request object (see above).
1689
+ #
1690
+ # @param name [::String]
1691
+ # Required. Name of the resource
1692
+ # @yield [result, operation] Access the result along with the TransportOperation object
1693
+ # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::AccountConnector]
1694
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1695
+ #
1696
+ # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector]
1697
+ #
1698
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1699
+ #
1700
+ # @example Basic example
1701
+ # require "google/cloud/developer_connect/v1"
1702
+ #
1703
+ # # Create a client object. The client can be reused for multiple calls.
1704
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
1705
+ #
1706
+ # # Create a request. To set request fields, pass in keyword arguments.
1707
+ # request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new
1708
+ #
1709
+ # # Call the get_account_connector method.
1710
+ # result = client.get_account_connector request
1711
+ #
1712
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector.
1713
+ # p result
1714
+ #
1715
+ def get_account_connector request, options = nil
1716
+ raise ::ArgumentError, "request must be provided" if request.nil?
1717
+
1718
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest
1719
+
1720
+ # Converts hash and nil to an options object
1721
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1722
+
1723
+ # Customize the options with defaults
1724
+ call_metadata = @config.rpcs.get_account_connector.metadata.to_h
1725
+
1726
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1727
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1728
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1729
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
1730
+ transports_version_send: [:rest]
1731
+
1732
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1733
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1734
+
1735
+ options.apply_defaults timeout: @config.rpcs.get_account_connector.timeout,
1736
+ metadata: call_metadata,
1737
+ retry_policy: @config.rpcs.get_account_connector.retry_policy
1738
+
1739
+ options.apply_defaults timeout: @config.timeout,
1740
+ metadata: @config.metadata,
1741
+ retry_policy: @config.retry_policy
1742
+
1743
+ @developer_connect_stub.get_account_connector request, options do |result, operation|
1744
+ yield result, operation if block_given?
1745
+ end
1746
+ rescue ::Gapic::Rest::Error => e
1747
+ raise ::Google::Cloud::Error.from_error(e)
1748
+ end
1749
+
1750
+ ##
1751
+ # Creates a new AccountConnector in a given project and location.
1752
+ #
1753
+ # @overload create_account_connector(request, options = nil)
1754
+ # Pass arguments to `create_account_connector` via a request object, either of type
1755
+ # {::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest} or an equivalent Hash.
1756
+ #
1757
+ # @param request [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, ::Hash]
1758
+ # A request object representing the call parameters. Required. To specify no
1759
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1760
+ # @param options [::Gapic::CallOptions, ::Hash]
1761
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1762
+ #
1763
+ # @overload create_account_connector(parent: nil, account_connector_id: nil, account_connector: nil, request_id: nil, validate_only: nil)
1764
+ # Pass arguments to `create_account_connector` via keyword arguments. Note that at
1765
+ # least one keyword argument is required. To specify no parameters, or to keep all
1766
+ # the default parameter values, pass an empty Hash as a request object (see above).
1767
+ #
1768
+ # @param parent [::String]
1769
+ # Required. Location resource name as the account_connector’s parent.
1770
+ # @param account_connector_id [::String]
1771
+ # Required. The ID to use for the AccountConnector, which will become the
1772
+ # final component of the AccountConnector's resource name. Its format should
1773
+ # adhere to https://google.aip.dev/122#resource-id-segments Names must be
1774
+ # unique per-project per-location.
1775
+ # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash]
1776
+ # Required. The AccountConnector to create.
1777
+ # @param request_id [::String]
1778
+ # Optional. An optional request ID to identify requests. Specify a unique
1779
+ # request ID so that if you must retry your request, the server will know to
1780
+ # ignore the request if it has already been completed. The server will
1781
+ # guarantee that for at least 60 minutes since the first request.
1782
+ #
1783
+ # For example, consider a situation where you make an initial request and the
1784
+ # request times out. If you make the request again with the same request
1785
+ # ID, the server can check if original operation with the same request ID
1786
+ # was received, and if so, will ignore the second request. This prevents
1787
+ # clients from accidentally creating duplicate commitments.
1788
+ #
1789
+ # The request ID must be a valid UUID with the exception that zero UUID is
1790
+ # not supported (00000000-0000-0000-0000-000000000000).
1791
+ # @param validate_only [::Boolean]
1792
+ # Optional. If set, validate the request, but do not actually post it.
1793
+ # @yield [result, operation] Access the result along with the TransportOperation object
1794
+ # @yieldparam result [::Gapic::Operation]
1795
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1796
+ #
1797
+ # @return [::Gapic::Operation]
1798
+ #
1799
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1800
+ #
1801
+ # @example Basic example
1802
+ # require "google/cloud/developer_connect/v1"
1803
+ #
1804
+ # # Create a client object. The client can be reused for multiple calls.
1805
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
1806
+ #
1807
+ # # Create a request. To set request fields, pass in keyword arguments.
1808
+ # request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new
1809
+ #
1810
+ # # Call the create_account_connector method.
1811
+ # result = client.create_account_connector request
1812
+ #
1813
+ # # The returned object is of type Gapic::Operation. You can use it to
1814
+ # # check the status of an operation, cancel it, or wait for results.
1815
+ # # Here is how to wait for a response.
1816
+ # result.wait_until_done! timeout: 60
1817
+ # if result.response?
1818
+ # p result.response
1819
+ # else
1820
+ # puts "No response received."
1821
+ # end
1822
+ #
1823
+ def create_account_connector request, options = nil
1824
+ raise ::ArgumentError, "request must be provided" if request.nil?
1825
+
1826
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest
1827
+
1828
+ # Converts hash and nil to an options object
1829
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1830
+
1831
+ # Customize the options with defaults
1832
+ call_metadata = @config.rpcs.create_account_connector.metadata.to_h
1833
+
1834
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1835
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1836
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1837
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
1838
+ transports_version_send: [:rest]
1839
+
1840
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1841
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1842
+
1843
+ options.apply_defaults timeout: @config.rpcs.create_account_connector.timeout,
1844
+ metadata: call_metadata,
1845
+ retry_policy: @config.rpcs.create_account_connector.retry_policy
1846
+
1847
+ options.apply_defaults timeout: @config.timeout,
1848
+ metadata: @config.metadata,
1849
+ retry_policy: @config.retry_policy
1850
+
1851
+ @developer_connect_stub.create_account_connector request, options do |result, operation|
1852
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1853
+ yield result, operation if block_given?
1854
+ throw :response, result
1855
+ end
1856
+ rescue ::Gapic::Rest::Error => e
1857
+ raise ::Google::Cloud::Error.from_error(e)
1858
+ end
1859
+
1860
+ ##
1861
+ # Updates the parameters of a single AccountConnector.
1862
+ #
1863
+ # @overload update_account_connector(request, options = nil)
1864
+ # Pass arguments to `update_account_connector` via a request object, either of type
1865
+ # {::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest} or an equivalent Hash.
1866
+ #
1867
+ # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, ::Hash]
1868
+ # A request object representing the call parameters. Required. To specify no
1869
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1870
+ # @param options [::Gapic::CallOptions, ::Hash]
1871
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1872
+ #
1873
+ # @overload update_account_connector(update_mask: nil, account_connector: nil, request_id: nil, allow_missing: nil, validate_only: nil)
1874
+ # Pass arguments to `update_account_connector` via keyword arguments. Note that at
1875
+ # least one keyword argument is required. To specify no parameters, or to keep all
1876
+ # the default parameter values, pass an empty Hash as a request object (see above).
1877
+ #
1878
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1879
+ # Optional. The list of fields to be updated.
1880
+ # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash]
1881
+ # Required. The AccountConnector to update.
1882
+ # @param request_id [::String]
1883
+ # Optional. An optional request ID to identify requests. Specify a unique
1884
+ # request ID so that if you must retry your request, the server will know to
1885
+ # ignore the request if it has already been completed. The server will
1886
+ # guarantee that for at least 60 minutes since the first request.
1887
+ #
1888
+ # For example, consider a situation where you make an initial request and the
1889
+ # request times out. If you make the request again with the same request
1890
+ # ID, the server can check if original operation with the same request ID
1891
+ # was received, and if so, will ignore the second request. This prevents
1892
+ # clients from accidentally creating duplicate commitments.
1893
+ #
1894
+ # The request ID must be a valid UUID with the exception that zero UUID is
1895
+ # not supported (00000000-0000-0000-0000-000000000000).
1896
+ # @param allow_missing [::Boolean]
1897
+ # Optional. If set to true, and the accountConnector is not found a new
1898
+ # accountConnector will be created. In this situation `update_mask` is
1899
+ # ignored. The creation will succeed only if the input accountConnector has
1900
+ # all the necessary
1901
+ # @param validate_only [::Boolean]
1902
+ # Optional. If set, validate the request, but do not actually post it.
1903
+ # @yield [result, operation] Access the result along with the TransportOperation object
1904
+ # @yieldparam result [::Gapic::Operation]
1905
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1906
+ #
1907
+ # @return [::Gapic::Operation]
1908
+ #
1909
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1910
+ #
1911
+ # @example Basic example
1912
+ # require "google/cloud/developer_connect/v1"
1913
+ #
1914
+ # # Create a client object. The client can be reused for multiple calls.
1915
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
1916
+ #
1917
+ # # Create a request. To set request fields, pass in keyword arguments.
1918
+ # request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new
1919
+ #
1920
+ # # Call the update_account_connector method.
1921
+ # result = client.update_account_connector request
1922
+ #
1923
+ # # The returned object is of type Gapic::Operation. You can use it to
1924
+ # # check the status of an operation, cancel it, or wait for results.
1925
+ # # Here is how to wait for a response.
1926
+ # result.wait_until_done! timeout: 60
1927
+ # if result.response?
1928
+ # p result.response
1929
+ # else
1930
+ # puts "No response received."
1931
+ # end
1932
+ #
1933
+ def update_account_connector request, options = nil
1934
+ raise ::ArgumentError, "request must be provided" if request.nil?
1935
+
1936
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest
1937
+
1938
+ # Converts hash and nil to an options object
1939
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1940
+
1941
+ # Customize the options with defaults
1942
+ call_metadata = @config.rpcs.update_account_connector.metadata.to_h
1943
+
1944
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1945
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1946
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1947
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
1948
+ transports_version_send: [:rest]
1949
+
1950
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1951
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1952
+
1953
+ options.apply_defaults timeout: @config.rpcs.update_account_connector.timeout,
1954
+ metadata: call_metadata,
1955
+ retry_policy: @config.rpcs.update_account_connector.retry_policy
1956
+
1957
+ options.apply_defaults timeout: @config.timeout,
1958
+ metadata: @config.metadata,
1959
+ retry_policy: @config.retry_policy
1960
+
1961
+ @developer_connect_stub.update_account_connector request, options do |result, operation|
1962
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1963
+ yield result, operation if block_given?
1964
+ throw :response, result
1965
+ end
1966
+ rescue ::Gapic::Rest::Error => e
1967
+ raise ::Google::Cloud::Error.from_error(e)
1968
+ end
1969
+
1970
+ ##
1971
+ # Deletes a single AccountConnector.
1972
+ #
1973
+ # @overload delete_account_connector(request, options = nil)
1974
+ # Pass arguments to `delete_account_connector` via a request object, either of type
1975
+ # {::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest} or an equivalent Hash.
1976
+ #
1977
+ # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, ::Hash]
1978
+ # A request object representing the call parameters. Required. To specify no
1979
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1980
+ # @param options [::Gapic::CallOptions, ::Hash]
1981
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1982
+ #
1983
+ # @overload delete_account_connector(name: nil, request_id: nil, validate_only: nil, etag: nil, force: nil)
1984
+ # Pass arguments to `delete_account_connector` via keyword arguments. Note that at
1985
+ # least one keyword argument is required. To specify no parameters, or to keep all
1986
+ # the default parameter values, pass an empty Hash as a request object (see above).
1987
+ #
1988
+ # @param name [::String]
1989
+ # Required. Name of the resource
1990
+ # @param request_id [::String]
1991
+ # Optional. An optional request ID to identify requests. Specify a unique
1992
+ # request ID so that if you must retry your request, the server will know to
1993
+ # ignore the request if it has already been completed. The server will
1994
+ # guarantee that for at least 60 minutes after the first request.
1995
+ #
1996
+ # For example, consider a situation where you make an initial request and the
1997
+ # request times out. If you make the request again with the same request
1998
+ # ID, the server can check if original operation with the same request ID
1999
+ # was received, and if so, will ignore the second request. This prevents
2000
+ # clients from accidentally creating duplicate commitments.
2001
+ #
2002
+ # The request ID must be a valid UUID with the exception that zero UUID is
2003
+ # not supported (00000000-0000-0000-0000-000000000000).
2004
+ # @param validate_only [::Boolean]
2005
+ # Optional. If set, validate the request, but do not actually post it.
2006
+ # @param etag [::String]
2007
+ # Optional. The current etag of the AccountConnectorn.
2008
+ # If an etag is provided and does not match the current etag of the
2009
+ # AccountConnector, deletion will be blocked and an ABORTED error will be
2010
+ # returned.
2011
+ # @param force [::Boolean]
2012
+ # Optional. If set to true, any Users from this AccountConnector will also
2013
+ # be deleted. (Otherwise, the request will only work if the AccountConnector
2014
+ # has no Users.)
2015
+ # @yield [result, operation] Access the result along with the TransportOperation object
2016
+ # @yieldparam result [::Gapic::Operation]
2017
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2018
+ #
2019
+ # @return [::Gapic::Operation]
2020
+ #
2021
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2022
+ #
2023
+ # @example Basic example
2024
+ # require "google/cloud/developer_connect/v1"
2025
+ #
2026
+ # # Create a client object. The client can be reused for multiple calls.
2027
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
2028
+ #
2029
+ # # Create a request. To set request fields, pass in keyword arguments.
2030
+ # request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new
2031
+ #
2032
+ # # Call the delete_account_connector method.
2033
+ # result = client.delete_account_connector request
2034
+ #
2035
+ # # The returned object is of type Gapic::Operation. You can use it to
2036
+ # # check the status of an operation, cancel it, or wait for results.
2037
+ # # Here is how to wait for a response.
2038
+ # result.wait_until_done! timeout: 60
2039
+ # if result.response?
2040
+ # p result.response
2041
+ # else
2042
+ # puts "No response received."
2043
+ # end
2044
+ #
2045
+ def delete_account_connector request, options = nil
2046
+ raise ::ArgumentError, "request must be provided" if request.nil?
2047
+
2048
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest
2049
+
2050
+ # Converts hash and nil to an options object
2051
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2052
+
2053
+ # Customize the options with defaults
2054
+ call_metadata = @config.rpcs.delete_account_connector.metadata.to_h
2055
+
2056
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2057
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2058
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2059
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
2060
+ transports_version_send: [:rest]
2061
+
2062
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2063
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2064
+
2065
+ options.apply_defaults timeout: @config.rpcs.delete_account_connector.timeout,
2066
+ metadata: call_metadata,
2067
+ retry_policy: @config.rpcs.delete_account_connector.retry_policy
2068
+
2069
+ options.apply_defaults timeout: @config.timeout,
2070
+ metadata: @config.metadata,
2071
+ retry_policy: @config.retry_policy
2072
+
2073
+ @developer_connect_stub.delete_account_connector request, options do |result, operation|
2074
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2075
+ yield result, operation if block_given?
2076
+ throw :response, result
2077
+ end
2078
+ rescue ::Gapic::Rest::Error => e
2079
+ raise ::Google::Cloud::Error.from_error(e)
2080
+ end
2081
+
2082
+ ##
2083
+ # Fetches OAuth access token based on end user credentials.
2084
+ #
2085
+ # @overload fetch_access_token(request, options = nil)
2086
+ # Pass arguments to `fetch_access_token` via a request object, either of type
2087
+ # {::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest} or an equivalent Hash.
2088
+ #
2089
+ # @param request [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, ::Hash]
2090
+ # A request object representing the call parameters. Required. To specify no
2091
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2092
+ # @param options [::Gapic::CallOptions, ::Hash]
2093
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2094
+ #
2095
+ # @overload fetch_access_token(account_connector: nil)
2096
+ # Pass arguments to `fetch_access_token` via keyword arguments. Note that at
2097
+ # least one keyword argument is required. To specify no parameters, or to keep all
2098
+ # the default parameter values, pass an empty Hash as a request object (see above).
2099
+ #
2100
+ # @param account_connector [::String]
2101
+ # Required. The resource name of the AccountConnector in the format
2102
+ # `projects/*/locations/*/accountConnectors/*`.
2103
+ # @yield [result, operation] Access the result along with the TransportOperation object
2104
+ # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse]
2105
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2106
+ #
2107
+ # @return [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse]
2108
+ #
2109
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2110
+ #
2111
+ # @example Basic example
2112
+ # require "google/cloud/developer_connect/v1"
2113
+ #
2114
+ # # Create a client object. The client can be reused for multiple calls.
2115
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
2116
+ #
2117
+ # # Create a request. To set request fields, pass in keyword arguments.
2118
+ # request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new
2119
+ #
2120
+ # # Call the fetch_access_token method.
2121
+ # result = client.fetch_access_token request
2122
+ #
2123
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse.
2124
+ # p result
2125
+ #
2126
+ def fetch_access_token request, options = nil
2127
+ raise ::ArgumentError, "request must be provided" if request.nil?
2128
+
2129
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest
2130
+
2131
+ # Converts hash and nil to an options object
2132
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2133
+
2134
+ # Customize the options with defaults
2135
+ call_metadata = @config.rpcs.fetch_access_token.metadata.to_h
2136
+
2137
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2138
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2139
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2140
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
2141
+ transports_version_send: [:rest]
2142
+
2143
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2144
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2145
+
2146
+ options.apply_defaults timeout: @config.rpcs.fetch_access_token.timeout,
2147
+ metadata: call_metadata,
2148
+ retry_policy: @config.rpcs.fetch_access_token.retry_policy
2149
+
2150
+ options.apply_defaults timeout: @config.timeout,
2151
+ metadata: @config.metadata,
2152
+ retry_policy: @config.retry_policy
2153
+
2154
+ @developer_connect_stub.fetch_access_token request, options do |result, operation|
2155
+ yield result, operation if block_given?
2156
+ end
2157
+ rescue ::Gapic::Rest::Error => e
2158
+ raise ::Google::Cloud::Error.from_error(e)
2159
+ end
2160
+
2161
+ ##
2162
+ # Lists Users in a given project, location, and account_connector.
2163
+ #
2164
+ # @overload list_users(request, options = nil)
2165
+ # Pass arguments to `list_users` via a request object, either of type
2166
+ # {::Google::Cloud::DeveloperConnect::V1::ListUsersRequest} or an equivalent Hash.
2167
+ #
2168
+ # @param request [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, ::Hash]
2169
+ # A request object representing the call parameters. Required. To specify no
2170
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2171
+ # @param options [::Gapic::CallOptions, ::Hash]
2172
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2173
+ #
2174
+ # @overload list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2175
+ # Pass arguments to `list_users` via keyword arguments. Note that at
2176
+ # least one keyword argument is required. To specify no parameters, or to keep all
2177
+ # the default parameter values, pass an empty Hash as a request object (see above).
2178
+ #
2179
+ # @param parent [::String]
2180
+ # Required. Parent value for ListUsersRequest
2181
+ # @param page_size [::Integer]
2182
+ # Optional. Requested page size. Server may return fewer items than
2183
+ # requested. If unspecified, server will pick an appropriate default.
2184
+ # @param page_token [::String]
2185
+ # Optional. A token identifying a page of results the server should return.
2186
+ # @param filter [::String]
2187
+ # Optional. Filtering results
2188
+ # @param order_by [::String]
2189
+ # Optional. Hint for how to order the results
2190
+ # @yield [result, operation] Access the result along with the TransportOperation object
2191
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>]
2192
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2193
+ #
2194
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>]
2195
+ #
2196
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2197
+ #
2198
+ # @example Basic example
2199
+ # require "google/cloud/developer_connect/v1"
2200
+ #
2201
+ # # Create a client object. The client can be reused for multiple calls.
2202
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
2203
+ #
2204
+ # # Create a request. To set request fields, pass in keyword arguments.
2205
+ # request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new
2206
+ #
2207
+ # # Call the list_users method.
2208
+ # result = client.list_users request
2209
+ #
2210
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2211
+ # # over elements, and API calls will be issued to fetch pages as needed.
2212
+ # result.each do |item|
2213
+ # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::User.
2214
+ # p item
2215
+ # end
2216
+ #
2217
+ def list_users request, options = nil
2218
+ raise ::ArgumentError, "request must be provided" if request.nil?
2219
+
2220
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest
2221
+
2222
+ # Converts hash and nil to an options object
2223
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2224
+
2225
+ # Customize the options with defaults
2226
+ call_metadata = @config.rpcs.list_users.metadata.to_h
2227
+
2228
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2229
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2230
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2231
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
2232
+ transports_version_send: [:rest]
2233
+
2234
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2235
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2236
+
2237
+ options.apply_defaults timeout: @config.rpcs.list_users.timeout,
2238
+ metadata: call_metadata,
2239
+ retry_policy: @config.rpcs.list_users.retry_policy
2240
+
2241
+ options.apply_defaults timeout: @config.timeout,
2242
+ metadata: @config.metadata,
2243
+ retry_policy: @config.retry_policy
2244
+
2245
+ @developer_connect_stub.list_users request, options do |result, operation|
2246
+ result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_users, "users", request, result, options
2247
+ yield result, operation if block_given?
2248
+ throw :response, result
2249
+ end
2250
+ rescue ::Gapic::Rest::Error => e
2251
+ raise ::Google::Cloud::Error.from_error(e)
2252
+ end
2253
+
2254
+ ##
2255
+ # Deletes a single User.
2256
+ #
2257
+ # @overload delete_user(request, options = nil)
2258
+ # Pass arguments to `delete_user` via a request object, either of type
2259
+ # {::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest} or an equivalent Hash.
2260
+ #
2261
+ # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, ::Hash]
2262
+ # A request object representing the call parameters. Required. To specify no
2263
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2264
+ # @param options [::Gapic::CallOptions, ::Hash]
2265
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2266
+ #
2267
+ # @overload delete_user(name: nil, request_id: nil, validate_only: nil, etag: nil)
2268
+ # Pass arguments to `delete_user` via keyword arguments. Note that at
2269
+ # least one keyword argument is required. To specify no parameters, or to keep all
2270
+ # the default parameter values, pass an empty Hash as a request object (see above).
2271
+ #
2272
+ # @param name [::String]
2273
+ # Required. Name of the resource
2274
+ # @param request_id [::String]
2275
+ # Optional. An optional request ID to identify requests. Specify a unique
2276
+ # request ID so that if you must retry your request, the server will know to
2277
+ # ignore the request if it has already been completed. The server will
2278
+ # guarantee that for at least 60 minutes after the first request.
2279
+ #
2280
+ # For example, consider a situation where you make an initial request and the
2281
+ # request times out. If you make the request again with the same request
2282
+ # ID, the server can check if original operation with the same request ID
2283
+ # was received, and if so, will ignore the second request. This prevents
2284
+ # clients from accidentally creating duplicate commitments.
2285
+ #
2286
+ # The request ID must be a valid UUID with the exception that zero UUID is
2287
+ # not supported (00000000-0000-0000-0000-000000000000).
2288
+ # @param validate_only [::Boolean]
2289
+ # Optional. If set, validate the request, but do not actually post it.
2290
+ # @param etag [::String]
2291
+ # Optional. This checksum is computed by the server based on the value of
2292
+ # other fields, and may be sent on update and delete requests to ensure the
2293
+ # client has an up-to-date value before proceeding.
2294
+ # @yield [result, operation] Access the result along with the TransportOperation object
2295
+ # @yieldparam result [::Gapic::Operation]
2296
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2297
+ #
2298
+ # @return [::Gapic::Operation]
2299
+ #
2300
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2301
+ #
2302
+ # @example Basic example
2303
+ # require "google/cloud/developer_connect/v1"
2304
+ #
2305
+ # # Create a client object. The client can be reused for multiple calls.
2306
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
2307
+ #
2308
+ # # Create a request. To set request fields, pass in keyword arguments.
2309
+ # request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new
2310
+ #
2311
+ # # Call the delete_user method.
2312
+ # result = client.delete_user request
2313
+ #
2314
+ # # The returned object is of type Gapic::Operation. You can use it to
2315
+ # # check the status of an operation, cancel it, or wait for results.
2316
+ # # Here is how to wait for a response.
2317
+ # result.wait_until_done! timeout: 60
2318
+ # if result.response?
2319
+ # p result.response
2320
+ # else
2321
+ # puts "No response received."
2322
+ # end
2323
+ #
2324
+ def delete_user request, options = nil
2325
+ raise ::ArgumentError, "request must be provided" if request.nil?
2326
+
2327
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest
2328
+
2329
+ # Converts hash and nil to an options object
2330
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2331
+
2332
+ # Customize the options with defaults
2333
+ call_metadata = @config.rpcs.delete_user.metadata.to_h
2334
+
2335
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2336
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2337
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2338
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
2339
+ transports_version_send: [:rest]
2340
+
2341
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2342
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2343
+
2344
+ options.apply_defaults timeout: @config.rpcs.delete_user.timeout,
2345
+ metadata: call_metadata,
2346
+ retry_policy: @config.rpcs.delete_user.retry_policy
2347
+
2348
+ options.apply_defaults timeout: @config.timeout,
2349
+ metadata: @config.metadata,
2350
+ retry_policy: @config.retry_policy
2351
+
2352
+ @developer_connect_stub.delete_user request, options do |result, operation|
2353
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2354
+ yield result, operation if block_given?
2355
+ throw :response, result
2356
+ end
2357
+ rescue ::Gapic::Rest::Error => e
2358
+ raise ::Google::Cloud::Error.from_error(e)
2359
+ end
2360
+
2361
+ ##
2362
+ # Fetch the User based on the user credentials.
2363
+ #
2364
+ # @overload fetch_self(request, options = nil)
2365
+ # Pass arguments to `fetch_self` via a request object, either of type
2366
+ # {::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest} or an equivalent Hash.
2367
+ #
2368
+ # @param request [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, ::Hash]
2369
+ # A request object representing the call parameters. Required. To specify no
2370
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2371
+ # @param options [::Gapic::CallOptions, ::Hash]
2372
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2373
+ #
2374
+ # @overload fetch_self(name: nil)
2375
+ # Pass arguments to `fetch_self` via keyword arguments. Note that at
2376
+ # least one keyword argument is required. To specify no parameters, or to keep all
2377
+ # the default parameter values, pass an empty Hash as a request object (see above).
2378
+ #
2379
+ # @param name [::String]
2380
+ # Required. Name of the AccountConnector resource
2381
+ # @yield [result, operation] Access the result along with the TransportOperation object
2382
+ # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::User]
2383
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2384
+ #
2385
+ # @return [::Google::Cloud::DeveloperConnect::V1::User]
2386
+ #
2387
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2388
+ #
2389
+ # @example Basic example
2390
+ # require "google/cloud/developer_connect/v1"
2391
+ #
2392
+ # # Create a client object. The client can be reused for multiple calls.
2393
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
2394
+ #
2395
+ # # Create a request. To set request fields, pass in keyword arguments.
2396
+ # request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new
2397
+ #
2398
+ # # Call the fetch_self method.
2399
+ # result = client.fetch_self request
2400
+ #
2401
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::User.
2402
+ # p result
2403
+ #
2404
+ def fetch_self request, options = nil
2405
+ raise ::ArgumentError, "request must be provided" if request.nil?
2406
+
2407
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest
2408
+
2409
+ # Converts hash and nil to an options object
2410
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2411
+
2412
+ # Customize the options with defaults
2413
+ call_metadata = @config.rpcs.fetch_self.metadata.to_h
2414
+
2415
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2416
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2417
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2418
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
2419
+ transports_version_send: [:rest]
2420
+
2421
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2422
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2423
+
2424
+ options.apply_defaults timeout: @config.rpcs.fetch_self.timeout,
2425
+ metadata: call_metadata,
2426
+ retry_policy: @config.rpcs.fetch_self.retry_policy
2427
+
2428
+ options.apply_defaults timeout: @config.timeout,
2429
+ metadata: @config.metadata,
2430
+ retry_policy: @config.retry_policy
2431
+
2432
+ @developer_connect_stub.fetch_self request, options do |result, operation|
2433
+ yield result, operation if block_given?
2434
+ end
2435
+ rescue ::Gapic::Rest::Error => e
2436
+ raise ::Google::Cloud::Error.from_error(e)
2437
+ end
2438
+
2439
+ ##
2440
+ # Delete the User based on the user credentials.
2441
+ #
2442
+ # @overload delete_self(request, options = nil)
2443
+ # Pass arguments to `delete_self` via a request object, either of type
2444
+ # {::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest} or an equivalent Hash.
2445
+ #
2446
+ # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, ::Hash]
2447
+ # A request object representing the call parameters. Required. To specify no
2448
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2449
+ # @param options [::Gapic::CallOptions, ::Hash]
2450
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2451
+ #
2452
+ # @overload delete_self(name: nil)
2453
+ # Pass arguments to `delete_self` via keyword arguments. Note that at
2454
+ # least one keyword argument is required. To specify no parameters, or to keep all
2455
+ # the default parameter values, pass an empty Hash as a request object (see above).
2456
+ #
2457
+ # @param name [::String]
2458
+ # Required. Name of the AccountConnector resource
2459
+ # @yield [result, operation] Access the result along with the TransportOperation object
2460
+ # @yieldparam result [::Gapic::Operation]
2461
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2462
+ #
2463
+ # @return [::Gapic::Operation]
2464
+ #
2465
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2466
+ #
2467
+ # @example Basic example
2468
+ # require "google/cloud/developer_connect/v1"
2469
+ #
2470
+ # # Create a client object. The client can be reused for multiple calls.
2471
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new
2472
+ #
2473
+ # # Create a request. To set request fields, pass in keyword arguments.
2474
+ # request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new
2475
+ #
2476
+ # # Call the delete_self method.
2477
+ # result = client.delete_self request
2478
+ #
2479
+ # # The returned object is of type Gapic::Operation. You can use it to
2480
+ # # check the status of an operation, cancel it, or wait for results.
2481
+ # # Here is how to wait for a response.
2482
+ # result.wait_until_done! timeout: 60
2483
+ # if result.response?
2484
+ # p result.response
2485
+ # else
2486
+ # puts "No response received."
2487
+ # end
2488
+ #
2489
+ def delete_self request, options = nil
2490
+ raise ::ArgumentError, "request must be provided" if request.nil?
2491
+
2492
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest
2493
+
2494
+ # Converts hash and nil to an options object
2495
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2496
+
2497
+ # Customize the options with defaults
2498
+ call_metadata = @config.rpcs.delete_self.metadata.to_h
2499
+
2500
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2501
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2502
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2503
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION,
2504
+ transports_version_send: [:rest]
2505
+
2506
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2507
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2508
+
2509
+ options.apply_defaults timeout: @config.rpcs.delete_self.timeout,
2510
+ metadata: call_metadata,
2511
+ retry_policy: @config.rpcs.delete_self.retry_policy
2512
+
2513
+ options.apply_defaults timeout: @config.timeout,
2514
+ metadata: @config.metadata,
2515
+ retry_policy: @config.retry_policy
2516
+
2517
+ @developer_connect_stub.delete_self request, options do |result, operation|
2518
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2519
+ yield result, operation if block_given?
2520
+ throw :response, result
2521
+ end
2522
+ rescue ::Gapic::Rest::Error => e
2523
+ raise ::Google::Cloud::Error.from_error(e)
2524
+ end
2525
+
1579
2526
  ##
1580
2527
  # Configuration class for the DeveloperConnect REST API.
1581
2528
  #
@@ -1799,6 +2746,56 @@ module Google
1799
2746
  # @return [::Gapic::Config::Method]
1800
2747
  #
1801
2748
  attr_reader :fetch_git_refs
2749
+ ##
2750
+ # RPC-specific configuration for `list_account_connectors`
2751
+ # @return [::Gapic::Config::Method]
2752
+ #
2753
+ attr_reader :list_account_connectors
2754
+ ##
2755
+ # RPC-specific configuration for `get_account_connector`
2756
+ # @return [::Gapic::Config::Method]
2757
+ #
2758
+ attr_reader :get_account_connector
2759
+ ##
2760
+ # RPC-specific configuration for `create_account_connector`
2761
+ # @return [::Gapic::Config::Method]
2762
+ #
2763
+ attr_reader :create_account_connector
2764
+ ##
2765
+ # RPC-specific configuration for `update_account_connector`
2766
+ # @return [::Gapic::Config::Method]
2767
+ #
2768
+ attr_reader :update_account_connector
2769
+ ##
2770
+ # RPC-specific configuration for `delete_account_connector`
2771
+ # @return [::Gapic::Config::Method]
2772
+ #
2773
+ attr_reader :delete_account_connector
2774
+ ##
2775
+ # RPC-specific configuration for `fetch_access_token`
2776
+ # @return [::Gapic::Config::Method]
2777
+ #
2778
+ attr_reader :fetch_access_token
2779
+ ##
2780
+ # RPC-specific configuration for `list_users`
2781
+ # @return [::Gapic::Config::Method]
2782
+ #
2783
+ attr_reader :list_users
2784
+ ##
2785
+ # RPC-specific configuration for `delete_user`
2786
+ # @return [::Gapic::Config::Method]
2787
+ #
2788
+ attr_reader :delete_user
2789
+ ##
2790
+ # RPC-specific configuration for `fetch_self`
2791
+ # @return [::Gapic::Config::Method]
2792
+ #
2793
+ attr_reader :fetch_self
2794
+ ##
2795
+ # RPC-specific configuration for `delete_self`
2796
+ # @return [::Gapic::Config::Method]
2797
+ #
2798
+ attr_reader :delete_self
1802
2799
 
1803
2800
  # @private
1804
2801
  def initialize parent_rpcs = nil
@@ -1830,6 +2827,26 @@ module Google
1830
2827
  @fetch_git_hub_installations = ::Gapic::Config::Method.new fetch_git_hub_installations_config
1831
2828
  fetch_git_refs_config = parent_rpcs.fetch_git_refs if parent_rpcs.respond_to? :fetch_git_refs
1832
2829
  @fetch_git_refs = ::Gapic::Config::Method.new fetch_git_refs_config
2830
+ list_account_connectors_config = parent_rpcs.list_account_connectors if parent_rpcs.respond_to? :list_account_connectors
2831
+ @list_account_connectors = ::Gapic::Config::Method.new list_account_connectors_config
2832
+ get_account_connector_config = parent_rpcs.get_account_connector if parent_rpcs.respond_to? :get_account_connector
2833
+ @get_account_connector = ::Gapic::Config::Method.new get_account_connector_config
2834
+ create_account_connector_config = parent_rpcs.create_account_connector if parent_rpcs.respond_to? :create_account_connector
2835
+ @create_account_connector = ::Gapic::Config::Method.new create_account_connector_config
2836
+ update_account_connector_config = parent_rpcs.update_account_connector if parent_rpcs.respond_to? :update_account_connector
2837
+ @update_account_connector = ::Gapic::Config::Method.new update_account_connector_config
2838
+ delete_account_connector_config = parent_rpcs.delete_account_connector if parent_rpcs.respond_to? :delete_account_connector
2839
+ @delete_account_connector = ::Gapic::Config::Method.new delete_account_connector_config
2840
+ fetch_access_token_config = parent_rpcs.fetch_access_token if parent_rpcs.respond_to? :fetch_access_token
2841
+ @fetch_access_token = ::Gapic::Config::Method.new fetch_access_token_config
2842
+ list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users
2843
+ @list_users = ::Gapic::Config::Method.new list_users_config
2844
+ delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user
2845
+ @delete_user = ::Gapic::Config::Method.new delete_user_config
2846
+ fetch_self_config = parent_rpcs.fetch_self if parent_rpcs.respond_to? :fetch_self
2847
+ @fetch_self = ::Gapic::Config::Method.new fetch_self_config
2848
+ delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self
2849
+ @delete_self = ::Gapic::Config::Method.new delete_self_config
1833
2850
 
1834
2851
  yield self if block_given?
1835
2852
  end