google-cloud-firestore-admin-v1 1.2.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/README.md +1 -1
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb +687 -1
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb +7 -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 +638 -1
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb +7 -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 +36 -0
- data/proto_docs/google/firestore/admin/v1/firestore_admin.rb +112 -0
- data/proto_docs/google/firestore/admin/v1/index.rb +51 -0
- data/proto_docs/google/firestore/admin/v1/schedule.rb +4 -0
- data/proto_docs/google/firestore/admin/v1/user_creds.rb +78 -0
- data/proto_docs/google/longrunning/operations.rb +4 -0
- metadata +8 -9
@@ -134,6 +134,10 @@ module Google
|
|
134
134
|
|
135
135
|
default_config.rpcs.bulk_delete_documents.timeout = 60.0
|
136
136
|
|
137
|
+
default_config.rpcs.create_database.timeout = 120.0
|
138
|
+
|
139
|
+
default_config.rpcs.restore_database.timeout = 120.0
|
140
|
+
|
137
141
|
default_config
|
138
142
|
end
|
139
143
|
yield @configure if block_given?
|
@@ -1801,6 +1805,619 @@ module Google
|
|
1801
1805
|
raise ::Google::Cloud::Error.from_error(e)
|
1802
1806
|
end
|
1803
1807
|
|
1808
|
+
##
|
1809
|
+
# Create a user creds.
|
1810
|
+
#
|
1811
|
+
# @overload create_user_creds(request, options = nil)
|
1812
|
+
# Pass arguments to `create_user_creds` via a request object, either of type
|
1813
|
+
# {::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest} or an equivalent Hash.
|
1814
|
+
#
|
1815
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest, ::Hash]
|
1816
|
+
# A request object representing the call parameters. Required. To specify no
|
1817
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1818
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1819
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1820
|
+
#
|
1821
|
+
# @overload create_user_creds(parent: nil, user_creds: nil, user_creds_id: nil)
|
1822
|
+
# Pass arguments to `create_user_creds` via keyword arguments. Note that at
|
1823
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1824
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1825
|
+
#
|
1826
|
+
# @param parent [::String]
|
1827
|
+
# Required. A parent name of the form
|
1828
|
+
# `projects/{project_id}/databases/{database_id}`
|
1829
|
+
# @param user_creds [::Google::Cloud::Firestore::Admin::V1::UserCreds, ::Hash]
|
1830
|
+
# Required. The user creds to create.
|
1831
|
+
# @param user_creds_id [::String]
|
1832
|
+
# Required. The ID to use for the user creds, which will become the final
|
1833
|
+
# component of the user creds's resource name.
|
1834
|
+
#
|
1835
|
+
# This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
|
1836
|
+
# with first character a letter and the last a letter or a number. Must not
|
1837
|
+
# be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/.
|
1838
|
+
#
|
1839
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1840
|
+
# @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
1841
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1842
|
+
#
|
1843
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
1844
|
+
#
|
1845
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1846
|
+
#
|
1847
|
+
# @example Basic example
|
1848
|
+
# require "google/cloud/firestore/admin/v1"
|
1849
|
+
#
|
1850
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1851
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new
|
1852
|
+
#
|
1853
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1854
|
+
# request = Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new
|
1855
|
+
#
|
1856
|
+
# # Call the create_user_creds method.
|
1857
|
+
# result = client.create_user_creds request
|
1858
|
+
#
|
1859
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds.
|
1860
|
+
# p result
|
1861
|
+
#
|
1862
|
+
def create_user_creds request, options = nil
|
1863
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1864
|
+
|
1865
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest
|
1866
|
+
|
1867
|
+
# Converts hash and nil to an options object
|
1868
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1869
|
+
|
1870
|
+
# Customize the options with defaults
|
1871
|
+
metadata = @config.rpcs.create_user_creds.metadata.to_h
|
1872
|
+
|
1873
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1874
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1875
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1876
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
|
1877
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1878
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1879
|
+
|
1880
|
+
header_params = {}
|
1881
|
+
if request.parent
|
1882
|
+
header_params["parent"] = request.parent
|
1883
|
+
end
|
1884
|
+
|
1885
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1886
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1887
|
+
|
1888
|
+
options.apply_defaults timeout: @config.rpcs.create_user_creds.timeout,
|
1889
|
+
metadata: metadata,
|
1890
|
+
retry_policy: @config.rpcs.create_user_creds.retry_policy
|
1891
|
+
|
1892
|
+
options.apply_defaults timeout: @config.timeout,
|
1893
|
+
metadata: @config.metadata,
|
1894
|
+
retry_policy: @config.retry_policy
|
1895
|
+
|
1896
|
+
@firestore_admin_stub.call_rpc :create_user_creds, request, options: options do |response, operation|
|
1897
|
+
yield response, operation if block_given?
|
1898
|
+
end
|
1899
|
+
rescue ::GRPC::BadStatus => e
|
1900
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1901
|
+
end
|
1902
|
+
|
1903
|
+
##
|
1904
|
+
# Gets a user creds resource. Note that the returned resource does not
|
1905
|
+
# contain the secret value itself.
|
1906
|
+
#
|
1907
|
+
# @overload get_user_creds(request, options = nil)
|
1908
|
+
# Pass arguments to `get_user_creds` via a request object, either of type
|
1909
|
+
# {::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest} or an equivalent Hash.
|
1910
|
+
#
|
1911
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest, ::Hash]
|
1912
|
+
# A request object representing the call parameters. Required. To specify no
|
1913
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1914
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1915
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1916
|
+
#
|
1917
|
+
# @overload get_user_creds(name: nil)
|
1918
|
+
# Pass arguments to `get_user_creds` via keyword arguments. Note that at
|
1919
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1920
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1921
|
+
#
|
1922
|
+
# @param name [::String]
|
1923
|
+
# Required. A name of the form
|
1924
|
+
# `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
|
1925
|
+
#
|
1926
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1927
|
+
# @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
1928
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1929
|
+
#
|
1930
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
1931
|
+
#
|
1932
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1933
|
+
#
|
1934
|
+
# @example Basic example
|
1935
|
+
# require "google/cloud/firestore/admin/v1"
|
1936
|
+
#
|
1937
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1938
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new
|
1939
|
+
#
|
1940
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1941
|
+
# request = Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new
|
1942
|
+
#
|
1943
|
+
# # Call the get_user_creds method.
|
1944
|
+
# result = client.get_user_creds request
|
1945
|
+
#
|
1946
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds.
|
1947
|
+
# p result
|
1948
|
+
#
|
1949
|
+
def get_user_creds request, options = nil
|
1950
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1951
|
+
|
1952
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest
|
1953
|
+
|
1954
|
+
# Converts hash and nil to an options object
|
1955
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1956
|
+
|
1957
|
+
# Customize the options with defaults
|
1958
|
+
metadata = @config.rpcs.get_user_creds.metadata.to_h
|
1959
|
+
|
1960
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1961
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1962
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1963
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
|
1964
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1965
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1966
|
+
|
1967
|
+
header_params = {}
|
1968
|
+
if request.name
|
1969
|
+
header_params["name"] = request.name
|
1970
|
+
end
|
1971
|
+
|
1972
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1973
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1974
|
+
|
1975
|
+
options.apply_defaults timeout: @config.rpcs.get_user_creds.timeout,
|
1976
|
+
metadata: metadata,
|
1977
|
+
retry_policy: @config.rpcs.get_user_creds.retry_policy
|
1978
|
+
|
1979
|
+
options.apply_defaults timeout: @config.timeout,
|
1980
|
+
metadata: @config.metadata,
|
1981
|
+
retry_policy: @config.retry_policy
|
1982
|
+
|
1983
|
+
@firestore_admin_stub.call_rpc :get_user_creds, request, options: options do |response, operation|
|
1984
|
+
yield response, operation if block_given?
|
1985
|
+
end
|
1986
|
+
rescue ::GRPC::BadStatus => e
|
1987
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1988
|
+
end
|
1989
|
+
|
1990
|
+
##
|
1991
|
+
# List all user creds in the database. Note that the returned resource
|
1992
|
+
# does not contain the secret value itself.
|
1993
|
+
#
|
1994
|
+
# @overload list_user_creds(request, options = nil)
|
1995
|
+
# Pass arguments to `list_user_creds` via a request object, either of type
|
1996
|
+
# {::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest} or an equivalent Hash.
|
1997
|
+
#
|
1998
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest, ::Hash]
|
1999
|
+
# A request object representing the call parameters. Required. To specify no
|
2000
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2001
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2002
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2003
|
+
#
|
2004
|
+
# @overload list_user_creds(parent: nil)
|
2005
|
+
# Pass arguments to `list_user_creds` via keyword arguments. Note that at
|
2006
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2007
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2008
|
+
#
|
2009
|
+
# @param parent [::String]
|
2010
|
+
# Required. A parent database name of the form
|
2011
|
+
# `projects/{project_id}/databases/{database_id}`
|
2012
|
+
#
|
2013
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2014
|
+
# @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse]
|
2015
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2016
|
+
#
|
2017
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse]
|
2018
|
+
#
|
2019
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2020
|
+
#
|
2021
|
+
# @example Basic example
|
2022
|
+
# require "google/cloud/firestore/admin/v1"
|
2023
|
+
#
|
2024
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2025
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new
|
2026
|
+
#
|
2027
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2028
|
+
# request = Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new
|
2029
|
+
#
|
2030
|
+
# # Call the list_user_creds method.
|
2031
|
+
# result = client.list_user_creds request
|
2032
|
+
#
|
2033
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse.
|
2034
|
+
# p result
|
2035
|
+
#
|
2036
|
+
def list_user_creds request, options = nil
|
2037
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2038
|
+
|
2039
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest
|
2040
|
+
|
2041
|
+
# Converts hash and nil to an options object
|
2042
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2043
|
+
|
2044
|
+
# Customize the options with defaults
|
2045
|
+
metadata = @config.rpcs.list_user_creds.metadata.to_h
|
2046
|
+
|
2047
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2048
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2049
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2050
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
|
2051
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2052
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2053
|
+
|
2054
|
+
header_params = {}
|
2055
|
+
if request.parent
|
2056
|
+
header_params["parent"] = request.parent
|
2057
|
+
end
|
2058
|
+
|
2059
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2060
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2061
|
+
|
2062
|
+
options.apply_defaults timeout: @config.rpcs.list_user_creds.timeout,
|
2063
|
+
metadata: metadata,
|
2064
|
+
retry_policy: @config.rpcs.list_user_creds.retry_policy
|
2065
|
+
|
2066
|
+
options.apply_defaults timeout: @config.timeout,
|
2067
|
+
metadata: @config.metadata,
|
2068
|
+
retry_policy: @config.retry_policy
|
2069
|
+
|
2070
|
+
@firestore_admin_stub.call_rpc :list_user_creds, request, options: options do |response, operation|
|
2071
|
+
yield response, operation if block_given?
|
2072
|
+
end
|
2073
|
+
rescue ::GRPC::BadStatus => e
|
2074
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2075
|
+
end
|
2076
|
+
|
2077
|
+
##
|
2078
|
+
# Enables a user creds. No-op if the user creds are already enabled.
|
2079
|
+
#
|
2080
|
+
# @overload enable_user_creds(request, options = nil)
|
2081
|
+
# Pass arguments to `enable_user_creds` via a request object, either of type
|
2082
|
+
# {::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest} or an equivalent Hash.
|
2083
|
+
#
|
2084
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest, ::Hash]
|
2085
|
+
# A request object representing the call parameters. Required. To specify no
|
2086
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2087
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2088
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2089
|
+
#
|
2090
|
+
# @overload enable_user_creds(name: nil)
|
2091
|
+
# Pass arguments to `enable_user_creds` via keyword arguments. Note that at
|
2092
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2093
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2094
|
+
#
|
2095
|
+
# @param name [::String]
|
2096
|
+
# Required. A name of the form
|
2097
|
+
# `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
|
2098
|
+
#
|
2099
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2100
|
+
# @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
2101
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2102
|
+
#
|
2103
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
2104
|
+
#
|
2105
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2106
|
+
#
|
2107
|
+
# @example Basic example
|
2108
|
+
# require "google/cloud/firestore/admin/v1"
|
2109
|
+
#
|
2110
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2111
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new
|
2112
|
+
#
|
2113
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2114
|
+
# request = Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new
|
2115
|
+
#
|
2116
|
+
# # Call the enable_user_creds method.
|
2117
|
+
# result = client.enable_user_creds request
|
2118
|
+
#
|
2119
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds.
|
2120
|
+
# p result
|
2121
|
+
#
|
2122
|
+
def enable_user_creds request, options = nil
|
2123
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2124
|
+
|
2125
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest
|
2126
|
+
|
2127
|
+
# Converts hash and nil to an options object
|
2128
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2129
|
+
|
2130
|
+
# Customize the options with defaults
|
2131
|
+
metadata = @config.rpcs.enable_user_creds.metadata.to_h
|
2132
|
+
|
2133
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2134
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2135
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2136
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
|
2137
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2138
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2139
|
+
|
2140
|
+
header_params = {}
|
2141
|
+
if request.name
|
2142
|
+
header_params["name"] = request.name
|
2143
|
+
end
|
2144
|
+
|
2145
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2146
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2147
|
+
|
2148
|
+
options.apply_defaults timeout: @config.rpcs.enable_user_creds.timeout,
|
2149
|
+
metadata: metadata,
|
2150
|
+
retry_policy: @config.rpcs.enable_user_creds.retry_policy
|
2151
|
+
|
2152
|
+
options.apply_defaults timeout: @config.timeout,
|
2153
|
+
metadata: @config.metadata,
|
2154
|
+
retry_policy: @config.retry_policy
|
2155
|
+
|
2156
|
+
@firestore_admin_stub.call_rpc :enable_user_creds, request, options: options do |response, operation|
|
2157
|
+
yield response, operation if block_given?
|
2158
|
+
end
|
2159
|
+
rescue ::GRPC::BadStatus => e
|
2160
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2161
|
+
end
|
2162
|
+
|
2163
|
+
##
|
2164
|
+
# Disables a user creds. No-op if the user creds are already disabled.
|
2165
|
+
#
|
2166
|
+
# @overload disable_user_creds(request, options = nil)
|
2167
|
+
# Pass arguments to `disable_user_creds` via a request object, either of type
|
2168
|
+
# {::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest} or an equivalent Hash.
|
2169
|
+
#
|
2170
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest, ::Hash]
|
2171
|
+
# A request object representing the call parameters. Required. To specify no
|
2172
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2173
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2174
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2175
|
+
#
|
2176
|
+
# @overload disable_user_creds(name: nil)
|
2177
|
+
# Pass arguments to `disable_user_creds` via keyword arguments. Note that at
|
2178
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2179
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2180
|
+
#
|
2181
|
+
# @param name [::String]
|
2182
|
+
# Required. A name of the form
|
2183
|
+
# `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
|
2184
|
+
#
|
2185
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2186
|
+
# @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
2187
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2188
|
+
#
|
2189
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
2190
|
+
#
|
2191
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2192
|
+
#
|
2193
|
+
# @example Basic example
|
2194
|
+
# require "google/cloud/firestore/admin/v1"
|
2195
|
+
#
|
2196
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2197
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new
|
2198
|
+
#
|
2199
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2200
|
+
# request = Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new
|
2201
|
+
#
|
2202
|
+
# # Call the disable_user_creds method.
|
2203
|
+
# result = client.disable_user_creds request
|
2204
|
+
#
|
2205
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds.
|
2206
|
+
# p result
|
2207
|
+
#
|
2208
|
+
def disable_user_creds request, options = nil
|
2209
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2210
|
+
|
2211
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest
|
2212
|
+
|
2213
|
+
# Converts hash and nil to an options object
|
2214
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2215
|
+
|
2216
|
+
# Customize the options with defaults
|
2217
|
+
metadata = @config.rpcs.disable_user_creds.metadata.to_h
|
2218
|
+
|
2219
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2220
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2221
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2222
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
|
2223
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2224
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2225
|
+
|
2226
|
+
header_params = {}
|
2227
|
+
if request.name
|
2228
|
+
header_params["name"] = request.name
|
2229
|
+
end
|
2230
|
+
|
2231
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2232
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2233
|
+
|
2234
|
+
options.apply_defaults timeout: @config.rpcs.disable_user_creds.timeout,
|
2235
|
+
metadata: metadata,
|
2236
|
+
retry_policy: @config.rpcs.disable_user_creds.retry_policy
|
2237
|
+
|
2238
|
+
options.apply_defaults timeout: @config.timeout,
|
2239
|
+
metadata: @config.metadata,
|
2240
|
+
retry_policy: @config.retry_policy
|
2241
|
+
|
2242
|
+
@firestore_admin_stub.call_rpc :disable_user_creds, request, options: options do |response, operation|
|
2243
|
+
yield response, operation if block_given?
|
2244
|
+
end
|
2245
|
+
rescue ::GRPC::BadStatus => e
|
2246
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2247
|
+
end
|
2248
|
+
|
2249
|
+
##
|
2250
|
+
# Resets the password of a user creds.
|
2251
|
+
#
|
2252
|
+
# @overload reset_user_password(request, options = nil)
|
2253
|
+
# Pass arguments to `reset_user_password` via a request object, either of type
|
2254
|
+
# {::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest} or an equivalent Hash.
|
2255
|
+
#
|
2256
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest, ::Hash]
|
2257
|
+
# A request object representing the call parameters. Required. To specify no
|
2258
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2259
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2260
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2261
|
+
#
|
2262
|
+
# @overload reset_user_password(name: nil)
|
2263
|
+
# Pass arguments to `reset_user_password` via keyword arguments. Note that at
|
2264
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2265
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2266
|
+
#
|
2267
|
+
# @param name [::String]
|
2268
|
+
# Required. A name of the form
|
2269
|
+
# `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
|
2270
|
+
#
|
2271
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2272
|
+
# @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
2273
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2274
|
+
#
|
2275
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::UserCreds]
|
2276
|
+
#
|
2277
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2278
|
+
#
|
2279
|
+
# @example Basic example
|
2280
|
+
# require "google/cloud/firestore/admin/v1"
|
2281
|
+
#
|
2282
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2283
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new
|
2284
|
+
#
|
2285
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2286
|
+
# request = Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new
|
2287
|
+
#
|
2288
|
+
# # Call the reset_user_password method.
|
2289
|
+
# result = client.reset_user_password request
|
2290
|
+
#
|
2291
|
+
# # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds.
|
2292
|
+
# p result
|
2293
|
+
#
|
2294
|
+
def reset_user_password request, options = nil
|
2295
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2296
|
+
|
2297
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest
|
2298
|
+
|
2299
|
+
# Converts hash and nil to an options object
|
2300
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2301
|
+
|
2302
|
+
# Customize the options with defaults
|
2303
|
+
metadata = @config.rpcs.reset_user_password.metadata.to_h
|
2304
|
+
|
2305
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2306
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2307
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2308
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
|
2309
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2310
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2311
|
+
|
2312
|
+
header_params = {}
|
2313
|
+
if request.name
|
2314
|
+
header_params["name"] = request.name
|
2315
|
+
end
|
2316
|
+
|
2317
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2318
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2319
|
+
|
2320
|
+
options.apply_defaults timeout: @config.rpcs.reset_user_password.timeout,
|
2321
|
+
metadata: metadata,
|
2322
|
+
retry_policy: @config.rpcs.reset_user_password.retry_policy
|
2323
|
+
|
2324
|
+
options.apply_defaults timeout: @config.timeout,
|
2325
|
+
metadata: @config.metadata,
|
2326
|
+
retry_policy: @config.retry_policy
|
2327
|
+
|
2328
|
+
@firestore_admin_stub.call_rpc :reset_user_password, request, options: options do |response, operation|
|
2329
|
+
yield response, operation if block_given?
|
2330
|
+
end
|
2331
|
+
rescue ::GRPC::BadStatus => e
|
2332
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2333
|
+
end
|
2334
|
+
|
2335
|
+
##
|
2336
|
+
# Deletes a user creds.
|
2337
|
+
#
|
2338
|
+
# @overload delete_user_creds(request, options = nil)
|
2339
|
+
# Pass arguments to `delete_user_creds` via a request object, either of type
|
2340
|
+
# {::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest} or an equivalent Hash.
|
2341
|
+
#
|
2342
|
+
# @param request [::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest, ::Hash]
|
2343
|
+
# A request object representing the call parameters. Required. To specify no
|
2344
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2345
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2346
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2347
|
+
#
|
2348
|
+
# @overload delete_user_creds(name: nil)
|
2349
|
+
# Pass arguments to `delete_user_creds` via keyword arguments. Note that at
|
2350
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2351
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2352
|
+
#
|
2353
|
+
# @param name [::String]
|
2354
|
+
# Required. A name of the form
|
2355
|
+
# `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
|
2356
|
+
#
|
2357
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2358
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
2359
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2360
|
+
#
|
2361
|
+
# @return [::Google::Protobuf::Empty]
|
2362
|
+
#
|
2363
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2364
|
+
#
|
2365
|
+
# @example Basic example
|
2366
|
+
# require "google/cloud/firestore/admin/v1"
|
2367
|
+
#
|
2368
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2369
|
+
# client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new
|
2370
|
+
#
|
2371
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2372
|
+
# request = Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new
|
2373
|
+
#
|
2374
|
+
# # Call the delete_user_creds method.
|
2375
|
+
# result = client.delete_user_creds request
|
2376
|
+
#
|
2377
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
2378
|
+
# p result
|
2379
|
+
#
|
2380
|
+
def delete_user_creds request, options = nil
|
2381
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2382
|
+
|
2383
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest
|
2384
|
+
|
2385
|
+
# Converts hash and nil to an options object
|
2386
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2387
|
+
|
2388
|
+
# Customize the options with defaults
|
2389
|
+
metadata = @config.rpcs.delete_user_creds.metadata.to_h
|
2390
|
+
|
2391
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2392
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2393
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2394
|
+
gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
|
2395
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2396
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2397
|
+
|
2398
|
+
header_params = {}
|
2399
|
+
if request.name
|
2400
|
+
header_params["name"] = request.name
|
2401
|
+
end
|
2402
|
+
|
2403
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2404
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2405
|
+
|
2406
|
+
options.apply_defaults timeout: @config.rpcs.delete_user_creds.timeout,
|
2407
|
+
metadata: metadata,
|
2408
|
+
retry_policy: @config.rpcs.delete_user_creds.retry_policy
|
2409
|
+
|
2410
|
+
options.apply_defaults timeout: @config.timeout,
|
2411
|
+
metadata: @config.metadata,
|
2412
|
+
retry_policy: @config.retry_policy
|
2413
|
+
|
2414
|
+
@firestore_admin_stub.call_rpc :delete_user_creds, request, options: options do |response, operation|
|
2415
|
+
yield response, operation if block_given?
|
2416
|
+
end
|
2417
|
+
rescue ::GRPC::BadStatus => e
|
2418
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2419
|
+
end
|
2420
|
+
|
1804
2421
|
##
|
1805
2422
|
# Gets information about a backup.
|
1806
2423
|
#
|
@@ -1901,7 +2518,7 @@ module Google
|
|
1901
2518
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1902
2519
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1903
2520
|
#
|
1904
|
-
# @overload list_backups(parent: nil)
|
2521
|
+
# @overload list_backups(parent: nil, filter: nil)
|
1905
2522
|
# Pass arguments to `list_backups` via keyword arguments. Note that at
|
1906
2523
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1907
2524
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1913,6 +2530,19 @@ module Google
|
|
1913
2530
|
# Use `{location} = '-'` to list backups from all locations for the given
|
1914
2531
|
# project. This allows listing backups from a single location or from all
|
1915
2532
|
# locations.
|
2533
|
+
# @param filter [::String]
|
2534
|
+
# An expression that filters the list of returned backups.
|
2535
|
+
#
|
2536
|
+
# A filter expression consists of a field name, a comparison operator, and a
|
2537
|
+
# value for filtering.
|
2538
|
+
# The value must be a string, a number, or a boolean. The comparison operator
|
2539
|
+
# must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
|
2540
|
+
# Colon `:` is the contains operator. Filter rules are not case sensitive.
|
2541
|
+
#
|
2542
|
+
# The following fields in the {::Google::Cloud::Firestore::Admin::V1::Backup Backup} are
|
2543
|
+
# eligible for filtering:
|
2544
|
+
#
|
2545
|
+
# * `database_uid` (supports `=` only)
|
1916
2546
|
#
|
1917
2547
|
# @yield [response, operation] Access the result along with the RPC operation
|
1918
2548
|
# @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse]
|
@@ -2685,6 +3315,13 @@ module Google
|
|
2685
3315
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2686
3316
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2687
3317
|
# * (`nil`) indicating no credentials
|
3318
|
+
#
|
3319
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
3320
|
+
# external source for authentication to Google Cloud, you must validate it before
|
3321
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
3322
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
3323
|
+
# For more information, refer to [Validate credential configurations from external
|
3324
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
2688
3325
|
# @return [::Object]
|
2689
3326
|
# @!attribute [rw] scope
|
2690
3327
|
# The OAuth scopes
|
@@ -2876,6 +3513,41 @@ module Google
|
|
2876
3513
|
#
|
2877
3514
|
attr_reader :delete_database
|
2878
3515
|
##
|
3516
|
+
# RPC-specific configuration for `create_user_creds`
|
3517
|
+
# @return [::Gapic::Config::Method]
|
3518
|
+
#
|
3519
|
+
attr_reader :create_user_creds
|
3520
|
+
##
|
3521
|
+
# RPC-specific configuration for `get_user_creds`
|
3522
|
+
# @return [::Gapic::Config::Method]
|
3523
|
+
#
|
3524
|
+
attr_reader :get_user_creds
|
3525
|
+
##
|
3526
|
+
# RPC-specific configuration for `list_user_creds`
|
3527
|
+
# @return [::Gapic::Config::Method]
|
3528
|
+
#
|
3529
|
+
attr_reader :list_user_creds
|
3530
|
+
##
|
3531
|
+
# RPC-specific configuration for `enable_user_creds`
|
3532
|
+
# @return [::Gapic::Config::Method]
|
3533
|
+
#
|
3534
|
+
attr_reader :enable_user_creds
|
3535
|
+
##
|
3536
|
+
# RPC-specific configuration for `disable_user_creds`
|
3537
|
+
# @return [::Gapic::Config::Method]
|
3538
|
+
#
|
3539
|
+
attr_reader :disable_user_creds
|
3540
|
+
##
|
3541
|
+
# RPC-specific configuration for `reset_user_password`
|
3542
|
+
# @return [::Gapic::Config::Method]
|
3543
|
+
#
|
3544
|
+
attr_reader :reset_user_password
|
3545
|
+
##
|
3546
|
+
# RPC-specific configuration for `delete_user_creds`
|
3547
|
+
# @return [::Gapic::Config::Method]
|
3548
|
+
#
|
3549
|
+
attr_reader :delete_user_creds
|
3550
|
+
##
|
2879
3551
|
# RPC-specific configuration for `get_backup`
|
2880
3552
|
# @return [::Gapic::Config::Method]
|
2881
3553
|
#
|
@@ -2953,6 +3625,20 @@ module Google
|
|
2953
3625
|
@update_database = ::Gapic::Config::Method.new update_database_config
|
2954
3626
|
delete_database_config = parent_rpcs.delete_database if parent_rpcs.respond_to? :delete_database
|
2955
3627
|
@delete_database = ::Gapic::Config::Method.new delete_database_config
|
3628
|
+
create_user_creds_config = parent_rpcs.create_user_creds if parent_rpcs.respond_to? :create_user_creds
|
3629
|
+
@create_user_creds = ::Gapic::Config::Method.new create_user_creds_config
|
3630
|
+
get_user_creds_config = parent_rpcs.get_user_creds if parent_rpcs.respond_to? :get_user_creds
|
3631
|
+
@get_user_creds = ::Gapic::Config::Method.new get_user_creds_config
|
3632
|
+
list_user_creds_config = parent_rpcs.list_user_creds if parent_rpcs.respond_to? :list_user_creds
|
3633
|
+
@list_user_creds = ::Gapic::Config::Method.new list_user_creds_config
|
3634
|
+
enable_user_creds_config = parent_rpcs.enable_user_creds if parent_rpcs.respond_to? :enable_user_creds
|
3635
|
+
@enable_user_creds = ::Gapic::Config::Method.new enable_user_creds_config
|
3636
|
+
disable_user_creds_config = parent_rpcs.disable_user_creds if parent_rpcs.respond_to? :disable_user_creds
|
3637
|
+
@disable_user_creds = ::Gapic::Config::Method.new disable_user_creds_config
|
3638
|
+
reset_user_password_config = parent_rpcs.reset_user_password if parent_rpcs.respond_to? :reset_user_password
|
3639
|
+
@reset_user_password = ::Gapic::Config::Method.new reset_user_password_config
|
3640
|
+
delete_user_creds_config = parent_rpcs.delete_user_creds if parent_rpcs.respond_to? :delete_user_creds
|
3641
|
+
@delete_user_creds = ::Gapic::Config::Method.new delete_user_creds_config
|
2956
3642
|
get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
|
2957
3643
|
@get_backup = ::Gapic::Config::Method.new get_backup_config
|
2958
3644
|
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|