google-cloud-lustre-v1 1.0.1 → 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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -2
  3. data/lib/google/cloud/lustre/v1/bindings_override.rb +58 -1
  4. data/lib/google/cloud/lustre/v1/directory_policy_pb.rb +31 -0
  5. data/lib/google/cloud/lustre/v1/instance_pb.rb +16 -1
  6. data/lib/google/cloud/lustre/v1/lustre/client.rb +1249 -124
  7. data/lib/google/cloud/lustre/v1/lustre/credentials.rb +1 -1
  8. data/lib/google/cloud/lustre/v1/lustre/operations.rb +1 -1
  9. data/lib/google/cloud/lustre/v1/lustre/paths.rb +107 -1
  10. data/lib/google/cloud/lustre/v1/lustre/rest/client.rb +1173 -117
  11. data/lib/google/cloud/lustre/v1/lustre/rest/operations.rb +1 -1
  12. data/lib/google/cloud/lustre/v1/lustre/rest/service_stub.rb +615 -1
  13. data/lib/google/cloud/lustre/v1/lustre/rest.rb +1 -1
  14. data/lib/google/cloud/lustre/v1/lustre.rb +1 -1
  15. data/lib/google/cloud/lustre/v1/lustre_pb.rb +3 -1
  16. data/lib/google/cloud/lustre/v1/lustre_services_pb.rb +21 -1
  17. data/lib/google/cloud/lustre/v1/mirror_pb.rb +37 -0
  18. data/lib/google/cloud/lustre/v1/rest.rb +1 -1
  19. data/lib/google/cloud/lustre/v1/transfer_pb.rb +1 -1
  20. data/lib/google/cloud/lustre/v1/version.rb +1 -1
  21. data/lib/google/cloud/lustre/v1.rb +1 -1
  22. data/lib/google-cloud-lustre-v1.rb +1 -1
  23. data/proto_docs/google/api/client.rb +1 -1
  24. data/proto_docs/google/api/field_behavior.rb +1 -1
  25. data/proto_docs/google/api/field_info.rb +1 -1
  26. data/proto_docs/google/api/launch_stage.rb +1 -1
  27. data/proto_docs/google/api/resource.rb +1 -1
  28. data/proto_docs/google/cloud/lustre/v1/directory_policy.rb +142 -0
  29. data/proto_docs/google/cloud/lustre/v1/instance.rb +294 -7
  30. data/proto_docs/google/cloud/lustre/v1/mirror.rb +298 -0
  31. data/proto_docs/google/cloud/lustre/v1/transfer.rb +13 -1
  32. data/proto_docs/google/longrunning/operations.rb +1 -1
  33. data/proto_docs/google/protobuf/any.rb +1 -1
  34. data/proto_docs/google/protobuf/duration.rb +1 -1
  35. data/proto_docs/google/protobuf/empty.rb +1 -1
  36. data/proto_docs/google/protobuf/field_mask.rb +1 -1
  37. data/proto_docs/google/protobuf/timestamp.rb +8 -7
  38. data/proto_docs/google/rpc/code.rb +1 -1
  39. data/proto_docs/google/rpc/status.rb +1 -1
  40. data/proto_docs/google/type/date.rb +56 -0
  41. data/proto_docs/google/type/dayofweek.rb +49 -0
  42. data/proto_docs/google/type/timeofday.rb +49 -0
  43. metadata +30 -8
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2025 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2025 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2025 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -24,6 +24,48 @@ module Google
24
24
  module Lustre
25
25
  # Path helper methods for the Lustre API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified CryptoKey resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param key_ring [String]
37
+ # @param crypto_key [String]
38
+ #
39
+ # @return [::String]
40
+ def crypto_key_path project:, location:, key_ring:, crypto_key:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
43
+ raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
44
+
45
+ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
46
+ end
47
+
48
+ ##
49
+ # Create a fully-qualified DirectoryPolicy resource string.
50
+ #
51
+ # The resource will be in the following format:
52
+ #
53
+ # `projects/{project}/locations/{location}/instances/{instance}/directoryPolicies/{directory_policy}`
54
+ #
55
+ # @param project [String]
56
+ # @param location [String]
57
+ # @param instance [String]
58
+ # @param directory_policy [String]
59
+ #
60
+ # @return [::String]
61
+ def directory_policy_path project:, location:, instance:, directory_policy:
62
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
63
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
64
+ raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
65
+
66
+ "projects/#{project}/locations/#{location}/instances/#{instance}/directoryPolicies/#{directory_policy}"
67
+ end
68
+
27
69
  ##
28
70
  # Create a fully-qualified Instance resource string.
29
71
  #
@@ -60,6 +102,27 @@ module Google
60
102
  "projects/#{project}/locations/#{location}"
61
103
  end
62
104
 
105
+ ##
106
+ # Create a fully-qualified Mirror resource string.
107
+ #
108
+ # The resource will be in the following format:
109
+ #
110
+ # `projects/{project}/locations/{location}/instances/{instance}/mirrors/{mirror}`
111
+ #
112
+ # @param project [String]
113
+ # @param location [String]
114
+ # @param instance [String]
115
+ # @param mirror [String]
116
+ #
117
+ # @return [::String]
118
+ def mirror_path project:, location:, instance:, mirror:
119
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
120
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
121
+ raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
122
+
123
+ "projects/#{project}/locations/#{location}/instances/#{instance}/mirrors/#{mirror}"
124
+ end
125
+
63
126
  ##
64
127
  # Create a fully-qualified Network resource string.
65
128
  #
@@ -77,6 +140,49 @@ module Google
77
140
  "projects/#{project}/global/networks/#{network}"
78
141
  end
79
142
 
143
+ ##
144
+ # Create a fully-qualified ResourcePolicy resource string.
145
+ #
146
+ # @overload resource_policy_path(project:, region:, resource_policy:)
147
+ # The resource will be in the following format:
148
+ #
149
+ # `projects/{project}/regions/{region}/resourcePolicies/{resource_policy}`
150
+ #
151
+ # @param project [String]
152
+ # @param region [String]
153
+ # @param resource_policy [String]
154
+ #
155
+ # @overload resource_policy_path(project:, location:, resource_policy:)
156
+ # The resource will be in the following format:
157
+ #
158
+ # `projects/{project}/locations/{location}/resourcePolicies/{resource_policy}`
159
+ #
160
+ # @param project [String]
161
+ # @param location [String]
162
+ # @param resource_policy [String]
163
+ #
164
+ # @return [::String]
165
+ def resource_policy_path **args
166
+ resources = {
167
+ "project:region:resource_policy" => (proc do |project:, region:, resource_policy:|
168
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
169
+ raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"
170
+
171
+ "projects/#{project}/regions/#{region}/resourcePolicies/#{resource_policy}"
172
+ end),
173
+ "location:project:resource_policy" => (proc do |project:, location:, resource_policy:|
174
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
175
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
176
+
177
+ "projects/#{project}/locations/#{location}/resourcePolicies/#{resource_policy}"
178
+ end)
179
+ }
180
+
181
+ resource = resources[args.keys.sort.join(":")]
182
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
183
+ resource.call(**args)
184
+ end
185
+
80
186
  ##
81
187
  # Create a fully-qualified ServiceAccount resource string.
82
188
  #