google-apis-parametermanager_v1 0.1.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.
@@ -0,0 +1,384 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module ParametermanagerV1
24
+
25
+ # A generic empty message that you can re-use to avoid defining duplicated empty
26
+ # messages in your APIs. A typical example is to use it as the request or the
27
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
28
+ # protobuf.Empty) returns (google.protobuf.Empty); `
29
+ class Empty
30
+ include Google::Apis::Core::Hashable
31
+
32
+ def initialize(**args)
33
+ update!(**args)
34
+ end
35
+
36
+ # Update properties of this object
37
+ def update!(**args)
38
+ end
39
+ end
40
+
41
+ # The response message for Locations.ListLocations.
42
+ class ListLocationsResponse
43
+ include Google::Apis::Core::Hashable
44
+
45
+ # A list of locations that matches the specified filter in the request.
46
+ # Corresponds to the JSON property `locations`
47
+ # @return [Array<Google::Apis::ParametermanagerV1::Location>]
48
+ attr_accessor :locations
49
+
50
+ # The standard List next-page token.
51
+ # Corresponds to the JSON property `nextPageToken`
52
+ # @return [String]
53
+ attr_accessor :next_page_token
54
+
55
+ def initialize(**args)
56
+ update!(**args)
57
+ end
58
+
59
+ # Update properties of this object
60
+ def update!(**args)
61
+ @locations = args[:locations] if args.key?(:locations)
62
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
63
+ end
64
+ end
65
+
66
+ # Message for response to listing ParameterVersions
67
+ class ListParameterVersionsResponse
68
+ include Google::Apis::Core::Hashable
69
+
70
+ # A token identifying a page of results the server should return.
71
+ # Corresponds to the JSON property `nextPageToken`
72
+ # @return [String]
73
+ attr_accessor :next_page_token
74
+
75
+ # The list of ParameterVersions
76
+ # Corresponds to the JSON property `parameterVersions`
77
+ # @return [Array<Google::Apis::ParametermanagerV1::ParameterVersion>]
78
+ attr_accessor :parameter_versions
79
+
80
+ # Unordered list. Locations that could not be reached.
81
+ # Corresponds to the JSON property `unreachable`
82
+ # @return [Array<String>]
83
+ attr_accessor :unreachable
84
+
85
+ def initialize(**args)
86
+ update!(**args)
87
+ end
88
+
89
+ # Update properties of this object
90
+ def update!(**args)
91
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
92
+ @parameter_versions = args[:parameter_versions] if args.key?(:parameter_versions)
93
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
94
+ end
95
+ end
96
+
97
+ # Message for response to listing Parameters
98
+ class ListParametersResponse
99
+ include Google::Apis::Core::Hashable
100
+
101
+ # A token identifying a page of results the server should return.
102
+ # Corresponds to the JSON property `nextPageToken`
103
+ # @return [String]
104
+ attr_accessor :next_page_token
105
+
106
+ # The list of Parameters
107
+ # Corresponds to the JSON property `parameters`
108
+ # @return [Array<Google::Apis::ParametermanagerV1::Parameter>]
109
+ attr_accessor :parameters
110
+
111
+ # Unordered list. Locations that could not be reached.
112
+ # Corresponds to the JSON property `unreachable`
113
+ # @return [Array<String>]
114
+ attr_accessor :unreachable
115
+
116
+ def initialize(**args)
117
+ update!(**args)
118
+ end
119
+
120
+ # Update properties of this object
121
+ def update!(**args)
122
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
123
+ @parameters = args[:parameters] if args.key?(:parameters)
124
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
125
+ end
126
+ end
127
+
128
+ # A resource that represents a Google Cloud location.
129
+ class Location
130
+ include Google::Apis::Core::Hashable
131
+
132
+ # The friendly name for this location, typically a nearby city name. For example,
133
+ # "Tokyo".
134
+ # Corresponds to the JSON property `displayName`
135
+ # @return [String]
136
+ attr_accessor :display_name
137
+
138
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
139
+ # region": "us-east1"`
140
+ # Corresponds to the JSON property `labels`
141
+ # @return [Hash<String,String>]
142
+ attr_accessor :labels
143
+
144
+ # The canonical id for this location. For example: `"us-east1"`.
145
+ # Corresponds to the JSON property `locationId`
146
+ # @return [String]
147
+ attr_accessor :location_id
148
+
149
+ # Service-specific metadata. For example the available capacity at the given
150
+ # location.
151
+ # Corresponds to the JSON property `metadata`
152
+ # @return [Hash<String,Object>]
153
+ attr_accessor :metadata
154
+
155
+ # Resource name for the location, which may vary between implementations. For
156
+ # example: `"projects/example-project/locations/us-east1"`
157
+ # Corresponds to the JSON property `name`
158
+ # @return [String]
159
+ attr_accessor :name
160
+
161
+ def initialize(**args)
162
+ update!(**args)
163
+ end
164
+
165
+ # Update properties of this object
166
+ def update!(**args)
167
+ @display_name = args[:display_name] if args.key?(:display_name)
168
+ @labels = args[:labels] if args.key?(:labels)
169
+ @location_id = args[:location_id] if args.key?(:location_id)
170
+ @metadata = args[:metadata] if args.key?(:metadata)
171
+ @name = args[:name] if args.key?(:name)
172
+ end
173
+ end
174
+
175
+ # Message describing Parameter resource
176
+ class Parameter
177
+ include Google::Apis::Core::Hashable
178
+
179
+ # Output only. [Output only] Create time stamp
180
+ # Corresponds to the JSON property `createTime`
181
+ # @return [String]
182
+ attr_accessor :create_time
183
+
184
+ # Optional. Specifies the format of a Parameter.
185
+ # Corresponds to the JSON property `format`
186
+ # @return [String]
187
+ attr_accessor :format
188
+
189
+ # Optional. Customer managed encryption key (CMEK) to use for encrypting the
190
+ # Parameter Versions. If not set, the default Google-managed encryption key will
191
+ # be used. Cloud KMS CryptoKeys must reside in the same location as the
192
+ # Parameter. The expected format is `projects/*/locations/*/keyRings/*/
193
+ # cryptoKeys/*`.
194
+ # Corresponds to the JSON property `kmsKey`
195
+ # @return [String]
196
+ attr_accessor :kms_key
197
+
198
+ # Optional. Labels as key value pairs
199
+ # Corresponds to the JSON property `labels`
200
+ # @return [Hash<String,String>]
201
+ attr_accessor :labels
202
+
203
+ # Identifier. [Output only] The resource name of the Parameter in the format `
204
+ # projects/*/locations/*/parameters/*`.
205
+ # Corresponds to the JSON property `name`
206
+ # @return [String]
207
+ attr_accessor :name
208
+
209
+ # Output-only policy member strings of a Google Cloud resource's built-in
210
+ # identity.
211
+ # Corresponds to the JSON property `policyMember`
212
+ # @return [Google::Apis::ParametermanagerV1::ResourcePolicyMember]
213
+ attr_accessor :policy_member
214
+
215
+ # Output only. [Output only] Update time stamp
216
+ # Corresponds to the JSON property `updateTime`
217
+ # @return [String]
218
+ attr_accessor :update_time
219
+
220
+ def initialize(**args)
221
+ update!(**args)
222
+ end
223
+
224
+ # Update properties of this object
225
+ def update!(**args)
226
+ @create_time = args[:create_time] if args.key?(:create_time)
227
+ @format = args[:format] if args.key?(:format)
228
+ @kms_key = args[:kms_key] if args.key?(:kms_key)
229
+ @labels = args[:labels] if args.key?(:labels)
230
+ @name = args[:name] if args.key?(:name)
231
+ @policy_member = args[:policy_member] if args.key?(:policy_member)
232
+ @update_time = args[:update_time] if args.key?(:update_time)
233
+ end
234
+ end
235
+
236
+ # Message describing ParameterVersion resource
237
+ class ParameterVersion
238
+ include Google::Apis::Core::Hashable
239
+
240
+ # Output only. [Output only] Create time stamp
241
+ # Corresponds to the JSON property `createTime`
242
+ # @return [String]
243
+ attr_accessor :create_time
244
+
245
+ # Optional. Disabled boolean to determine if a ParameterVersion acts as a
246
+ # metadata only resource (payload is never returned if disabled is true). If
247
+ # true any calls will always default to BASIC view even if the user explicitly
248
+ # passes FULL view as part of the request. A render call on a disabled resource
249
+ # fails with an error. Default value is False.
250
+ # Corresponds to the JSON property `disabled`
251
+ # @return [Boolean]
252
+ attr_accessor :disabled
253
+ alias_method :disabled?, :disabled
254
+
255
+ # Optional. Output only. [Output only] The resource name of the KMS key version
256
+ # used to encrypt the ParameterVersion payload. This field is populated only if
257
+ # the Parameter resource has customer managed encryption key (CMEK) configured.
258
+ # Corresponds to the JSON property `kmsKeyVersion`
259
+ # @return [String]
260
+ attr_accessor :kms_key_version
261
+
262
+ # Identifier. [Output only] The resource name of the ParameterVersion in the
263
+ # format `projects/*/locations/*/parameters/*/versions/*`.
264
+ # Corresponds to the JSON property `name`
265
+ # @return [String]
266
+ attr_accessor :name
267
+
268
+ # Message for storing a ParameterVersion resource's payload data
269
+ # Corresponds to the JSON property `payload`
270
+ # @return [Google::Apis::ParametermanagerV1::ParameterVersionPayload]
271
+ attr_accessor :payload
272
+
273
+ # Output only. [Output only] Update time stamp
274
+ # Corresponds to the JSON property `updateTime`
275
+ # @return [String]
276
+ attr_accessor :update_time
277
+
278
+ def initialize(**args)
279
+ update!(**args)
280
+ end
281
+
282
+ # Update properties of this object
283
+ def update!(**args)
284
+ @create_time = args[:create_time] if args.key?(:create_time)
285
+ @disabled = args[:disabled] if args.key?(:disabled)
286
+ @kms_key_version = args[:kms_key_version] if args.key?(:kms_key_version)
287
+ @name = args[:name] if args.key?(:name)
288
+ @payload = args[:payload] if args.key?(:payload)
289
+ @update_time = args[:update_time] if args.key?(:update_time)
290
+ end
291
+ end
292
+
293
+ # Message for storing a ParameterVersion resource's payload data
294
+ class ParameterVersionPayload
295
+ include Google::Apis::Core::Hashable
296
+
297
+ # Required. bytes data for storing payload.
298
+ # Corresponds to the JSON property `data`
299
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
300
+ # @return [String]
301
+ attr_accessor :data
302
+
303
+ def initialize(**args)
304
+ update!(**args)
305
+ end
306
+
307
+ # Update properties of this object
308
+ def update!(**args)
309
+ @data = args[:data] if args.key?(:data)
310
+ end
311
+ end
312
+
313
+ # Message describing RenderParameterVersionResponse resource
314
+ class RenderParameterVersionResponse
315
+ include Google::Apis::Core::Hashable
316
+
317
+ # Output only. Resource identifier of a ParameterVersion in the format `projects/
318
+ # */locations/*/parameters/*/versions/*`.
319
+ # Corresponds to the JSON property `parameterVersion`
320
+ # @return [String]
321
+ attr_accessor :parameter_version
322
+
323
+ # Message for storing a ParameterVersion resource's payload data
324
+ # Corresponds to the JSON property `payload`
325
+ # @return [Google::Apis::ParametermanagerV1::ParameterVersionPayload]
326
+ attr_accessor :payload
327
+
328
+ # Output only. Server generated rendered version of the user provided payload
329
+ # data (ParameterVersionPayload) which has substitutions of all (if any)
330
+ # references to a SecretManager SecretVersion resources. This substitution only
331
+ # works for a Parameter which is in JSON or YAML format.
332
+ # Corresponds to the JSON property `renderedPayload`
333
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
334
+ # @return [String]
335
+ attr_accessor :rendered_payload
336
+
337
+ def initialize(**args)
338
+ update!(**args)
339
+ end
340
+
341
+ # Update properties of this object
342
+ def update!(**args)
343
+ @parameter_version = args[:parameter_version] if args.key?(:parameter_version)
344
+ @payload = args[:payload] if args.key?(:payload)
345
+ @rendered_payload = args[:rendered_payload] if args.key?(:rendered_payload)
346
+ end
347
+ end
348
+
349
+ # Output-only policy member strings of a Google Cloud resource's built-in
350
+ # identity.
351
+ class ResourcePolicyMember
352
+ include Google::Apis::Core::Hashable
353
+
354
+ # Output only. IAM policy binding member referring to a Google Cloud resource by
355
+ # user-assigned name (https://google.aip.dev/122). If a resource is deleted and
356
+ # recreated with the same name, the binding will be applicable to the new
357
+ # resource. Example: `principal://parametermanager.googleapis.com/projects/12345/
358
+ # name/locations/us-central1-a/parameters/my-parameter`
359
+ # Corresponds to the JSON property `iamPolicyNamePrincipal`
360
+ # @return [String]
361
+ attr_accessor :iam_policy_name_principal
362
+
363
+ # Output only. IAM policy binding member referring to a Google Cloud resource by
364
+ # system-assigned unique identifier (https://google.aip.dev/148#uid). If a
365
+ # resource is deleted and recreated with the same name, the binding will not be
366
+ # applicable to the new resource Example: `principal://parametermanager.
367
+ # googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5`
368
+ # Corresponds to the JSON property `iamPolicyUidPrincipal`
369
+ # @return [String]
370
+ attr_accessor :iam_policy_uid_principal
371
+
372
+ def initialize(**args)
373
+ update!(**args)
374
+ end
375
+
376
+ # Update properties of this object
377
+ def update!(**args)
378
+ @iam_policy_name_principal = args[:iam_policy_name_principal] if args.key?(:iam_policy_name_principal)
379
+ @iam_policy_uid_principal = args[:iam_policy_uid_principal] if args.key?(:iam_policy_uid_principal)
380
+ end
381
+ end
382
+ end
383
+ end
384
+ end
@@ -0,0 +1,28 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Apis
17
+ module ParametermanagerV1
18
+ # Version of the google-apis-parametermanager_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.18.0"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20250630"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,184 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module ParametermanagerV1
24
+
25
+ class Empty
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class ListLocationsResponse
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class ListParameterVersionsResponse
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class ListParametersResponse
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class Location
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class Parameter
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class ParameterVersion
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class ParameterVersionPayload
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class RenderParameterVersionResponse
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class ResourcePolicyMember
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Empty
86
+ # @private
87
+ class Representation < Google::Apis::Core::JsonRepresentation
88
+ end
89
+ end
90
+
91
+ class ListLocationsResponse
92
+ # @private
93
+ class Representation < Google::Apis::Core::JsonRepresentation
94
+ collection :locations, as: 'locations', class: Google::Apis::ParametermanagerV1::Location, decorator: Google::Apis::ParametermanagerV1::Location::Representation
95
+
96
+ property :next_page_token, as: 'nextPageToken'
97
+ end
98
+ end
99
+
100
+ class ListParameterVersionsResponse
101
+ # @private
102
+ class Representation < Google::Apis::Core::JsonRepresentation
103
+ property :next_page_token, as: 'nextPageToken'
104
+ collection :parameter_versions, as: 'parameterVersions', class: Google::Apis::ParametermanagerV1::ParameterVersion, decorator: Google::Apis::ParametermanagerV1::ParameterVersion::Representation
105
+
106
+ collection :unreachable, as: 'unreachable'
107
+ end
108
+ end
109
+
110
+ class ListParametersResponse
111
+ # @private
112
+ class Representation < Google::Apis::Core::JsonRepresentation
113
+ property :next_page_token, as: 'nextPageToken'
114
+ collection :parameters, as: 'parameters', class: Google::Apis::ParametermanagerV1::Parameter, decorator: Google::Apis::ParametermanagerV1::Parameter::Representation
115
+
116
+ collection :unreachable, as: 'unreachable'
117
+ end
118
+ end
119
+
120
+ class Location
121
+ # @private
122
+ class Representation < Google::Apis::Core::JsonRepresentation
123
+ property :display_name, as: 'displayName'
124
+ hash :labels, as: 'labels'
125
+ property :location_id, as: 'locationId'
126
+ hash :metadata, as: 'metadata'
127
+ property :name, as: 'name'
128
+ end
129
+ end
130
+
131
+ class Parameter
132
+ # @private
133
+ class Representation < Google::Apis::Core::JsonRepresentation
134
+ property :create_time, as: 'createTime'
135
+ property :format, as: 'format'
136
+ property :kms_key, as: 'kmsKey'
137
+ hash :labels, as: 'labels'
138
+ property :name, as: 'name'
139
+ property :policy_member, as: 'policyMember', class: Google::Apis::ParametermanagerV1::ResourcePolicyMember, decorator: Google::Apis::ParametermanagerV1::ResourcePolicyMember::Representation
140
+
141
+ property :update_time, as: 'updateTime'
142
+ end
143
+ end
144
+
145
+ class ParameterVersion
146
+ # @private
147
+ class Representation < Google::Apis::Core::JsonRepresentation
148
+ property :create_time, as: 'createTime'
149
+ property :disabled, as: 'disabled'
150
+ property :kms_key_version, as: 'kmsKeyVersion'
151
+ property :name, as: 'name'
152
+ property :payload, as: 'payload', class: Google::Apis::ParametermanagerV1::ParameterVersionPayload, decorator: Google::Apis::ParametermanagerV1::ParameterVersionPayload::Representation
153
+
154
+ property :update_time, as: 'updateTime'
155
+ end
156
+ end
157
+
158
+ class ParameterVersionPayload
159
+ # @private
160
+ class Representation < Google::Apis::Core::JsonRepresentation
161
+ property :data, :base64 => true, as: 'data'
162
+ end
163
+ end
164
+
165
+ class RenderParameterVersionResponse
166
+ # @private
167
+ class Representation < Google::Apis::Core::JsonRepresentation
168
+ property :parameter_version, as: 'parameterVersion'
169
+ property :payload, as: 'payload', class: Google::Apis::ParametermanagerV1::ParameterVersionPayload, decorator: Google::Apis::ParametermanagerV1::ParameterVersionPayload::Representation
170
+
171
+ property :rendered_payload, :base64 => true, as: 'renderedPayload'
172
+ end
173
+ end
174
+
175
+ class ResourcePolicyMember
176
+ # @private
177
+ class Representation < Google::Apis::Core::JsonRepresentation
178
+ property :iam_policy_name_principal, as: 'iamPolicyNamePrincipal'
179
+ property :iam_policy_uid_principal, as: 'iamPolicyUidPrincipal'
180
+ end
181
+ end
182
+ end
183
+ end
184
+ end