google-cloud-secret_manager-v1beta2 0.a → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb +102 -0
  6. data/lib/google/cloud/secret_manager/v1beta2/rest.rb +38 -0
  7. data/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb +1958 -0
  8. data/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb +51 -0
  9. data/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb +167 -0
  10. data/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb +1835 -0
  11. data/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb +1075 -0
  12. data/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb +59 -0
  13. data/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb +61 -0
  14. data/lib/google/cloud/secret_manager/v1beta2/version.rb +7 -2
  15. data/lib/google/cloud/secret_manager/v1beta2.rb +45 -0
  16. data/lib/google/cloud/secretmanager/v1beta2/resources_pb.rb +64 -0
  17. data/lib/google/cloud/secretmanager/v1beta2/service_pb.rb +68 -0
  18. data/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb +125 -0
  19. data/lib/google-cloud-secret_manager-v1beta2.rb +21 -0
  20. data/proto_docs/README.md +4 -0
  21. data/proto_docs/google/api/client.rb +420 -0
  22. data/proto_docs/google/api/field_behavior.rb +85 -0
  23. data/proto_docs/google/api/launch_stage.rb +71 -0
  24. data/proto_docs/google/api/resource.rb +227 -0
  25. data/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb +499 -0
  26. data/proto_docs/google/cloud/secretmanager/v1beta2/service.rb +321 -0
  27. data/proto_docs/google/iam/v1/iam_policy.rb +87 -0
  28. data/proto_docs/google/iam/v1/options.rb +50 -0
  29. data/proto_docs/google/iam/v1/policy.rb +426 -0
  30. data/proto_docs/google/protobuf/any.rb +145 -0
  31. data/proto_docs/google/protobuf/duration.rb +98 -0
  32. data/proto_docs/google/protobuf/empty.rb +34 -0
  33. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  34. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  35. data/proto_docs/google/type/expr.rb +75 -0
  36. metadata +110 -10
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module SecretManager
24
+ module V1beta2
25
+ module SecretManagerService
26
+ # Credentials for the SecretManagerService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "SECRET_MANAGER_CREDENTIALS",
33
+ "SECRET_MANAGER_KEYFILE",
34
+ "GOOGLE_CLOUD_CREDENTIALS",
35
+ "GOOGLE_CLOUD_KEYFILE",
36
+ "GCLOUD_KEYFILE",
37
+ "SECRET_MANAGER_CREDENTIALS_JSON",
38
+ "SECRET_MANAGER_KEYFILE_JSON",
39
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
40
+ "GOOGLE_CLOUD_KEYFILE_JSON",
41
+ "GCLOUD_KEYFILE_JSON"
42
+ ]
43
+ self.paths = [
44
+ "~/.config/google_cloud/application_default_credentials.json"
45
+ ]
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,167 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module SecretManager
23
+ module V1beta2
24
+ module SecretManagerService
25
+ # Path helper methods for the SecretManagerService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Location resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ #
37
+ # @return [::String]
38
+ def location_path project:, location:
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
+
41
+ "projects/#{project}/locations/#{location}"
42
+ end
43
+
44
+ ##
45
+ # Create a fully-qualified Project resource string.
46
+ #
47
+ # The resource will be in the following format:
48
+ #
49
+ # `projects/{project}`
50
+ #
51
+ # @param project [String]
52
+ #
53
+ # @return [::String]
54
+ def project_path project:
55
+ "projects/#{project}"
56
+ end
57
+
58
+ ##
59
+ # Create a fully-qualified Secret resource string.
60
+ #
61
+ # @overload secret_path(project:, secret:)
62
+ # The resource will be in the following format:
63
+ #
64
+ # `projects/{project}/secrets/{secret}`
65
+ #
66
+ # @param project [String]
67
+ # @param secret [String]
68
+ #
69
+ # @overload secret_path(project:, location:, secret:)
70
+ # The resource will be in the following format:
71
+ #
72
+ # `projects/{project}/locations/{location}/secrets/{secret}`
73
+ #
74
+ # @param project [String]
75
+ # @param location [String]
76
+ # @param secret [String]
77
+ #
78
+ # @return [::String]
79
+ def secret_path **args
80
+ resources = {
81
+ "project:secret" => (proc do |project:, secret:|
82
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
83
+
84
+ "projects/#{project}/secrets/#{secret}"
85
+ end),
86
+ "location:project:secret" => (proc do |project:, location:, secret:|
87
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
88
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
89
+
90
+ "projects/#{project}/locations/#{location}/secrets/#{secret}"
91
+ end)
92
+ }
93
+
94
+ resource = resources[args.keys.sort.join(":")]
95
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
96
+ resource.call(**args)
97
+ end
98
+
99
+ ##
100
+ # Create a fully-qualified SecretVersion resource string.
101
+ #
102
+ # @overload secret_version_path(project:, secret:, secret_version:)
103
+ # The resource will be in the following format:
104
+ #
105
+ # `projects/{project}/secrets/{secret}/versions/{secret_version}`
106
+ #
107
+ # @param project [String]
108
+ # @param secret [String]
109
+ # @param secret_version [String]
110
+ #
111
+ # @overload secret_version_path(project:, location:, secret:, secret_version:)
112
+ # The resource will be in the following format:
113
+ #
114
+ # `projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}`
115
+ #
116
+ # @param project [String]
117
+ # @param location [String]
118
+ # @param secret [String]
119
+ # @param secret_version [String]
120
+ #
121
+ # @return [::String]
122
+ def secret_version_path **args
123
+ resources = {
124
+ "project:secret:secret_version" => (proc do |project:, secret:, secret_version:|
125
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
126
+ raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
127
+
128
+ "projects/#{project}/secrets/#{secret}/versions/#{secret_version}"
129
+ end),
130
+ "location:project:secret:secret_version" => (proc do |project:, location:, secret:, secret_version:|
131
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
132
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
133
+ raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
134
+
135
+ "projects/#{project}/locations/#{location}/secrets/#{secret}/versions/#{secret_version}"
136
+ end)
137
+ }
138
+
139
+ resource = resources[args.keys.sort.join(":")]
140
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
141
+ resource.call(**args)
142
+ end
143
+
144
+ ##
145
+ # Create a fully-qualified Topic resource string.
146
+ #
147
+ # The resource will be in the following format:
148
+ #
149
+ # `projects/{project}/topics/{topic}`
150
+ #
151
+ # @param project [String]
152
+ # @param topic [String]
153
+ #
154
+ # @return [::String]
155
+ def topic_path project:, topic:
156
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
157
+
158
+ "projects/#{project}/topics/#{topic}"
159
+ end
160
+
161
+ extend self
162
+ end
163
+ end
164
+ end
165
+ end
166
+ end
167
+ end