google-cloud-firestore-admin-v1 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb +662 -0
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb +19 -0
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb +613 -0
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb +431 -0
- data/lib/google/cloud/firestore/admin/v1/version.rb +1 -1
- data/lib/google/firestore/admin/v1/database_pb.rb +2 -1
- data/lib/google/firestore/admin/v1/firestore_admin_pb.rb +11 -1
- data/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb +16 -0
- data/lib/google/firestore/admin/v1/index_pb.rb +2 -1
- data/lib/google/firestore/admin/v1/user_creds_pb.rb +51 -0
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/firestore/admin/v1/database.rb +30 -0
- data/proto_docs/google/firestore/admin/v1/firestore_admin.rb +98 -0
- data/proto_docs/google/firestore/admin/v1/index.rb +45 -0
- data/proto_docs/google/firestore/admin/v1/user_creds.rb +78 -0
- metadata +5 -3
@@ -191,6 +191,25 @@ module Google
|
|
191
191
|
"projects/#{project}"
|
192
192
|
end
|
193
193
|
|
194
|
+
##
|
195
|
+
# Create a fully-qualified UserCreds resource string.
|
196
|
+
#
|
197
|
+
# The resource will be in the following format:
|
198
|
+
#
|
199
|
+
# `projects/{project}/databases/{database}/userCreds/{user_creds}`
|
200
|
+
#
|
201
|
+
# @param project [String]
|
202
|
+
# @param database [String]
|
203
|
+
# @param user_creds [String]
|
204
|
+
#
|
205
|
+
# @return [::String]
|
206
|
+
def user_creds_path project:, database:, user_creds:
|
207
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
208
|
+
raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/"
|
209
|
+
|
210
|
+
"projects/#{project}/databases/#{database}/userCreds/#{user_creds}"
|
211
|
+
end
|
212
|
+
|
194
213
|
extend self
|
195
214
|
end
|
196
215
|
end
|
@@ -1693,6 +1693,570 @@ module Google
|
|
1693
1693
|
raise ::Google::Cloud::Error.from_error(e)
|
1694
1694
|
end
|
1695
1695
|
|
1696
|
+
##
|
1697
|
+
# Create a user creds.
|
1698
|
+
#
|
1699
|
+
# @overload create_user_creds(request, options = nil)
|
1700
|
+
# Pass arguments to `create_user_creds` via a request object, either of type
|
1701
|
+
# {::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest} or an equivalent Hash.
|
1702
|
+
#
|
1703
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest, ::Hash]
|
1704
|
+
# A request object representing the call parameters. Required. To specify no
|
1705
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1706
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1707
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1708
|
+
#
|
1709
|
+
# @overload create_user_creds(parent: nil, user_creds: nil, user_creds_id: nil)
|
1710
|
+
# Pass arguments to `create_user_creds` via keyword arguments. Note that at
|
1711
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1712
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1713
|
+
#
|
1714
|
+
# @param parent [::String]
|
1715
|
+
# Required. A parent name of the form
|
1716
|
+
# `projects/{project_id}/databases/{database_id}`
|
1717
|
+
# @param user_creds [::Google::Cloud::Firestore::Admin::V1::UserCreds, ::Hash]
|
1718
|
+
# Required. The user creds to create.
|
1719
|
+
# @param user_creds_id [::String]
|
1720
|
+
# Required. The ID to use for the user creds, which will become the final
|
1721
|
+
# component of the user creds's resource name.
|
1722
|
+
#
|
1723
|
+
# This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
|
1724
|
+
# with first character a letter and the last a letter or a number. Must not
|
1725
|
+
# be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/.
|
1726
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1727
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
1728
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1729
|
+
#
|
1730
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
1731
|
+
#
|
1732
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1733
|
+
#
|
1734
|
+
# @example Basic example
|
1735
|
+
# require "google/cloud/firestore/admin/v1"
|
1736
|
+
#
|
1737
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1738
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new
|
1739
|
+
#
|
1740
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1741
|
+
# request = Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new
|
1742
|
+
#
|
1743
|
+
# # Call the create_user_creds method.
|
1744
|
+
# result = client.create_user_creds request
|
1745
|
+
#
|
1746
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds.
|
1747
|
+
# p result
|
1748
|
+
#
|
1749
|
+
def create_user_creds request, options = nil
|
1750
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1751
|
+
|
1752
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest
|
1753
|
+
|
1754
|
+
# Converts hash and nil to an options object
|
1755
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1756
|
+
|
1757
|
+
# Customize the options with defaults
|
1758
|
+
call_metadata = @config.rpcs.create_user_creds.metadata.to_h
|
1759
|
+
|
1760
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1761
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1762
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1763
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
|
1764
|
+
transports_version_send: [:rest]
|
1765
|
+
|
1766
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1767
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1768
|
+
|
1769
|
+
options.apply_defaults timeout: @config.rpcs.create_user_creds.timeout,
|
1770
|
+
metadata: call_metadata,
|
1771
|
+
retry_policy: @config.rpcs.create_user_creds.retry_policy
|
1772
|
+
|
1773
|
+
options.apply_defaults timeout: @config.timeout,
|
1774
|
+
metadata: @config.metadata,
|
1775
|
+
retry_policy: @config.retry_policy
|
1776
|
+
|
1777
|
+
@firestore_admin_stub.create_user_creds request, options do |result, operation|
|
1778
|
+
yield result, operation if block_given?
|
1779
|
+
end
|
1780
|
+
rescue ::Gapic::Rest::Error => e
|
1781
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1782
|
+
end
|
1783
|
+
|
1784
|
+
##
|
1785
|
+
# Gets a user creds resource. Note that the returned resource does not
|
1786
|
+
# contain the secret value itself.
|
1787
|
+
#
|
1788
|
+
# @overload get_user_creds(request, options = nil)
|
1789
|
+
# Pass arguments to `get_user_creds` via a request object, either of type
|
1790
|
+
# {::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest} or an equivalent Hash.
|
1791
|
+
#
|
1792
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest, ::Hash]
|
1793
|
+
# A request object representing the call parameters. Required. To specify no
|
1794
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1795
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1796
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1797
|
+
#
|
1798
|
+
# @overload get_user_creds(name: nil)
|
1799
|
+
# Pass arguments to `get_user_creds` via keyword arguments. Note that at
|
1800
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1801
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1802
|
+
#
|
1803
|
+
# @param name [::String]
|
1804
|
+
# Required. A name of the form
|
1805
|
+
# `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
|
1806
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1807
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
1808
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1809
|
+
#
|
1810
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
1811
|
+
#
|
1812
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1813
|
+
#
|
1814
|
+
# @example Basic example
|
1815
|
+
# require "google/cloud/firestore/admin/v1"
|
1816
|
+
#
|
1817
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1818
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new
|
1819
|
+
#
|
1820
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1821
|
+
# request = Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new
|
1822
|
+
#
|
1823
|
+
# # Call the get_user_creds method.
|
1824
|
+
# result = client.get_user_creds request
|
1825
|
+
#
|
1826
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds.
|
1827
|
+
# p result
|
1828
|
+
#
|
1829
|
+
def get_user_creds request, options = nil
|
1830
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1831
|
+
|
1832
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest
|
1833
|
+
|
1834
|
+
# Converts hash and nil to an options object
|
1835
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1836
|
+
|
1837
|
+
# Customize the options with defaults
|
1838
|
+
call_metadata = @config.rpcs.get_user_creds.metadata.to_h
|
1839
|
+
|
1840
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1841
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1842
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1843
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
|
1844
|
+
transports_version_send: [:rest]
|
1845
|
+
|
1846
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1847
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1848
|
+
|
1849
|
+
options.apply_defaults timeout: @config.rpcs.get_user_creds.timeout,
|
1850
|
+
metadata: call_metadata,
|
1851
|
+
retry_policy: @config.rpcs.get_user_creds.retry_policy
|
1852
|
+
|
1853
|
+
options.apply_defaults timeout: @config.timeout,
|
1854
|
+
metadata: @config.metadata,
|
1855
|
+
retry_policy: @config.retry_policy
|
1856
|
+
|
1857
|
+
@firestore_admin_stub.get_user_creds request, options do |result, operation|
|
1858
|
+
yield result, operation if block_given?
|
1859
|
+
end
|
1860
|
+
rescue ::Gapic::Rest::Error => e
|
1861
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1862
|
+
end
|
1863
|
+
|
1864
|
+
##
|
1865
|
+
# List all user creds in the database. Note that the returned resource
|
1866
|
+
# does not contain the secret value itself.
|
1867
|
+
#
|
1868
|
+
# @overload list_user_creds(request, options = nil)
|
1869
|
+
# Pass arguments to `list_user_creds` via a request object, either of type
|
1870
|
+
# {::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest} or an equivalent Hash.
|
1871
|
+
#
|
1872
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest, ::Hash]
|
1873
|
+
# A request object representing the call parameters. Required. To specify no
|
1874
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1875
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1876
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1877
|
+
#
|
1878
|
+
# @overload list_user_creds(parent: nil)
|
1879
|
+
# Pass arguments to `list_user_creds` via keyword arguments. Note that at
|
1880
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1881
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1882
|
+
#
|
1883
|
+
# @param parent [::String]
|
1884
|
+
# Required. A parent database name of the form
|
1885
|
+
# `projects/{project_id}/databases/{database_id}`
|
1886
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1887
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse]
|
1888
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1889
|
+
#
|
1890
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse]
|
1891
|
+
#
|
1892
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1893
|
+
#
|
1894
|
+
# @example Basic example
|
1895
|
+
# require "google/cloud/firestore/admin/v1"
|
1896
|
+
#
|
1897
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1898
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new
|
1899
|
+
#
|
1900
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1901
|
+
# request = Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new
|
1902
|
+
#
|
1903
|
+
# # Call the list_user_creds method.
|
1904
|
+
# result = client.list_user_creds request
|
1905
|
+
#
|
1906
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse.
|
1907
|
+
# p result
|
1908
|
+
#
|
1909
|
+
def list_user_creds request, options = nil
|
1910
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1911
|
+
|
1912
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest
|
1913
|
+
|
1914
|
+
# Converts hash and nil to an options object
|
1915
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1916
|
+
|
1917
|
+
# Customize the options with defaults
|
1918
|
+
call_metadata = @config.rpcs.list_user_creds.metadata.to_h
|
1919
|
+
|
1920
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1921
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1922
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1923
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
|
1924
|
+
transports_version_send: [:rest]
|
1925
|
+
|
1926
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1927
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1928
|
+
|
1929
|
+
options.apply_defaults timeout: @config.rpcs.list_user_creds.timeout,
|
1930
|
+
metadata: call_metadata,
|
1931
|
+
retry_policy: @config.rpcs.list_user_creds.retry_policy
|
1932
|
+
|
1933
|
+
options.apply_defaults timeout: @config.timeout,
|
1934
|
+
metadata: @config.metadata,
|
1935
|
+
retry_policy: @config.retry_policy
|
1936
|
+
|
1937
|
+
@firestore_admin_stub.list_user_creds request, options do |result, operation|
|
1938
|
+
yield result, operation if block_given?
|
1939
|
+
end
|
1940
|
+
rescue ::Gapic::Rest::Error => e
|
1941
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1942
|
+
end
|
1943
|
+
|
1944
|
+
##
|
1945
|
+
# Enables a user creds. No-op if the user creds are already enabled.
|
1946
|
+
#
|
1947
|
+
# @overload enable_user_creds(request, options = nil)
|
1948
|
+
# Pass arguments to `enable_user_creds` via a request object, either of type
|
1949
|
+
# {::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest} or an equivalent Hash.
|
1950
|
+
#
|
1951
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest, ::Hash]
|
1952
|
+
# A request object representing the call parameters. Required. To specify no
|
1953
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1954
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1955
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1956
|
+
#
|
1957
|
+
# @overload enable_user_creds(name: nil)
|
1958
|
+
# Pass arguments to `enable_user_creds` via keyword arguments. Note that at
|
1959
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1960
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1961
|
+
#
|
1962
|
+
# @param name [::String]
|
1963
|
+
# Required. A name of the form
|
1964
|
+
# `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
|
1965
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1966
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
1967
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1968
|
+
#
|
1969
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
1970
|
+
#
|
1971
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1972
|
+
#
|
1973
|
+
# @example Basic example
|
1974
|
+
# require "google/cloud/firestore/admin/v1"
|
1975
|
+
#
|
1976
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1977
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new
|
1978
|
+
#
|
1979
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1980
|
+
# request = Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new
|
1981
|
+
#
|
1982
|
+
# # Call the enable_user_creds method.
|
1983
|
+
# result = client.enable_user_creds request
|
1984
|
+
#
|
1985
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds.
|
1986
|
+
# p result
|
1987
|
+
#
|
1988
|
+
def enable_user_creds request, options = nil
|
1989
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1990
|
+
|
1991
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest
|
1992
|
+
|
1993
|
+
# Converts hash and nil to an options object
|
1994
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1995
|
+
|
1996
|
+
# Customize the options with defaults
|
1997
|
+
call_metadata = @config.rpcs.enable_user_creds.metadata.to_h
|
1998
|
+
|
1999
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2000
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2001
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2002
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
|
2003
|
+
transports_version_send: [:rest]
|
2004
|
+
|
2005
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2006
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2007
|
+
|
2008
|
+
options.apply_defaults timeout: @config.rpcs.enable_user_creds.timeout,
|
2009
|
+
metadata: call_metadata,
|
2010
|
+
retry_policy: @config.rpcs.enable_user_creds.retry_policy
|
2011
|
+
|
2012
|
+
options.apply_defaults timeout: @config.timeout,
|
2013
|
+
metadata: @config.metadata,
|
2014
|
+
retry_policy: @config.retry_policy
|
2015
|
+
|
2016
|
+
@firestore_admin_stub.enable_user_creds request, options do |result, operation|
|
2017
|
+
yield result, operation if block_given?
|
2018
|
+
end
|
2019
|
+
rescue ::Gapic::Rest::Error => e
|
2020
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2021
|
+
end
|
2022
|
+
|
2023
|
+
##
|
2024
|
+
# Disables a user creds. No-op if the user creds are already disabled.
|
2025
|
+
#
|
2026
|
+
# @overload disable_user_creds(request, options = nil)
|
2027
|
+
# Pass arguments to `disable_user_creds` via a request object, either of type
|
2028
|
+
# {::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest} or an equivalent Hash.
|
2029
|
+
#
|
2030
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest, ::Hash]
|
2031
|
+
# A request object representing the call parameters. Required. To specify no
|
2032
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2033
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2034
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2035
|
+
#
|
2036
|
+
# @overload disable_user_creds(name: nil)
|
2037
|
+
# Pass arguments to `disable_user_creds` via keyword arguments. Note that at
|
2038
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2039
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2040
|
+
#
|
2041
|
+
# @param name [::String]
|
2042
|
+
# Required. A name of the form
|
2043
|
+
# `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
|
2044
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2045
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
2046
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2047
|
+
#
|
2048
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
2049
|
+
#
|
2050
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2051
|
+
#
|
2052
|
+
# @example Basic example
|
2053
|
+
# require "google/cloud/firestore/admin/v1"
|
2054
|
+
#
|
2055
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2056
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new
|
2057
|
+
#
|
2058
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2059
|
+
# request = Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new
|
2060
|
+
#
|
2061
|
+
# # Call the disable_user_creds method.
|
2062
|
+
# result = client.disable_user_creds request
|
2063
|
+
#
|
2064
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds.
|
2065
|
+
# p result
|
2066
|
+
#
|
2067
|
+
def disable_user_creds request, options = nil
|
2068
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2069
|
+
|
2070
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest
|
2071
|
+
|
2072
|
+
# Converts hash and nil to an options object
|
2073
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2074
|
+
|
2075
|
+
# Customize the options with defaults
|
2076
|
+
call_metadata = @config.rpcs.disable_user_creds.metadata.to_h
|
2077
|
+
|
2078
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2079
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2080
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2081
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
|
2082
|
+
transports_version_send: [:rest]
|
2083
|
+
|
2084
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2085
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2086
|
+
|
2087
|
+
options.apply_defaults timeout: @config.rpcs.disable_user_creds.timeout,
|
2088
|
+
metadata: call_metadata,
|
2089
|
+
retry_policy: @config.rpcs.disable_user_creds.retry_policy
|
2090
|
+
|
2091
|
+
options.apply_defaults timeout: @config.timeout,
|
2092
|
+
metadata: @config.metadata,
|
2093
|
+
retry_policy: @config.retry_policy
|
2094
|
+
|
2095
|
+
@firestore_admin_stub.disable_user_creds request, options do |result, operation|
|
2096
|
+
yield result, operation if block_given?
|
2097
|
+
end
|
2098
|
+
rescue ::Gapic::Rest::Error => e
|
2099
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2100
|
+
end
|
2101
|
+
|
2102
|
+
##
|
2103
|
+
# Resets the password of a user creds.
|
2104
|
+
#
|
2105
|
+
# @overload reset_user_password(request, options = nil)
|
2106
|
+
# Pass arguments to `reset_user_password` via a request object, either of type
|
2107
|
+
# {::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest} or an equivalent Hash.
|
2108
|
+
#
|
2109
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest, ::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 reset_user_password(name: nil)
|
2116
|
+
# Pass arguments to `reset_user_password` 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. A name of the form
|
2122
|
+
# `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
|
2123
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2124
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
2125
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2126
|
+
#
|
2127
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
2128
|
+
#
|
2129
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2130
|
+
#
|
2131
|
+
# @example Basic example
|
2132
|
+
# require "google/cloud/firestore/admin/v1"
|
2133
|
+
#
|
2134
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2135
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new
|
2136
|
+
#
|
2137
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2138
|
+
# request = Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new
|
2139
|
+
#
|
2140
|
+
# # Call the reset_user_password method.
|
2141
|
+
# result = client.reset_user_password request
|
2142
|
+
#
|
2143
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds.
|
2144
|
+
# p result
|
2145
|
+
#
|
2146
|
+
def reset_user_password request, options = nil
|
2147
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2148
|
+
|
2149
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest
|
2150
|
+
|
2151
|
+
# Converts hash and nil to an options object
|
2152
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2153
|
+
|
2154
|
+
# Customize the options with defaults
|
2155
|
+
call_metadata = @config.rpcs.reset_user_password.metadata.to_h
|
2156
|
+
|
2157
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2158
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2159
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2160
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
|
2161
|
+
transports_version_send: [:rest]
|
2162
|
+
|
2163
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2164
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2165
|
+
|
2166
|
+
options.apply_defaults timeout: @config.rpcs.reset_user_password.timeout,
|
2167
|
+
metadata: call_metadata,
|
2168
|
+
retry_policy: @config.rpcs.reset_user_password.retry_policy
|
2169
|
+
|
2170
|
+
options.apply_defaults timeout: @config.timeout,
|
2171
|
+
metadata: @config.metadata,
|
2172
|
+
retry_policy: @config.retry_policy
|
2173
|
+
|
2174
|
+
@firestore_admin_stub.reset_user_password request, options do |result, operation|
|
2175
|
+
yield result, operation if block_given?
|
2176
|
+
end
|
2177
|
+
rescue ::Gapic::Rest::Error => e
|
2178
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2179
|
+
end
|
2180
|
+
|
2181
|
+
##
|
2182
|
+
# Deletes a user creds.
|
2183
|
+
#
|
2184
|
+
# @overload delete_user_creds(request, options = nil)
|
2185
|
+
# Pass arguments to `delete_user_creds` via a request object, either of type
|
2186
|
+
# {::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest} or an equivalent Hash.
|
2187
|
+
#
|
2188
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest, ::Hash]
|
2189
|
+
# A request object representing the call parameters. Required. To specify no
|
2190
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2191
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2192
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2193
|
+
#
|
2194
|
+
# @overload delete_user_creds(name: nil)
|
2195
|
+
# Pass arguments to `delete_user_creds` via keyword arguments. Note that at
|
2196
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2197
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2198
|
+
#
|
2199
|
+
# @param name [::String]
|
2200
|
+
# Required. A name of the form
|
2201
|
+
# `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
|
2202
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2203
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
2204
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2205
|
+
#
|
2206
|
+
# @return [::Google::Protobuf::Empty]
|
2207
|
+
#
|
2208
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2209
|
+
#
|
2210
|
+
# @example Basic example
|
2211
|
+
# require "google/cloud/firestore/admin/v1"
|
2212
|
+
#
|
2213
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2214
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new
|
2215
|
+
#
|
2216
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2217
|
+
# request = Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new
|
2218
|
+
#
|
2219
|
+
# # Call the delete_user_creds method.
|
2220
|
+
# result = client.delete_user_creds request
|
2221
|
+
#
|
2222
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
2223
|
+
# p result
|
2224
|
+
#
|
2225
|
+
def delete_user_creds request, options = nil
|
2226
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2227
|
+
|
2228
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest
|
2229
|
+
|
2230
|
+
# Converts hash and nil to an options object
|
2231
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2232
|
+
|
2233
|
+
# Customize the options with defaults
|
2234
|
+
call_metadata = @config.rpcs.delete_user_creds.metadata.to_h
|
2235
|
+
|
2236
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2237
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2238
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2239
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
|
2240
|
+
transports_version_send: [:rest]
|
2241
|
+
|
2242
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2243
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2244
|
+
|
2245
|
+
options.apply_defaults timeout: @config.rpcs.delete_user_creds.timeout,
|
2246
|
+
metadata: call_metadata,
|
2247
|
+
retry_policy: @config.rpcs.delete_user_creds.retry_policy
|
2248
|
+
|
2249
|
+
options.apply_defaults timeout: @config.timeout,
|
2250
|
+
metadata: @config.metadata,
|
2251
|
+
retry_policy: @config.retry_policy
|
2252
|
+
|
2253
|
+
@firestore_admin_stub.delete_user_creds request, options do |result, operation|
|
2254
|
+
yield result, operation if block_given?
|
2255
|
+
end
|
2256
|
+
rescue ::Gapic::Rest::Error => e
|
2257
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2258
|
+
end
|
2259
|
+
|
1696
2260
|
##
|
1697
2261
|
# Gets information about a backup.
|
1698
2262
|
#
|
@@ -2705,6 +3269,41 @@ module Google
|
|
2705
3269
|
#
|
2706
3270
|
attr_reader :delete_database
|
2707
3271
|
##
|
3272
|
+
# RPC-specific configuration for `create_user_creds`
|
3273
|
+
# @return [::Gapic::Config::Method]
|
3274
|
+
#
|
3275
|
+
attr_reader :create_user_creds
|
3276
|
+
##
|
3277
|
+
# RPC-specific configuration for `get_user_creds`
|
3278
|
+
# @return [::Gapic::Config::Method]
|
3279
|
+
#
|
3280
|
+
attr_reader :get_user_creds
|
3281
|
+
##
|
3282
|
+
# RPC-specific configuration for `list_user_creds`
|
3283
|
+
# @return [::Gapic::Config::Method]
|
3284
|
+
#
|
3285
|
+
attr_reader :list_user_creds
|
3286
|
+
##
|
3287
|
+
# RPC-specific configuration for `enable_user_creds`
|
3288
|
+
# @return [::Gapic::Config::Method]
|
3289
|
+
#
|
3290
|
+
attr_reader :enable_user_creds
|
3291
|
+
##
|
3292
|
+
# RPC-specific configuration for `disable_user_creds`
|
3293
|
+
# @return [::Gapic::Config::Method]
|
3294
|
+
#
|
3295
|
+
attr_reader :disable_user_creds
|
3296
|
+
##
|
3297
|
+
# RPC-specific configuration for `reset_user_password`
|
3298
|
+
# @return [::Gapic::Config::Method]
|
3299
|
+
#
|
3300
|
+
attr_reader :reset_user_password
|
3301
|
+
##
|
3302
|
+
# RPC-specific configuration for `delete_user_creds`
|
3303
|
+
# @return [::Gapic::Config::Method]
|
3304
|
+
#
|
3305
|
+
attr_reader :delete_user_creds
|
3306
|
+
##
|
2708
3307
|
# RPC-specific configuration for `get_backup`
|
2709
3308
|
# @return [::Gapic::Config::Method]
|
2710
3309
|
#
|
@@ -2782,6 +3381,20 @@ module Google
|
|
2782
3381
|
@update_database = ::Gapic::Config::Method.new update_database_config
|
2783
3382
|
delete_database_config = parent_rpcs.delete_database if parent_rpcs.respond_to? :delete_database
|
2784
3383
|
@delete_database = ::Gapic::Config::Method.new delete_database_config
|
3384
|
+
create_user_creds_config = parent_rpcs.create_user_creds if parent_rpcs.respond_to? :create_user_creds
|
3385
|
+
@create_user_creds = ::Gapic::Config::Method.new create_user_creds_config
|
3386
|
+
get_user_creds_config = parent_rpcs.get_user_creds if parent_rpcs.respond_to? :get_user_creds
|
3387
|
+
@get_user_creds = ::Gapic::Config::Method.new get_user_creds_config
|
3388
|
+
list_user_creds_config = parent_rpcs.list_user_creds if parent_rpcs.respond_to? :list_user_creds
|
3389
|
+
@list_user_creds = ::Gapic::Config::Method.new list_user_creds_config
|
3390
|
+
enable_user_creds_config = parent_rpcs.enable_user_creds if parent_rpcs.respond_to? :enable_user_creds
|
3391
|
+
@enable_user_creds = ::Gapic::Config::Method.new enable_user_creds_config
|
3392
|
+
disable_user_creds_config = parent_rpcs.disable_user_creds if parent_rpcs.respond_to? :disable_user_creds
|
3393
|
+
@disable_user_creds = ::Gapic::Config::Method.new disable_user_creds_config
|
3394
|
+
reset_user_password_config = parent_rpcs.reset_user_password if parent_rpcs.respond_to? :reset_user_password
|
3395
|
+
@reset_user_password = ::Gapic::Config::Method.new reset_user_password_config
|
3396
|
+
delete_user_creds_config = parent_rpcs.delete_user_creds if parent_rpcs.respond_to? :delete_user_creds
|
3397
|
+
@delete_user_creds = ::Gapic::Config::Method.new delete_user_creds_config
|
2785
3398
|
get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
|
2786
3399
|
@get_backup = ::Gapic::Config::Method.new get_backup_config
|
2787
3400
|
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|