google-cloud-developer_connect-v1 1.1.0 → 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 +14 -2
@@ -1680,6 +1680,1023 @@ module Google
1680
1680
  raise ::Google::Cloud::Error.from_error(e)
1681
1681
  end
1682
1682
 
1683
+ ##
1684
+ # Lists AccountConnectors in a given project and location.
1685
+ #
1686
+ # @overload list_account_connectors(request, options = nil)
1687
+ # Pass arguments to `list_account_connectors` via a request object, either of type
1688
+ # {::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest} or an equivalent Hash.
1689
+ #
1690
+ # @param request [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, ::Hash]
1691
+ # A request object representing the call parameters. Required. To specify no
1692
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1693
+ # @param options [::Gapic::CallOptions, ::Hash]
1694
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1695
+ #
1696
+ # @overload list_account_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1697
+ # Pass arguments to `list_account_connectors` via keyword arguments. Note that at
1698
+ # least one keyword argument is required. To specify no parameters, or to keep all
1699
+ # the default parameter values, pass an empty Hash as a request object (see above).
1700
+ #
1701
+ # @param parent [::String]
1702
+ # Required. Parent value for ListAccountConnectorsRequest
1703
+ # @param page_size [::Integer]
1704
+ # Optional. Requested page size. Server may return fewer items than
1705
+ # requested. If unspecified, server will pick an appropriate default.
1706
+ # @param page_token [::String]
1707
+ # Optional. A token identifying a page of results the server should return.
1708
+ # @param filter [::String]
1709
+ # Optional. Filtering results
1710
+ # @param order_by [::String]
1711
+ # Optional. Hint for how to order the results
1712
+ #
1713
+ # @yield [response, operation] Access the result along with the RPC operation
1714
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>]
1715
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1716
+ #
1717
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>]
1718
+ #
1719
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1720
+ #
1721
+ # @example Basic example
1722
+ # require "google/cloud/developer_connect/v1"
1723
+ #
1724
+ # # Create a client object. The client can be reused for multiple calls.
1725
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
1726
+ #
1727
+ # # Create a request. To set request fields, pass in keyword arguments.
1728
+ # request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new
1729
+ #
1730
+ # # Call the list_account_connectors method.
1731
+ # result = client.list_account_connectors request
1732
+ #
1733
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1734
+ # # over elements, and API calls will be issued to fetch pages as needed.
1735
+ # result.each do |item|
1736
+ # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::AccountConnector.
1737
+ # p item
1738
+ # end
1739
+ #
1740
+ def list_account_connectors request, options = nil
1741
+ raise ::ArgumentError, "request must be provided" if request.nil?
1742
+
1743
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest
1744
+
1745
+ # Converts hash and nil to an options object
1746
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1747
+
1748
+ # Customize the options with defaults
1749
+ metadata = @config.rpcs.list_account_connectors.metadata.to_h
1750
+
1751
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1752
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1753
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1754
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
1755
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1756
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1757
+
1758
+ header_params = {}
1759
+ if request.parent
1760
+ header_params["parent"] = request.parent
1761
+ end
1762
+
1763
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1764
+ metadata[:"x-goog-request-params"] ||= request_params_header
1765
+
1766
+ options.apply_defaults timeout: @config.rpcs.list_account_connectors.timeout,
1767
+ metadata: metadata,
1768
+ retry_policy: @config.rpcs.list_account_connectors.retry_policy
1769
+
1770
+ options.apply_defaults timeout: @config.timeout,
1771
+ metadata: @config.metadata,
1772
+ retry_policy: @config.retry_policy
1773
+
1774
+ @developer_connect_stub.call_rpc :list_account_connectors, request, options: options do |response, operation|
1775
+ response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_account_connectors, request, response, operation, options
1776
+ yield response, operation if block_given?
1777
+ throw :response, response
1778
+ end
1779
+ rescue ::GRPC::BadStatus => e
1780
+ raise ::Google::Cloud::Error.from_error(e)
1781
+ end
1782
+
1783
+ ##
1784
+ # Gets details of a single AccountConnector.
1785
+ #
1786
+ # @overload get_account_connector(request, options = nil)
1787
+ # Pass arguments to `get_account_connector` via a request object, either of type
1788
+ # {::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest} or an equivalent Hash.
1789
+ #
1790
+ # @param request [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, ::Hash]
1791
+ # A request object representing the call parameters. Required. To specify no
1792
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1793
+ # @param options [::Gapic::CallOptions, ::Hash]
1794
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1795
+ #
1796
+ # @overload get_account_connector(name: nil)
1797
+ # Pass arguments to `get_account_connector` via keyword arguments. Note that at
1798
+ # least one keyword argument is required. To specify no parameters, or to keep all
1799
+ # the default parameter values, pass an empty Hash as a request object (see above).
1800
+ #
1801
+ # @param name [::String]
1802
+ # Required. Name of the resource
1803
+ #
1804
+ # @yield [response, operation] Access the result along with the RPC operation
1805
+ # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::AccountConnector]
1806
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1807
+ #
1808
+ # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector]
1809
+ #
1810
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1811
+ #
1812
+ # @example Basic example
1813
+ # require "google/cloud/developer_connect/v1"
1814
+ #
1815
+ # # Create a client object. The client can be reused for multiple calls.
1816
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
1817
+ #
1818
+ # # Create a request. To set request fields, pass in keyword arguments.
1819
+ # request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new
1820
+ #
1821
+ # # Call the get_account_connector method.
1822
+ # result = client.get_account_connector request
1823
+ #
1824
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector.
1825
+ # p result
1826
+ #
1827
+ def get_account_connector request, options = nil
1828
+ raise ::ArgumentError, "request must be provided" if request.nil?
1829
+
1830
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest
1831
+
1832
+ # Converts hash and nil to an options object
1833
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1834
+
1835
+ # Customize the options with defaults
1836
+ metadata = @config.rpcs.get_account_connector.metadata.to_h
1837
+
1838
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1839
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1840
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1841
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
1842
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1843
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1844
+
1845
+ header_params = {}
1846
+ if request.name
1847
+ header_params["name"] = request.name
1848
+ end
1849
+
1850
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1851
+ metadata[:"x-goog-request-params"] ||= request_params_header
1852
+
1853
+ options.apply_defaults timeout: @config.rpcs.get_account_connector.timeout,
1854
+ metadata: metadata,
1855
+ retry_policy: @config.rpcs.get_account_connector.retry_policy
1856
+
1857
+ options.apply_defaults timeout: @config.timeout,
1858
+ metadata: @config.metadata,
1859
+ retry_policy: @config.retry_policy
1860
+
1861
+ @developer_connect_stub.call_rpc :get_account_connector, request, options: options do |response, operation|
1862
+ yield response, operation if block_given?
1863
+ end
1864
+ rescue ::GRPC::BadStatus => e
1865
+ raise ::Google::Cloud::Error.from_error(e)
1866
+ end
1867
+
1868
+ ##
1869
+ # Creates a new AccountConnector in a given project and location.
1870
+ #
1871
+ # @overload create_account_connector(request, options = nil)
1872
+ # Pass arguments to `create_account_connector` via a request object, either of type
1873
+ # {::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest} or an equivalent Hash.
1874
+ #
1875
+ # @param request [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, ::Hash]
1876
+ # A request object representing the call parameters. Required. To specify no
1877
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1878
+ # @param options [::Gapic::CallOptions, ::Hash]
1879
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1880
+ #
1881
+ # @overload create_account_connector(parent: nil, account_connector_id: nil, account_connector: nil, request_id: nil, validate_only: nil)
1882
+ # Pass arguments to `create_account_connector` via keyword arguments. Note that at
1883
+ # least one keyword argument is required. To specify no parameters, or to keep all
1884
+ # the default parameter values, pass an empty Hash as a request object (see above).
1885
+ #
1886
+ # @param parent [::String]
1887
+ # Required. Location resource name as the account_connector’s parent.
1888
+ # @param account_connector_id [::String]
1889
+ # Required. The ID to use for the AccountConnector, which will become the
1890
+ # final component of the AccountConnector's resource name. Its format should
1891
+ # adhere to https://google.aip.dev/122#resource-id-segments Names must be
1892
+ # unique per-project per-location.
1893
+ # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash]
1894
+ # Required. The AccountConnector to create.
1895
+ # @param request_id [::String]
1896
+ # Optional. An optional request ID to identify requests. Specify a unique
1897
+ # request ID so that if you must retry your request, the server will know to
1898
+ # ignore the request if it has already been completed. The server will
1899
+ # guarantee that for at least 60 minutes since the first request.
1900
+ #
1901
+ # For example, consider a situation where you make an initial request and the
1902
+ # request times out. If you make the request again with the same request
1903
+ # ID, the server can check if original operation with the same request ID
1904
+ # was received, and if so, will ignore the second request. This prevents
1905
+ # clients from accidentally creating duplicate commitments.
1906
+ #
1907
+ # The request ID must be a valid UUID with the exception that zero UUID is
1908
+ # not supported (00000000-0000-0000-0000-000000000000).
1909
+ # @param validate_only [::Boolean]
1910
+ # Optional. If set, validate the request, but do not actually post it.
1911
+ #
1912
+ # @yield [response, operation] Access the result along with the RPC operation
1913
+ # @yieldparam response [::Gapic::Operation]
1914
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1915
+ #
1916
+ # @return [::Gapic::Operation]
1917
+ #
1918
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1919
+ #
1920
+ # @example Basic example
1921
+ # require "google/cloud/developer_connect/v1"
1922
+ #
1923
+ # # Create a client object. The client can be reused for multiple calls.
1924
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
1925
+ #
1926
+ # # Create a request. To set request fields, pass in keyword arguments.
1927
+ # request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new
1928
+ #
1929
+ # # Call the create_account_connector method.
1930
+ # result = client.create_account_connector request
1931
+ #
1932
+ # # The returned object is of type Gapic::Operation. You can use it to
1933
+ # # check the status of an operation, cancel it, or wait for results.
1934
+ # # Here is how to wait for a response.
1935
+ # result.wait_until_done! timeout: 60
1936
+ # if result.response?
1937
+ # p result.response
1938
+ # else
1939
+ # puts "No response received."
1940
+ # end
1941
+ #
1942
+ def create_account_connector request, options = nil
1943
+ raise ::ArgumentError, "request must be provided" if request.nil?
1944
+
1945
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest
1946
+
1947
+ # Converts hash and nil to an options object
1948
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1949
+
1950
+ # Customize the options with defaults
1951
+ metadata = @config.rpcs.create_account_connector.metadata.to_h
1952
+
1953
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1954
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1955
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1956
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
1957
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1958
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1959
+
1960
+ header_params = {}
1961
+ if request.parent
1962
+ header_params["parent"] = request.parent
1963
+ end
1964
+
1965
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1966
+ metadata[:"x-goog-request-params"] ||= request_params_header
1967
+
1968
+ options.apply_defaults timeout: @config.rpcs.create_account_connector.timeout,
1969
+ metadata: metadata,
1970
+ retry_policy: @config.rpcs.create_account_connector.retry_policy
1971
+
1972
+ options.apply_defaults timeout: @config.timeout,
1973
+ metadata: @config.metadata,
1974
+ retry_policy: @config.retry_policy
1975
+
1976
+ @developer_connect_stub.call_rpc :create_account_connector, request, options: options do |response, operation|
1977
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1978
+ yield response, operation if block_given?
1979
+ throw :response, response
1980
+ end
1981
+ rescue ::GRPC::BadStatus => e
1982
+ raise ::Google::Cloud::Error.from_error(e)
1983
+ end
1984
+
1985
+ ##
1986
+ # Updates the parameters of a single AccountConnector.
1987
+ #
1988
+ # @overload update_account_connector(request, options = nil)
1989
+ # Pass arguments to `update_account_connector` via a request object, either of type
1990
+ # {::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest} or an equivalent Hash.
1991
+ #
1992
+ # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, ::Hash]
1993
+ # A request object representing the call parameters. Required. To specify no
1994
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1995
+ # @param options [::Gapic::CallOptions, ::Hash]
1996
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1997
+ #
1998
+ # @overload update_account_connector(update_mask: nil, account_connector: nil, request_id: nil, allow_missing: nil, validate_only: nil)
1999
+ # Pass arguments to `update_account_connector` via keyword arguments. Note that at
2000
+ # least one keyword argument is required. To specify no parameters, or to keep all
2001
+ # the default parameter values, pass an empty Hash as a request object (see above).
2002
+ #
2003
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2004
+ # Optional. The list of fields to be updated.
2005
+ # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash]
2006
+ # Required. The AccountConnector to update.
2007
+ # @param request_id [::String]
2008
+ # Optional. An optional request ID to identify requests. Specify a unique
2009
+ # request ID so that if you must retry your request, the server will know to
2010
+ # ignore the request if it has already been completed. The server will
2011
+ # guarantee that for at least 60 minutes since the first request.
2012
+ #
2013
+ # For example, consider a situation where you make an initial request and the
2014
+ # request times out. If you make the request again with the same request
2015
+ # ID, the server can check if original operation with the same request ID
2016
+ # was received, and if so, will ignore the second request. This prevents
2017
+ # clients from accidentally creating duplicate commitments.
2018
+ #
2019
+ # The request ID must be a valid UUID with the exception that zero UUID is
2020
+ # not supported (00000000-0000-0000-0000-000000000000).
2021
+ # @param allow_missing [::Boolean]
2022
+ # Optional. If set to true, and the accountConnector is not found a new
2023
+ # accountConnector will be created. In this situation `update_mask` is
2024
+ # ignored. The creation will succeed only if the input accountConnector has
2025
+ # all the necessary
2026
+ # @param validate_only [::Boolean]
2027
+ # Optional. If set, validate the request, but do not actually post it.
2028
+ #
2029
+ # @yield [response, operation] Access the result along with the RPC operation
2030
+ # @yieldparam response [::Gapic::Operation]
2031
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2032
+ #
2033
+ # @return [::Gapic::Operation]
2034
+ #
2035
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2036
+ #
2037
+ # @example Basic example
2038
+ # require "google/cloud/developer_connect/v1"
2039
+ #
2040
+ # # Create a client object. The client can be reused for multiple calls.
2041
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
2042
+ #
2043
+ # # Create a request. To set request fields, pass in keyword arguments.
2044
+ # request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new
2045
+ #
2046
+ # # Call the update_account_connector method.
2047
+ # result = client.update_account_connector request
2048
+ #
2049
+ # # The returned object is of type Gapic::Operation. You can use it to
2050
+ # # check the status of an operation, cancel it, or wait for results.
2051
+ # # Here is how to wait for a response.
2052
+ # result.wait_until_done! timeout: 60
2053
+ # if result.response?
2054
+ # p result.response
2055
+ # else
2056
+ # puts "No response received."
2057
+ # end
2058
+ #
2059
+ def update_account_connector request, options = nil
2060
+ raise ::ArgumentError, "request must be provided" if request.nil?
2061
+
2062
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest
2063
+
2064
+ # Converts hash and nil to an options object
2065
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2066
+
2067
+ # Customize the options with defaults
2068
+ metadata = @config.rpcs.update_account_connector.metadata.to_h
2069
+
2070
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2071
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2072
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2073
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
2074
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2075
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2076
+
2077
+ header_params = {}
2078
+ if request.account_connector&.name
2079
+ header_params["account_connector.name"] = request.account_connector.name
2080
+ end
2081
+
2082
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2083
+ metadata[:"x-goog-request-params"] ||= request_params_header
2084
+
2085
+ options.apply_defaults timeout: @config.rpcs.update_account_connector.timeout,
2086
+ metadata: metadata,
2087
+ retry_policy: @config.rpcs.update_account_connector.retry_policy
2088
+
2089
+ options.apply_defaults timeout: @config.timeout,
2090
+ metadata: @config.metadata,
2091
+ retry_policy: @config.retry_policy
2092
+
2093
+ @developer_connect_stub.call_rpc :update_account_connector, request, options: options do |response, operation|
2094
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2095
+ yield response, operation if block_given?
2096
+ throw :response, response
2097
+ end
2098
+ rescue ::GRPC::BadStatus => e
2099
+ raise ::Google::Cloud::Error.from_error(e)
2100
+ end
2101
+
2102
+ ##
2103
+ # Deletes a single AccountConnector.
2104
+ #
2105
+ # @overload delete_account_connector(request, options = nil)
2106
+ # Pass arguments to `delete_account_connector` via a request object, either of type
2107
+ # {::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest} or an equivalent Hash.
2108
+ #
2109
+ # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, ::Hash]
2110
+ # A request object representing the call parameters. Required. To specify no
2111
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2112
+ # @param options [::Gapic::CallOptions, ::Hash]
2113
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2114
+ #
2115
+ # @overload delete_account_connector(name: nil, request_id: nil, validate_only: nil, etag: nil, force: nil)
2116
+ # Pass arguments to `delete_account_connector` via keyword arguments. Note that at
2117
+ # least one keyword argument is required. To specify no parameters, or to keep all
2118
+ # the default parameter values, pass an empty Hash as a request object (see above).
2119
+ #
2120
+ # @param name [::String]
2121
+ # Required. Name of the resource
2122
+ # @param request_id [::String]
2123
+ # Optional. An optional request ID to identify requests. Specify a unique
2124
+ # request ID so that if you must retry your request, the server will know to
2125
+ # ignore the request if it has already been completed. The server will
2126
+ # guarantee that for at least 60 minutes after the first request.
2127
+ #
2128
+ # For example, consider a situation where you make an initial request and the
2129
+ # request times out. If you make the request again with the same request
2130
+ # ID, the server can check if original operation with the same request ID
2131
+ # was received, and if so, will ignore the second request. This prevents
2132
+ # clients from accidentally creating duplicate commitments.
2133
+ #
2134
+ # The request ID must be a valid UUID with the exception that zero UUID is
2135
+ # not supported (00000000-0000-0000-0000-000000000000).
2136
+ # @param validate_only [::Boolean]
2137
+ # Optional. If set, validate the request, but do not actually post it.
2138
+ # @param etag [::String]
2139
+ # Optional. The current etag of the AccountConnectorn.
2140
+ # If an etag is provided and does not match the current etag of the
2141
+ # AccountConnector, deletion will be blocked and an ABORTED error will be
2142
+ # returned.
2143
+ # @param force [::Boolean]
2144
+ # Optional. If set to true, any Users from this AccountConnector will also
2145
+ # be deleted. (Otherwise, the request will only work if the AccountConnector
2146
+ # has no Users.)
2147
+ #
2148
+ # @yield [response, operation] Access the result along with the RPC operation
2149
+ # @yieldparam response [::Gapic::Operation]
2150
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2151
+ #
2152
+ # @return [::Gapic::Operation]
2153
+ #
2154
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2155
+ #
2156
+ # @example Basic example
2157
+ # require "google/cloud/developer_connect/v1"
2158
+ #
2159
+ # # Create a client object. The client can be reused for multiple calls.
2160
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
2161
+ #
2162
+ # # Create a request. To set request fields, pass in keyword arguments.
2163
+ # request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new
2164
+ #
2165
+ # # Call the delete_account_connector method.
2166
+ # result = client.delete_account_connector request
2167
+ #
2168
+ # # The returned object is of type Gapic::Operation. You can use it to
2169
+ # # check the status of an operation, cancel it, or wait for results.
2170
+ # # Here is how to wait for a response.
2171
+ # result.wait_until_done! timeout: 60
2172
+ # if result.response?
2173
+ # p result.response
2174
+ # else
2175
+ # puts "No response received."
2176
+ # end
2177
+ #
2178
+ def delete_account_connector request, options = nil
2179
+ raise ::ArgumentError, "request must be provided" if request.nil?
2180
+
2181
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest
2182
+
2183
+ # Converts hash and nil to an options object
2184
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2185
+
2186
+ # Customize the options with defaults
2187
+ metadata = @config.rpcs.delete_account_connector.metadata.to_h
2188
+
2189
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2190
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2191
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2192
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
2193
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2194
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2195
+
2196
+ header_params = {}
2197
+ if request.name
2198
+ header_params["name"] = request.name
2199
+ end
2200
+
2201
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2202
+ metadata[:"x-goog-request-params"] ||= request_params_header
2203
+
2204
+ options.apply_defaults timeout: @config.rpcs.delete_account_connector.timeout,
2205
+ metadata: metadata,
2206
+ retry_policy: @config.rpcs.delete_account_connector.retry_policy
2207
+
2208
+ options.apply_defaults timeout: @config.timeout,
2209
+ metadata: @config.metadata,
2210
+ retry_policy: @config.retry_policy
2211
+
2212
+ @developer_connect_stub.call_rpc :delete_account_connector, request, options: options do |response, operation|
2213
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2214
+ yield response, operation if block_given?
2215
+ throw :response, response
2216
+ end
2217
+ rescue ::GRPC::BadStatus => e
2218
+ raise ::Google::Cloud::Error.from_error(e)
2219
+ end
2220
+
2221
+ ##
2222
+ # Fetches OAuth access token based on end user credentials.
2223
+ #
2224
+ # @overload fetch_access_token(request, options = nil)
2225
+ # Pass arguments to `fetch_access_token` via a request object, either of type
2226
+ # {::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest} or an equivalent Hash.
2227
+ #
2228
+ # @param request [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, ::Hash]
2229
+ # A request object representing the call parameters. Required. To specify no
2230
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2231
+ # @param options [::Gapic::CallOptions, ::Hash]
2232
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2233
+ #
2234
+ # @overload fetch_access_token(account_connector: nil)
2235
+ # Pass arguments to `fetch_access_token` via keyword arguments. Note that at
2236
+ # least one keyword argument is required. To specify no parameters, or to keep all
2237
+ # the default parameter values, pass an empty Hash as a request object (see above).
2238
+ #
2239
+ # @param account_connector [::String]
2240
+ # Required. The resource name of the AccountConnector in the format
2241
+ # `projects/*/locations/*/accountConnectors/*`.
2242
+ #
2243
+ # @yield [response, operation] Access the result along with the RPC operation
2244
+ # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse]
2245
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2246
+ #
2247
+ # @return [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse]
2248
+ #
2249
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2250
+ #
2251
+ # @example Basic example
2252
+ # require "google/cloud/developer_connect/v1"
2253
+ #
2254
+ # # Create a client object. The client can be reused for multiple calls.
2255
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
2256
+ #
2257
+ # # Create a request. To set request fields, pass in keyword arguments.
2258
+ # request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new
2259
+ #
2260
+ # # Call the fetch_access_token method.
2261
+ # result = client.fetch_access_token request
2262
+ #
2263
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse.
2264
+ # p result
2265
+ #
2266
+ def fetch_access_token request, options = nil
2267
+ raise ::ArgumentError, "request must be provided" if request.nil?
2268
+
2269
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest
2270
+
2271
+ # Converts hash and nil to an options object
2272
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2273
+
2274
+ # Customize the options with defaults
2275
+ metadata = @config.rpcs.fetch_access_token.metadata.to_h
2276
+
2277
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2278
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2279
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2280
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
2281
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2282
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2283
+
2284
+ header_params = {}
2285
+ if request.account_connector
2286
+ header_params["account_connector"] = request.account_connector
2287
+ end
2288
+
2289
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2290
+ metadata[:"x-goog-request-params"] ||= request_params_header
2291
+
2292
+ options.apply_defaults timeout: @config.rpcs.fetch_access_token.timeout,
2293
+ metadata: metadata,
2294
+ retry_policy: @config.rpcs.fetch_access_token.retry_policy
2295
+
2296
+ options.apply_defaults timeout: @config.timeout,
2297
+ metadata: @config.metadata,
2298
+ retry_policy: @config.retry_policy
2299
+
2300
+ @developer_connect_stub.call_rpc :fetch_access_token, request, options: options do |response, operation|
2301
+ yield response, operation if block_given?
2302
+ end
2303
+ rescue ::GRPC::BadStatus => e
2304
+ raise ::Google::Cloud::Error.from_error(e)
2305
+ end
2306
+
2307
+ ##
2308
+ # Lists Users in a given project, location, and account_connector.
2309
+ #
2310
+ # @overload list_users(request, options = nil)
2311
+ # Pass arguments to `list_users` via a request object, either of type
2312
+ # {::Google::Cloud::DeveloperConnect::V1::ListUsersRequest} or an equivalent Hash.
2313
+ #
2314
+ # @param request [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, ::Hash]
2315
+ # A request object representing the call parameters. Required. To specify no
2316
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2317
+ # @param options [::Gapic::CallOptions, ::Hash]
2318
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2319
+ #
2320
+ # @overload list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2321
+ # Pass arguments to `list_users` via keyword arguments. Note that at
2322
+ # least one keyword argument is required. To specify no parameters, or to keep all
2323
+ # the default parameter values, pass an empty Hash as a request object (see above).
2324
+ #
2325
+ # @param parent [::String]
2326
+ # Required. Parent value for ListUsersRequest
2327
+ # @param page_size [::Integer]
2328
+ # Optional. Requested page size. Server may return fewer items than
2329
+ # requested. If unspecified, server will pick an appropriate default.
2330
+ # @param page_token [::String]
2331
+ # Optional. A token identifying a page of results the server should return.
2332
+ # @param filter [::String]
2333
+ # Optional. Filtering results
2334
+ # @param order_by [::String]
2335
+ # Optional. Hint for how to order the results
2336
+ #
2337
+ # @yield [response, operation] Access the result along with the RPC operation
2338
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>]
2339
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2340
+ #
2341
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>]
2342
+ #
2343
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2344
+ #
2345
+ # @example Basic example
2346
+ # require "google/cloud/developer_connect/v1"
2347
+ #
2348
+ # # Create a client object. The client can be reused for multiple calls.
2349
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
2350
+ #
2351
+ # # Create a request. To set request fields, pass in keyword arguments.
2352
+ # request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new
2353
+ #
2354
+ # # Call the list_users method.
2355
+ # result = client.list_users request
2356
+ #
2357
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2358
+ # # over elements, and API calls will be issued to fetch pages as needed.
2359
+ # result.each do |item|
2360
+ # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::User.
2361
+ # p item
2362
+ # end
2363
+ #
2364
+ def list_users request, options = nil
2365
+ raise ::ArgumentError, "request must be provided" if request.nil?
2366
+
2367
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest
2368
+
2369
+ # Converts hash and nil to an options object
2370
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2371
+
2372
+ # Customize the options with defaults
2373
+ metadata = @config.rpcs.list_users.metadata.to_h
2374
+
2375
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2376
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2377
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2378
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
2379
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2380
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2381
+
2382
+ header_params = {}
2383
+ if request.parent
2384
+ header_params["parent"] = request.parent
2385
+ end
2386
+
2387
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2388
+ metadata[:"x-goog-request-params"] ||= request_params_header
2389
+
2390
+ options.apply_defaults timeout: @config.rpcs.list_users.timeout,
2391
+ metadata: metadata,
2392
+ retry_policy: @config.rpcs.list_users.retry_policy
2393
+
2394
+ options.apply_defaults timeout: @config.timeout,
2395
+ metadata: @config.metadata,
2396
+ retry_policy: @config.retry_policy
2397
+
2398
+ @developer_connect_stub.call_rpc :list_users, request, options: options do |response, operation|
2399
+ response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_users, request, response, operation, options
2400
+ yield response, operation if block_given?
2401
+ throw :response, response
2402
+ end
2403
+ rescue ::GRPC::BadStatus => e
2404
+ raise ::Google::Cloud::Error.from_error(e)
2405
+ end
2406
+
2407
+ ##
2408
+ # Deletes a single User.
2409
+ #
2410
+ # @overload delete_user(request, options = nil)
2411
+ # Pass arguments to `delete_user` via a request object, either of type
2412
+ # {::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest} or an equivalent Hash.
2413
+ #
2414
+ # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, ::Hash]
2415
+ # A request object representing the call parameters. Required. To specify no
2416
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2417
+ # @param options [::Gapic::CallOptions, ::Hash]
2418
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2419
+ #
2420
+ # @overload delete_user(name: nil, request_id: nil, validate_only: nil, etag: nil)
2421
+ # Pass arguments to `delete_user` via keyword arguments. Note that at
2422
+ # least one keyword argument is required. To specify no parameters, or to keep all
2423
+ # the default parameter values, pass an empty Hash as a request object (see above).
2424
+ #
2425
+ # @param name [::String]
2426
+ # Required. Name of the resource
2427
+ # @param request_id [::String]
2428
+ # Optional. An optional request ID to identify requests. Specify a unique
2429
+ # request ID so that if you must retry your request, the server will know to
2430
+ # ignore the request if it has already been completed. The server will
2431
+ # guarantee that for at least 60 minutes after the first request.
2432
+ #
2433
+ # For example, consider a situation where you make an initial request and the
2434
+ # request times out. If you make the request again with the same request
2435
+ # ID, the server can check if original operation with the same request ID
2436
+ # was received, and if so, will ignore the second request. This prevents
2437
+ # clients from accidentally creating duplicate commitments.
2438
+ #
2439
+ # The request ID must be a valid UUID with the exception that zero UUID is
2440
+ # not supported (00000000-0000-0000-0000-000000000000).
2441
+ # @param validate_only [::Boolean]
2442
+ # Optional. If set, validate the request, but do not actually post it.
2443
+ # @param etag [::String]
2444
+ # Optional. This checksum is computed by the server based on the value of
2445
+ # other fields, and may be sent on update and delete requests to ensure the
2446
+ # client has an up-to-date value before proceeding.
2447
+ #
2448
+ # @yield [response, operation] Access the result along with the RPC operation
2449
+ # @yieldparam response [::Gapic::Operation]
2450
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2451
+ #
2452
+ # @return [::Gapic::Operation]
2453
+ #
2454
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2455
+ #
2456
+ # @example Basic example
2457
+ # require "google/cloud/developer_connect/v1"
2458
+ #
2459
+ # # Create a client object. The client can be reused for multiple calls.
2460
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
2461
+ #
2462
+ # # Create a request. To set request fields, pass in keyword arguments.
2463
+ # request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new
2464
+ #
2465
+ # # Call the delete_user method.
2466
+ # result = client.delete_user request
2467
+ #
2468
+ # # The returned object is of type Gapic::Operation. You can use it to
2469
+ # # check the status of an operation, cancel it, or wait for results.
2470
+ # # Here is how to wait for a response.
2471
+ # result.wait_until_done! timeout: 60
2472
+ # if result.response?
2473
+ # p result.response
2474
+ # else
2475
+ # puts "No response received."
2476
+ # end
2477
+ #
2478
+ def delete_user request, options = nil
2479
+ raise ::ArgumentError, "request must be provided" if request.nil?
2480
+
2481
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest
2482
+
2483
+ # Converts hash and nil to an options object
2484
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2485
+
2486
+ # Customize the options with defaults
2487
+ metadata = @config.rpcs.delete_user.metadata.to_h
2488
+
2489
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2490
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2491
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2492
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
2493
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2494
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2495
+
2496
+ header_params = {}
2497
+ if request.name
2498
+ header_params["name"] = request.name
2499
+ end
2500
+
2501
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2502
+ metadata[:"x-goog-request-params"] ||= request_params_header
2503
+
2504
+ options.apply_defaults timeout: @config.rpcs.delete_user.timeout,
2505
+ metadata: metadata,
2506
+ retry_policy: @config.rpcs.delete_user.retry_policy
2507
+
2508
+ options.apply_defaults timeout: @config.timeout,
2509
+ metadata: @config.metadata,
2510
+ retry_policy: @config.retry_policy
2511
+
2512
+ @developer_connect_stub.call_rpc :delete_user, request, options: options do |response, operation|
2513
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2514
+ yield response, operation if block_given?
2515
+ throw :response, response
2516
+ end
2517
+ rescue ::GRPC::BadStatus => e
2518
+ raise ::Google::Cloud::Error.from_error(e)
2519
+ end
2520
+
2521
+ ##
2522
+ # Fetch the User based on the user credentials.
2523
+ #
2524
+ # @overload fetch_self(request, options = nil)
2525
+ # Pass arguments to `fetch_self` via a request object, either of type
2526
+ # {::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest} or an equivalent Hash.
2527
+ #
2528
+ # @param request [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, ::Hash]
2529
+ # A request object representing the call parameters. Required. To specify no
2530
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2531
+ # @param options [::Gapic::CallOptions, ::Hash]
2532
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2533
+ #
2534
+ # @overload fetch_self(name: nil)
2535
+ # Pass arguments to `fetch_self` via keyword arguments. Note that at
2536
+ # least one keyword argument is required. To specify no parameters, or to keep all
2537
+ # the default parameter values, pass an empty Hash as a request object (see above).
2538
+ #
2539
+ # @param name [::String]
2540
+ # Required. Name of the AccountConnector resource
2541
+ #
2542
+ # @yield [response, operation] Access the result along with the RPC operation
2543
+ # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::User]
2544
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2545
+ #
2546
+ # @return [::Google::Cloud::DeveloperConnect::V1::User]
2547
+ #
2548
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2549
+ #
2550
+ # @example Basic example
2551
+ # require "google/cloud/developer_connect/v1"
2552
+ #
2553
+ # # Create a client object. The client can be reused for multiple calls.
2554
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
2555
+ #
2556
+ # # Create a request. To set request fields, pass in keyword arguments.
2557
+ # request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new
2558
+ #
2559
+ # # Call the fetch_self method.
2560
+ # result = client.fetch_self request
2561
+ #
2562
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::User.
2563
+ # p result
2564
+ #
2565
+ def fetch_self request, options = nil
2566
+ raise ::ArgumentError, "request must be provided" if request.nil?
2567
+
2568
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest
2569
+
2570
+ # Converts hash and nil to an options object
2571
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2572
+
2573
+ # Customize the options with defaults
2574
+ metadata = @config.rpcs.fetch_self.metadata.to_h
2575
+
2576
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2577
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2578
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2579
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
2580
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2581
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2582
+
2583
+ header_params = {}
2584
+ if request.name
2585
+ header_params["name"] = request.name
2586
+ end
2587
+
2588
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2589
+ metadata[:"x-goog-request-params"] ||= request_params_header
2590
+
2591
+ options.apply_defaults timeout: @config.rpcs.fetch_self.timeout,
2592
+ metadata: metadata,
2593
+ retry_policy: @config.rpcs.fetch_self.retry_policy
2594
+
2595
+ options.apply_defaults timeout: @config.timeout,
2596
+ metadata: @config.metadata,
2597
+ retry_policy: @config.retry_policy
2598
+
2599
+ @developer_connect_stub.call_rpc :fetch_self, request, options: options do |response, operation|
2600
+ yield response, operation if block_given?
2601
+ end
2602
+ rescue ::GRPC::BadStatus => e
2603
+ raise ::Google::Cloud::Error.from_error(e)
2604
+ end
2605
+
2606
+ ##
2607
+ # Delete the User based on the user credentials.
2608
+ #
2609
+ # @overload delete_self(request, options = nil)
2610
+ # Pass arguments to `delete_self` via a request object, either of type
2611
+ # {::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest} or an equivalent Hash.
2612
+ #
2613
+ # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, ::Hash]
2614
+ # A request object representing the call parameters. Required. To specify no
2615
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2616
+ # @param options [::Gapic::CallOptions, ::Hash]
2617
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2618
+ #
2619
+ # @overload delete_self(name: nil)
2620
+ # Pass arguments to `delete_self` via keyword arguments. Note that at
2621
+ # least one keyword argument is required. To specify no parameters, or to keep all
2622
+ # the default parameter values, pass an empty Hash as a request object (see above).
2623
+ #
2624
+ # @param name [::String]
2625
+ # Required. Name of the AccountConnector resource
2626
+ #
2627
+ # @yield [response, operation] Access the result along with the RPC operation
2628
+ # @yieldparam response [::Gapic::Operation]
2629
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2630
+ #
2631
+ # @return [::Gapic::Operation]
2632
+ #
2633
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2634
+ #
2635
+ # @example Basic example
2636
+ # require "google/cloud/developer_connect/v1"
2637
+ #
2638
+ # # Create a client object. The client can be reused for multiple calls.
2639
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
2640
+ #
2641
+ # # Create a request. To set request fields, pass in keyword arguments.
2642
+ # request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new
2643
+ #
2644
+ # # Call the delete_self method.
2645
+ # result = client.delete_self request
2646
+ #
2647
+ # # The returned object is of type Gapic::Operation. You can use it to
2648
+ # # check the status of an operation, cancel it, or wait for results.
2649
+ # # Here is how to wait for a response.
2650
+ # result.wait_until_done! timeout: 60
2651
+ # if result.response?
2652
+ # p result.response
2653
+ # else
2654
+ # puts "No response received."
2655
+ # end
2656
+ #
2657
+ def delete_self request, options = nil
2658
+ raise ::ArgumentError, "request must be provided" if request.nil?
2659
+
2660
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest
2661
+
2662
+ # Converts hash and nil to an options object
2663
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2664
+
2665
+ # Customize the options with defaults
2666
+ metadata = @config.rpcs.delete_self.metadata.to_h
2667
+
2668
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2669
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2670
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2671
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
2672
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2673
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2674
+
2675
+ header_params = {}
2676
+ if request.name
2677
+ header_params["name"] = request.name
2678
+ end
2679
+
2680
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2681
+ metadata[:"x-goog-request-params"] ||= request_params_header
2682
+
2683
+ options.apply_defaults timeout: @config.rpcs.delete_self.timeout,
2684
+ metadata: metadata,
2685
+ retry_policy: @config.rpcs.delete_self.retry_policy
2686
+
2687
+ options.apply_defaults timeout: @config.timeout,
2688
+ metadata: @config.metadata,
2689
+ retry_policy: @config.retry_policy
2690
+
2691
+ @developer_connect_stub.call_rpc :delete_self, request, options: options do |response, operation|
2692
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2693
+ yield response, operation if block_given?
2694
+ throw :response, response
2695
+ end
2696
+ rescue ::GRPC::BadStatus => e
2697
+ raise ::Google::Cloud::Error.from_error(e)
2698
+ end
2699
+
1683
2700
  ##
