google-cloud-firestore-admin-v1 1.3.0 → 1.4.1

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.
@@ -702,8 +702,8 @@ module Google
702
702
 
703
703
  config_attr :endpoint, nil, ::String, nil
704
704
  config_attr :credentials, nil do |value|
705
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
706
- allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
705
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
706
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
707
707
  allowed.any? { |klass| klass === value }
708
708
  end
709
709
  config_attr :scope, nil, ::String, ::Array, nil
@@ -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