google-cloud-secret_manager-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,224 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 V1
24
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#list_secrets SecretManagerService.ListSecrets}.
25
+ # @!attribute [rw] parent
26
+ # @return [String]
27
+ # Required. The resource name of the project associated with the
28
+ # {Google::Cloud::SecretManager::V1::Secret Secrets}, in the format `projects/*`.
29
+ # @!attribute [rw] page_size
30
+ # @return [Integer]
31
+ # Optional. The maximum number of results to be returned in a single page. If
32
+ # set to 0, the server decides the number of results to return. If the
33
+ # number is greater than 25000, it is capped at 25000.
34
+ # @!attribute [rw] page_token
35
+ # @return [String]
36
+ # Optional. Pagination token, returned earlier via
37
+ # {Google::Cloud::SecretManager::V1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}.
38
+ class ListSecretsRequest
39
+ include Google::Protobuf::MessageExts
40
+ extend Google::Protobuf::MessageExts::ClassMethods
41
+ end
42
+
43
+ # Response message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#list_secrets SecretManagerService.ListSecrets}.
44
+ # @!attribute [rw] secrets
45
+ # @return [Array<Google::Cloud::SecretManager::V1::Secret>]
46
+ # The list of {Google::Cloud::SecretManager::V1::Secret Secrets} sorted in reverse by create_time (newest
47
+ # first).
48
+ # @!attribute [rw] next_page_token
49
+ # @return [String]
50
+ # A token to retrieve the next page of results. Pass this value in
51
+ # {Google::Cloud::SecretManager::V1::ListSecretsRequest#page_token ListSecretsRequest.page_token} to retrieve the next page.
52
+ # @!attribute [rw] total_size
53
+ # @return [Integer]
54
+ # The total number of {Google::Cloud::SecretManager::V1::Secret Secrets}.
55
+ class ListSecretsResponse
56
+ include Google::Protobuf::MessageExts
57
+ extend Google::Protobuf::MessageExts::ClassMethods
58
+ end
59
+
60
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#create_secret SecretManagerService.CreateSecret}.
61
+ # @!attribute [rw] parent
62
+ # @return [String]
63
+ # Required. The resource name of the project to associate with the
64
+ # {Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*`.
65
+ # @!attribute [rw] secret_id
66
+ # @return [String]
67
+ # Required. This must be unique within the project.
68
+ # @!attribute [rw] secret
69
+ # @return [Google::Cloud::SecretManager::V1::Secret]
70
+ # Required. A {Google::Cloud::SecretManager::V1::Secret Secret} with initial field values.
71
+ class CreateSecretRequest
72
+ include Google::Protobuf::MessageExts
73
+ extend Google::Protobuf::MessageExts::ClassMethods
74
+ end
75
+
76
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion}.
77
+ # @!attribute [rw] parent
78
+ # @return [String]
79
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1::Secret Secret} to associate with the
80
+ # {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format `projects/*/secrets/*`.
81
+ # @!attribute [rw] payload
82
+ # @return [Google::Cloud::SecretManager::V1::SecretPayload]
83
+ # Required. The secret payload of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
84
+ class AddSecretVersionRequest
85
+ include Google::Protobuf::MessageExts
86
+ extend Google::Protobuf::MessageExts::ClassMethods
87
+ end
88
+
89
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#get_secret SecretManagerService.GetSecret}.
90
+ # @!attribute [rw] name
91
+ # @return [String]
92
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*/secrets/*`.
93
+ class GetSecretRequest
94
+ include Google::Protobuf::MessageExts
95
+ extend Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+
98
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#list_secret_versions SecretManagerService.ListSecretVersions}.
99
+ # @!attribute [rw] parent
100
+ # @return [String]
101
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1::Secret Secret} associated with the
102
+ # {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} to list, in the format
103
+ # `projects/*/secrets/*`.
104
+ # @!attribute [rw] page_size
105
+ # @return [Integer]
106
+ # Optional. The maximum number of results to be returned in a single page. If
107
+ # set to 0, the server decides the number of results to return. If the
108
+ # number is greater than 25000, it is capped at 25000.
109
+ # @!attribute [rw] page_token
110
+ # @return [String]
111
+ # Optional. Pagination token, returned earlier via
112
+ # ListSecretVersionsResponse.next_page_token][].
113
+ class ListSecretVersionsRequest
114
+ include Google::Protobuf::MessageExts
115
+ extend Google::Protobuf::MessageExts::ClassMethods
116
+ end
117
+
118
+ # Response message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#list_secret_versions SecretManagerService.ListSecretVersions}.
119
+ # @!attribute [rw] versions
120
+ # @return [Array<Google::Cloud::SecretManager::V1::SecretVersion>]
121
+ # The list of {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} sorted in reverse by
122
+ # create_time (newest first).
123
+ # @!attribute [rw] next_page_token
124
+ # @return [String]
125
+ # A token to retrieve the next page of results. Pass this value in
126
+ # {Google::Cloud::SecretManager::V1::ListSecretVersionsRequest#page_token ListSecretVersionsRequest.page_token} to retrieve the next page.
127
+ # @!attribute [rw] total_size
128
+ # @return [Integer]
129
+ # The total number of {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}.
130
+ class ListSecretVersionsResponse
131
+ include Google::Protobuf::MessageExts
132
+ extend Google::Protobuf::MessageExts::ClassMethods
133
+ end
134
+
135
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#get_secret_version SecretManagerService.GetSecretVersion}.
136
+ # @!attribute [rw] name
137
+ # @return [String]
138
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
139
+ # `projects/*/secrets/*/versions/*`.
140
+ # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
141
+ # {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
142
+ class GetSecretVersionRequest
143
+ include Google::Protobuf::MessageExts
144
+ extend Google::Protobuf::MessageExts::ClassMethods
145
+ end
146
+
147
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#update_secret SecretManagerService.UpdateSecret}.
148
+ # @!attribute [rw] secret
149
+ # @return [Google::Cloud::SecretManager::V1::Secret]
150
+ # Required. {Google::Cloud::SecretManager::V1::Secret Secret} with updated field values.
151
+ # @!attribute [rw] update_mask
152
+ # @return [Google::Protobuf::FieldMask]
153
+ # Required. Specifies the fields to be updated.
154
+ class UpdateSecretRequest
155
+ include Google::Protobuf::MessageExts
156
+ extend Google::Protobuf::MessageExts::ClassMethods
157
+ end
158
+
159
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion}.
160
+ # @!attribute [rw] name
161
+ # @return [String]
162
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
163
+ # `projects/*/secrets/*/versions/*`.
164
+ class AccessSecretVersionRequest
165
+ include Google::Protobuf::MessageExts
166
+ extend Google::Protobuf::MessageExts::ClassMethods
167
+ end
168
+
169
+ # Response message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion}.
170
+ # @!attribute [rw] name
171
+ # @return [String]
172
+ # The resource name of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
173
+ # `projects/*/secrets/*/versions/*`.
174
+ # @!attribute [rw] payload
175
+ # @return [Google::Cloud::SecretManager::V1::SecretPayload]
176
+ # Secret payload
177
+ class AccessSecretVersionResponse
178
+ include Google::Protobuf::MessageExts
179
+ extend Google::Protobuf::MessageExts::ClassMethods
180
+ end
181
+
182
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#delete_secret SecretManagerService.DeleteSecret}.
183
+ # @!attribute [rw] name
184
+ # @return [String]
185
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1::Secret Secret} to delete in the format
186
+ # `projects/*/secrets/*`.
187
+ class DeleteSecretRequest
188
+ include Google::Protobuf::MessageExts
189
+ extend Google::Protobuf::MessageExts::ClassMethods
190
+ end
191
+
192
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#disable_secret_version SecretManagerService.DisableSecretVersion}.
193
+ # @!attribute [rw] name
194
+ # @return [String]
195
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to disable in the format
196
+ # `projects/*/secrets/*/versions/*`.
197
+ class DisableSecretVersionRequest
198
+ include Google::Protobuf::MessageExts
199
+ extend Google::Protobuf::MessageExts::ClassMethods
200
+ end
201
+
202
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#enable_secret_version SecretManagerService.EnableSecretVersion}.
203
+ # @!attribute [rw] name
204
+ # @return [String]
205
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to enable in the format
206
+ # `projects/*/secrets/*/versions/*`.
207
+ class EnableSecretVersionRequest
208
+ include Google::Protobuf::MessageExts
209
+ extend Google::Protobuf::MessageExts::ClassMethods
210
+ end
211
+
212
+ # Request message for {Google::Cloud::SecretManager::V1::SecretManagerService::Client#destroy_secret_version SecretManagerService.DestroySecretVersion}.
213
+ # @!attribute [rw] name
214
+ # @return [String]
215
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to destroy in the format
216
+ # `projects/*/secrets/*/versions/*`.
217
+ class DestroySecretVersionRequest
218
+ include Google::Protobuf::MessageExts
219
+ extend Google::Protobuf::MessageExts::ClassMethods
220
+ end
221
+ end
222
+ end
223
+ end
224
+ end
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 Iam
22
+ module V1
23
+ # Request message for `SetIamPolicy` method.
24
+ # @!attribute [rw] resource
25
+ # @return [String]
26
+ # REQUIRED: The resource for which the policy is being specified.
27
+ # `resource` is usually specified as a path. For example, a Project
28
+ # resource is specified as `projects/{project}`.
29
+ # @!attribute [rw] policy
30
+ # @return [Google::Iam::V1::Policy]
31
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
32
+ # the policy is limited to a few 10s of KB. An empty policy is a
33
+ # valid policy but certain Cloud Platform services (such as Projects)
34
+ # might reject them.
35
+ class SetIamPolicyRequest
36
+ include Google::Protobuf::MessageExts
37
+ extend Google::Protobuf::MessageExts::ClassMethods
38
+ end
39
+
40
+ # Request message for `GetIamPolicy` method.
41
+ # @!attribute [rw] resource
42
+ # @return [String]
43
+ # REQUIRED: The resource for which the policy is being requested.
44
+ # `resource` is usually specified as a path. For example, a Project
45
+ # resource is specified as `projects/{project}`.
46
+ class GetIamPolicyRequest
47
+ include Google::Protobuf::MessageExts
48
+ extend Google::Protobuf::MessageExts::ClassMethods
49
+ end
50
+
51
+ # Request message for `TestIamPermissions` method.
52
+ # @!attribute [rw] resource
53
+ # @return [String]
54
+ # REQUIRED: The resource for which the policy detail is being requested.
55
+ # `resource` is usually specified as a path. For example, a Project
56
+ # resource is specified as `projects/{project}`.
57
+ # @!attribute [rw] permissions
58
+ # @return [Array<String>]
59
+ # The set of permissions to check for the `resource`. Permissions with
60
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
61
+ # information see
62
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
63
+ class TestIamPermissionsRequest
64
+ include Google::Protobuf::MessageExts
65
+ extend Google::Protobuf::MessageExts::ClassMethods
66
+ end
67
+
68
+ # Response message for `TestIamPermissions` method.
69
+ # @!attribute [rw] permissions
70
+ # @return [Array<String>]
71
+ # A subset of `TestPermissionsRequest.permissions` that the caller is
72
+ # allowed.
73
+ class TestIamPermissionsResponse
74
+ include Google::Protobuf::MessageExts
75
+ extend Google::Protobuf::MessageExts::ClassMethods
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,156 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 Iam
22
+ module V1
23
+ # Defines an Identity and Access Management (IAM) policy. It is used to
24
+ # specify access control policies for Cloud Platform resources.
25
+ #
26
+ #
27
+ # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
28
+ # `members` to a `role`, where the members can be user accounts, Google groups,
29
+ # Google domains, and service accounts. A `role` is a named list of permissions
30
+ # defined by IAM.
31
+ #
32
+ # **Example**
33
+ #
34
+ # {
35
+ # "bindings": [
36
+ # {
37
+ # "role": "roles/owner",
38
+ # "members": [
39
+ # "user:mike@example.com",
40
+ # "group:admins@example.com",
41
+ # "domain:google.com",
42
+ # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
43
+ # ]
44
+ # },
45
+ # {
46
+ # "role": "roles/viewer",
47
+ # "members": ["user:sean@example.com"]
48
+ # }
49
+ # ]
50
+ # }
51
+ #
52
+ # For a description of IAM and its features, see the
53
+ # [IAM developer's guide](https://cloud.google.com/iam).
54
+ # @!attribute [rw] version
55
+ # @return [Integer]
56
+ # Version of the `Policy`. The default version is 0.
57
+ # @!attribute [rw] bindings
58
+ # @return [Array<Google::Iam::V1::Binding>]
59
+ # Associates a list of `members` to a `role`.
60
+ # Multiple `bindings` must not be specified for the same `role`.
61
+ # `bindings` with no members will result in an error.
62
+ # @!attribute [rw] etag
63
+ # @return [String]
64
+ # `etag` is used for optimistic concurrency control as a way to help
65
+ # prevent simultaneous updates of a policy from overwriting each other.
66
+ # It is strongly suggested that systems make use of the `etag` in the
67
+ # read-modify-write cycle to perform policy updates in order to avoid race
68
+ # conditions: An `etag` is returned in the response to `getIamPolicy`, and
69
+ # systems are expected to put that etag in the request to `setIamPolicy` to
70
+ # ensure that their change will be applied to the same version of the policy.
71
+ #
72
+ # If no `etag` is provided in the call to `setIamPolicy`, then the existing
73
+ # policy is overwritten blindly.
74
+ class Policy
75
+ include Google::Protobuf::MessageExts
76
+ extend Google::Protobuf::MessageExts::ClassMethods
77
+ end
78
+
79
+ # Associates `members` with a `role`.
80
+ # @!attribute [rw] role
81
+ # @return [String]
82
+ # Role that is assigned to `members`.
83
+ # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
84
+ # Required
85
+ # @!attribute [rw] members
86
+ # @return [Array<String>]
87
+ # Specifies the identities requesting access for a Cloud Platform resource.
88
+ # `members` can have the following values:
89
+ #
90
+ # * `allUsers`: A special identifier that represents anyone who is
91
+ # on the internet; with or without a Google account.
92
+ #
93
+ # * `allAuthenticatedUsers`: A special identifier that represents anyone
94
+ # who is authenticated with a Google account or a service account.
95
+ #
96
+ # * `user:{emailid}`: An email address that represents a specific Google
97
+ # account. For example, `alice@gmail.com` or `joe@example.com`.
98
+ #
99
+ #
100
+ # * `serviceAccount:{emailid}`: An email address that represents a service
101
+ # account. For example, `my-other-app@appspot.gserviceaccount.com`.
102
+ #
103
+ # * `group:{emailid}`: An email address that represents a Google group.
104
+ # For example, `admins@example.com`.
105
+ #
106
+ # * `domain:{domain}`: A Google Apps domain name that represents all the
107
+ # users of that domain. For example, `google.com` or `example.com`.
108
+ class Binding
109
+ include Google::Protobuf::MessageExts
110
+ extend Google::Protobuf::MessageExts::ClassMethods
111
+ end
112
+
113
+ # The difference delta between two policies.
114
+ # @!attribute [rw] binding_deltas
115
+ # @return [Array<Google::Iam::V1::BindingDelta>]
116
+ # The delta for Bindings between two policies.
117
+ class PolicyDelta
118
+ include Google::Protobuf::MessageExts
119
+ extend Google::Protobuf::MessageExts::ClassMethods
120
+ end
121
+
122
+ # One delta entry for Binding. Each individual change (only one member in each
123
+ # entry) to a binding will be a separate entry.
124
+ # @!attribute [rw] action
125
+ # @return [Google::Iam::V1::BindingDelta::Action]
126
+ # The action that was performed on a Binding.
127
+ # Required
128
+ # @!attribute [rw] role
129
+ # @return [String]
130
+ # Role that is assigned to `members`.
131
+ # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
132
+ # Required
133
+ # @!attribute [rw] member
134
+ # @return [String]
135
+ # A single identity requesting access for a Cloud Platform resource.
136
+ # Follows the same format of Binding.members.
137
+ # Required
138
+ class BindingDelta
139
+ include Google::Protobuf::MessageExts
140
+ extend Google::Protobuf::MessageExts::ClassMethods
141
+
142
+ # The type of action performed on a Binding in a policy.
143
+ module Action
144
+ # Unspecified.
145
+ ACTION_UNSPECIFIED = 0
146
+
147
+ # Addition of a Binding.
148
+ ADD = 1
149
+
150
+ # Removal of a Binding.
151
+ REMOVE = 2
152
+ end
153
+ end
154
+ end
155
+ end
156
+ end