1684
2701
  # Configuration class for the DeveloperConnect API.
1685
2702
  #
@@ -1916,6 +2933,56 @@ module Google
1916
2933
  # @return [::Gapic::Config::Method]
1917
2934
  #
1918
2935
  attr_reader :fetch_git_refs
2936
+ ##
2937
+ # RPC-specific configuration for `list_account_connectors`
2938
+ # @return [::Gapic::Config::Method]
2939
+ #
2940
+ attr_reader :list_account_connectors
2941
+ ##
2942
+ # RPC-specific configuration for `get_account_connector`
2943
+ # @return [::Gapic::Config::Method]
2944
+ #
2945
+ attr_reader :get_account_connector
2946
+ ##
2947
+ # RPC-specific configuration for `create_account_connector`
2948
+ # @return [::Gapic::Config::Method]
2949
+ #
2950
+ attr_reader :create_account_connector
2951
+ ##
2952
+ # RPC-specific configuration for `update_account_connector`
2953
+ # @return [::Gapic::Config::Method]
2954
+ #
2955
+ attr_reader :update_account_connector
2956
+ ##
2957
+ # RPC-specific configuration for `delete_account_connector`
2958
+ # @return [::Gapic::Config::Method]
2959
+ #
2960
+ attr_reader :delete_account_connector
2961
+ ##
2962
+ # RPC-specific configuration for `fetch_access_token`
2963
+ # @return [::Gapic::Config::Method]
2964
+ #
2965
+ attr_reader :fetch_access_token
2966
+ ##
2967
+ # RPC-specific configuration for `list_users`
2968
+ # @return [::Gapic::Config::Method]
2969
+ #
2970
+ attr_reader :list_users
2971
+ ##
2972
+ # RPC-specific configuration for `delete_user`
2973
+ # @return [::Gapic::Config::Method]
2974
+ #
2975
+ attr_reader :delete_user
2976
+ ##
2977
+ # RPC-specific configuration for `fetch_self`
2978
+ # @return [::Gapic::Config::Method]
2979
+ #
2980
+ attr_reader :fetch_self
2981
+ ##
2982
+ # RPC-specific configuration for `delete_self`
2983
+ # @return [::Gapic::Config::Method]
2984
+ #
2985
+ attr_reader :delete_self
1919
2986
 
