google-cloud-memorystore-v1 1.10.0 → 1.11.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.
@@ -24,6 +24,29 @@ module Google
24
24
  module Memorystore
25
25
  # Path helper methods for the Memorystore API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified AuthToken resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/instances/{instance}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param instance [String]
37
+ # @param token_auth_user [String]
38
+ # @param auth_token [String]
39
+ #
40
+ # @return [::String]
41
+ def auth_token_path project:, location:, instance:, token_auth_user:, auth_token:
42
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
43
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
44
+ raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
45
+ raise ::ArgumentError, "token_auth_user cannot contain /" if token_auth_user.to_s.include? "/"
46
+
47
+ "projects/#{project}/locations/#{location}/instances/#{instance}/tokenAuthUsers/#{token_auth_user}/authTokens/#{auth_token}"
48
+ end
49
+
27
50
  ##
28
51
  # Create a fully-qualified Backup resource string.
29
52
  #
@@ -254,6 +277,27 @@ module Google
254
277
  "projects/#{project}/locations/#{location}/sharedRegionalCertificateAuthority"
255
278
  end
256
279
 
280
+ ##
281
+ # Create a fully-qualified TokenAuthUser resource string.
282
+ #
283
+ # The resource will be in the following format:
284
+ #
285
+ # `projects/{project}/locations/{location}/instances/{instance}/tokenAuthUsers/{token_auth_user}`
286
+ #
287
+ # @param project [String]
288
+ # @param location [String]
289
+ # @param instance [String]
290
+ # @param token_auth_user [String]
291
+ #
292
+ # @return [::String]
293
+ def token_auth_user_path project:, location:, instance:, token_auth_user:
294
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
295
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
296
+ raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
297
+
298
+ "projects/#{project}/locations/#{location}/instances/#{instance}/tokenAuthUsers/#{token_auth_user}"
299
+ end
300
+
257
301
  extend self
258
302
  end
259
303
  end