1920
2987
  # @private
1921
2988
  def initialize parent_rpcs = nil
@@ -1947,6 +3014,26 @@ module Google
1947
3014
  @fetch_git_hub_installations = ::Gapic::Config::Method.new fetch_git_hub_installations_config
1948
3015
  fetch_git_refs_config = parent_rpcs.fetch_git_refs if parent_rpcs.respond_to? :fetch_git_refs
1949
3016
  @fetch_git_refs = ::Gapic::Config::Method.new fetch_git_refs_config
3017
+ list_account_connectors_config = parent_rpcs.list_account_connectors if parent_rpcs.respond_to? :list_account_connectors
3018
+ @list_account_connectors = ::Gapic::Config::Method.new list_account_connectors_config
3019
+ get_account_connector_config = parent_rpcs.get_account_connector if parent_rpcs.respond_to? :get_account_connector
3020
+ @get_account_connector = ::Gapic::Config::Method.new get_account_connector_config
3021
+ create_account_connector_config = parent_rpcs.create_account_connector if parent_rpcs.respond_to? :create_account_connector
3022
+ @create_account_connector = ::Gapic::Config::Method.new create_account_connector_config
3023
+ update_account_connector_config = parent_rpcs.update_account_connector if parent_rpcs.respond_to? :update_account_connector
3024
+ @update_account_connector = ::Gapic::Config::Method.new update_account_connector_config
3025
+ delete_account_connector_config = parent_rpcs.delete_account_connector if parent_rpcs.respond_to? :delete_account_connector
3026
+ @delete_account_connector = ::Gapic::Config::Method.new delete_account_connector_config
3027
+ fetch_access_token_config = parent_rpcs.fetch_access_token if parent_rpcs.respond_to? :fetch_access_token
3028
+ @fetch_access_token = ::Gapic::Config::Method.new fetch_access_token_config
3029
+ list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users
3030
+ @list_users = ::Gapic::Config::Method.new list_users_config
3031
+ delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user
3032
+ @delete_user = ::Gapic::Config::Method.new delete_user_config
3033
+ fetch_self_config = parent_rpcs.fetch_self if parent_rpcs.respond_to? :fetch_self
3034
+ @fetch_self = ::Gapic::Config::Method.new fetch_self_config
3035
+ delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self
3036
+ @delete_self = ::Gapic::Config::Method.new delete_self_config
1950
3037
 
1951
3038
  yield self if block_given?
1952
3039
  end