google-apis-vpcaccess_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,475 @@
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 VpcaccessV1
24
+
25
+ # Definition of a Serverless VPC Access connector.
26
+ class Connector
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Output only. List of projects using the connector.
30
+ # Corresponds to the JSON property `connectedProjects`
31
+ # @return [Array<String>]
32
+ attr_accessor :connected_projects
33
+
34
+ # The range of internal addresses that follows RFC 4632 notation. Example: `10.
35
+ # 132.0.0/28`.
36
+ # Corresponds to the JSON property `ipCidrRange`
37
+ # @return [String]
38
+ attr_accessor :ip_cidr_range
39
+
40
+ # Machine type of VM Instance underlying connector. Default is e2-micro
41
+ # Corresponds to the JSON property `machineType`
42
+ # @return [String]
43
+ attr_accessor :machine_type
44
+
45
+ # Maximum value of instances in autoscaling group underlying the connector.
46
+ # Corresponds to the JSON property `maxInstances`
47
+ # @return [Fixnum]
48
+ attr_accessor :max_instances
49
+
50
+ # Maximum throughput of the connector in Mbps. Default is 300, max is 1000.
51
+ # Corresponds to the JSON property `maxThroughput`
52
+ # @return [Fixnum]
53
+ attr_accessor :max_throughput
54
+
55
+ # Minimum value of instances in autoscaling group underlying the connector.
56
+ # Corresponds to the JSON property `minInstances`
57
+ # @return [Fixnum]
58
+ attr_accessor :min_instances
59
+
60
+ # Minimum throughput of the connector in Mbps. Default and min is 200.
61
+ # Corresponds to the JSON property `minThroughput`
62
+ # @return [Fixnum]
63
+ attr_accessor :min_throughput
64
+
65
+ # The resource name in the format `projects/*/locations/*/connectors/*`.
66
+ # Corresponds to the JSON property `name`
67
+ # @return [String]
68
+ attr_accessor :name
69
+
70
+ # Name of a VPC network.
71
+ # Corresponds to the JSON property `network`
72
+ # @return [String]
73
+ attr_accessor :network
74
+
75
+ # Output only. State of the VPC access connector.
76
+ # Corresponds to the JSON property `state`
77
+ # @return [String]
78
+ attr_accessor :state
79
+
80
+ # The subnet in which to house the connector
81
+ # Corresponds to the JSON property `subnet`
82
+ # @return [Google::Apis::VpcaccessV1::Subnet]
83
+ attr_accessor :subnet
84
+
85
+ def initialize(**args)
86
+ update!(**args)
87
+ end
88
+
89
+ # Update properties of this object
90
+ def update!(**args)
91
+ @connected_projects = args[:connected_projects] if args.key?(:connected_projects)
92
+ @ip_cidr_range = args[:ip_cidr_range] if args.key?(:ip_cidr_range)
93
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
94
+ @max_instances = args[:max_instances] if args.key?(:max_instances)
95
+ @max_throughput = args[:max_throughput] if args.key?(:max_throughput)
96
+ @min_instances = args[:min_instances] if args.key?(:min_instances)
97
+ @min_throughput = args[:min_throughput] if args.key?(:min_throughput)
98
+ @name = args[:name] if args.key?(:name)
99
+ @network = args[:network] if args.key?(:network)
100
+ @state = args[:state] if args.key?(:state)
101
+ @subnet = args[:subnet] if args.key?(:subnet)
102
+ end
103
+ end
104
+
105
+ # Response for listing Serverless VPC Access connectors.
106
+ class ListConnectorsResponse
107
+ include Google::Apis::Core::Hashable
108
+
109
+ # List of Serverless VPC Access connectors.
110
+ # Corresponds to the JSON property `connectors`
111
+ # @return [Array<Google::Apis::VpcaccessV1::Connector>]
112
+ attr_accessor :connectors
113
+
114
+ # Continuation token.
115
+ # Corresponds to the JSON property `nextPageToken`
116
+ # @return [String]
117
+ attr_accessor :next_page_token
118
+
119
+ def initialize(**args)
120
+ update!(**args)
121
+ end
122
+
123
+ # Update properties of this object
124
+ def update!(**args)
125
+ @connectors = args[:connectors] if args.key?(:connectors)
126
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
127
+ end
128
+ end
129
+
130
+ # The response message for Locations.ListLocations.
131
+ class ListLocationsResponse
132
+ include Google::Apis::Core::Hashable
133
+
134
+ # A list of locations that matches the specified filter in the request.
135
+ # Corresponds to the JSON property `locations`
136
+ # @return [Array<Google::Apis::VpcaccessV1::Location>]
137
+ attr_accessor :locations
138
+
139
+ # The standard List next-page token.
140
+ # Corresponds to the JSON property `nextPageToken`
141
+ # @return [String]
142
+ attr_accessor :next_page_token
143
+
144
+ def initialize(**args)
145
+ update!(**args)
146
+ end
147
+
148
+ # Update properties of this object
149
+ def update!(**args)
150
+ @locations = args[:locations] if args.key?(:locations)
151
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
152
+ end
153
+ end
154
+
155
+ # The response message for Operations.ListOperations.
156
+ class ListOperationsResponse
157
+ include Google::Apis::Core::Hashable
158
+
159
+ # The standard List next-page token.
160
+ # Corresponds to the JSON property `nextPageToken`
161
+ # @return [String]
162
+ attr_accessor :next_page_token
163
+
164
+ # A list of operations that matches the specified filter in the request.
165
+ # Corresponds to the JSON property `operations`
166
+ # @return [Array<Google::Apis::VpcaccessV1::Operation>]
167
+ attr_accessor :operations
168
+
169
+ def initialize(**args)
170
+ update!(**args)
171
+ end
172
+
173
+ # Update properties of this object
174
+ def update!(**args)
175
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
176
+ @operations = args[:operations] if args.key?(:operations)
177
+ end
178
+ end
179
+
180
+ # A resource that represents Google Cloud Platform location.
181
+ class Location
182
+ include Google::Apis::Core::Hashable
183
+
184
+ # The friendly name for this location, typically a nearby city name. For example,
185
+ # "Tokyo".
186
+ # Corresponds to the JSON property `displayName`
187
+ # @return [String]
188
+ attr_accessor :display_name
189
+
190
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
191
+ # region": "us-east1"`
192
+ # Corresponds to the JSON property `labels`
193
+ # @return [Hash<String,String>]
194
+ attr_accessor :labels
195
+
196
+ # The canonical id for this location. For example: `"us-east1"`.
197
+ # Corresponds to the JSON property `locationId`
198
+ # @return [String]
199
+ attr_accessor :location_id
200
+
201
+ # Service-specific metadata. For example the available capacity at the given
202
+ # location.
203
+ # Corresponds to the JSON property `metadata`
204
+ # @return [Hash<String,Object>]
205
+ attr_accessor :metadata
206
+
207
+ # Resource name for the location, which may vary between implementations. For
208
+ # example: `"projects/example-project/locations/us-east1"`
209
+ # Corresponds to the JSON property `name`
210
+ # @return [String]
211
+ attr_accessor :name
212
+
213
+ def initialize(**args)
214
+ update!(**args)
215
+ end
216
+
217
+ # Update properties of this object
218
+ def update!(**args)
219
+ @display_name = args[:display_name] if args.key?(:display_name)
220
+ @labels = args[:labels] if args.key?(:labels)
221
+ @location_id = args[:location_id] if args.key?(:location_id)
222
+ @metadata = args[:metadata] if args.key?(:metadata)
223
+ @name = args[:name] if args.key?(:name)
224
+ end
225
+ end
226
+
227
+ # This resource represents a long-running operation that is the result of a
228
+ # network API call.
229
+ class Operation
230
+ include Google::Apis::Core::Hashable
231
+
232
+ # If the value is `false`, it means the operation is still in progress. If `true`
233
+ # , the operation is completed, and either `error` or `response` is available.
234
+ # Corresponds to the JSON property `done`
235
+ # @return [Boolean]
236
+ attr_accessor :done
237
+ alias_method :done?, :done
238
+
239
+ # The `Status` type defines a logical error model that is suitable for different
240
+ # programming environments, including REST APIs and RPC APIs. It is used by [
241
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
242
+ # data: error code, error message, and error details. You can find out more
243
+ # about this error model and how to work with it in the [API Design Guide](https:
244
+ # //cloud.google.com/apis/design/errors).
245
+ # Corresponds to the JSON property `error`
246
+ # @return [Google::Apis::VpcaccessV1::Status]
247
+ attr_accessor :error
248
+
249
+ # Service-specific metadata associated with the operation. It typically contains
250
+ # progress information and common metadata such as create time. Some services
251
+ # might not provide such metadata. Any method that returns a long-running
252
+ # operation should document the metadata type, if any.
253
+ # Corresponds to the JSON property `metadata`
254
+ # @return [Hash<String,Object>]
255
+ attr_accessor :metadata
256
+
257
+ # The server-assigned name, which is only unique within the same service that
258
+ # originally returns it. If you use the default HTTP mapping, the `name` should
259
+ # be a resource name ending with `operations/`unique_id``.
260
+ # Corresponds to the JSON property `name`
261
+ # @return [String]
262
+ attr_accessor :name
263
+
264
+ # The normal response of the operation in case of success. If the original
265
+ # method returns no data on success, such as `Delete`, the response is `google.
266
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
267
+ # the response should be the resource. For other methods, the response should
268
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
269
+ # example, if the original method name is `TakeSnapshot()`, the inferred
270
+ # response type is `TakeSnapshotResponse`.
271
+ # Corresponds to the JSON property `response`
272
+ # @return [Hash<String,Object>]
273
+ attr_accessor :response
274
+
275
+ def initialize(**args)
276
+ update!(**args)
277
+ end
278
+
279
+ # Update properties of this object
280
+ def update!(**args)
281
+ @done = args[:done] if args.key?(:done)
282
+ @error = args[:error] if args.key?(:error)
283
+ @metadata = args[:metadata] if args.key?(:metadata)
284
+ @name = args[:name] if args.key?(:name)
285
+ @response = args[:response] if args.key?(:response)
286
+ end
287
+ end
288
+
289
+ # Metadata for google.longrunning.Operation.
290
+ class OperationMetadata
291
+ include Google::Apis::Core::Hashable
292
+
293
+ # Output only. Time when the operation was created.
294
+ # Corresponds to the JSON property `createTime`
295
+ # @return [String]
296
+ attr_accessor :create_time
297
+
298
+ # Output only. Time when the operation completed.
299
+ # Corresponds to the JSON property `endTime`
300
+ # @return [String]
301
+ attr_accessor :end_time
302
+
303
+ # Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.
304
+ # v1.Connectors.CreateConnector.
305
+ # Corresponds to the JSON property `method`
306
+ # @return [String]
307
+ attr_accessor :method_prop
308
+
309
+ # Output only. Name of the resource that this operation is acting on e.g.
310
+ # projects/my-project/locations/us-central1/connectors/v1.
311
+ # Corresponds to the JSON property `target`
312
+ # @return [String]
313
+ attr_accessor :target
314
+
315
+ def initialize(**args)
316
+ update!(**args)
317
+ end
318
+
319
+ # Update properties of this object
320
+ def update!(**args)
321
+ @create_time = args[:create_time] if args.key?(:create_time)
322
+ @end_time = args[:end_time] if args.key?(:end_time)
323
+ @method_prop = args[:method_prop] if args.key?(:method_prop)
324
+ @target = args[:target] if args.key?(:target)
325
+ end
326
+ end
327
+
328
+ # Metadata for google.longrunning.Operation.
329
+ class OperationMetadataV1Alpha1
330
+ include Google::Apis::Core::Hashable
331
+
332
+ # Output only. Time when the operation completed.
333
+ # Corresponds to the JSON property `endTime`
334
+ # @return [String]
335
+ attr_accessor :end_time
336
+
337
+ # Output only. Time when the operation was created.
338
+ # Corresponds to the JSON property `insertTime`
339
+ # @return [String]
340
+ attr_accessor :insert_time
341
+
342
+ # Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.
343
+ # v1alpha1.Connectors.CreateConnector.
344
+ # Corresponds to the JSON property `method`
345
+ # @return [String]
346
+ attr_accessor :method_prop
347
+
348
+ # Output only. Name of the resource that this operation is acting on e.g.
349
+ # projects/my-project/locations/us-central1/connectors/v1.
350
+ # Corresponds to the JSON property `target`
351
+ # @return [String]
352
+ attr_accessor :target
353
+
354
+ def initialize(**args)
355
+ update!(**args)
356
+ end
357
+
358
+ # Update properties of this object
359
+ def update!(**args)
360
+ @end_time = args[:end_time] if args.key?(:end_time)
361
+ @insert_time = args[:insert_time] if args.key?(:insert_time)
362
+ @method_prop = args[:method_prop] if args.key?(:method_prop)
363
+ @target = args[:target] if args.key?(:target)
364
+ end
365
+ end
366
+
367
+ # Metadata for google.longrunning.Operation.
368
+ class OperationMetadataV1Beta1
369
+ include Google::Apis::Core::Hashable
370
+
371
+ # Output only. Time when the operation was created.
372
+ # Corresponds to the JSON property `createTime`
373
+ # @return [String]
374
+ attr_accessor :create_time
375
+
376
+ # Output only. Time when the operation completed.
377
+ # Corresponds to the JSON property `endTime`
378
+ # @return [String]
379
+ attr_accessor :end_time
380
+
381
+ # Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.
382
+ # v1beta1.Connectors.CreateConnector.
383
+ # Corresponds to the JSON property `method`
384
+ # @return [String]
385
+ attr_accessor :method_prop
386
+
387
+ # Output only. Name of the resource that this operation is acting on e.g.
388
+ # projects/my-project/locations/us-central1/connectors/v1.
389
+ # Corresponds to the JSON property `target`
390
+ # @return [String]
391
+ attr_accessor :target
392
+
393
+ def initialize(**args)
394
+ update!(**args)
395
+ end
396
+
397
+ # Update properties of this object
398
+ def update!(**args)
399
+ @create_time = args[:create_time] if args.key?(:create_time)
400
+ @end_time = args[:end_time] if args.key?(:end_time)
401
+ @method_prop = args[:method_prop] if args.key?(:method_prop)
402
+ @target = args[:target] if args.key?(:target)
403
+ end
404
+ end
405
+
406
+ # The `Status` type defines a logical error model that is suitable for different
407
+ # programming environments, including REST APIs and RPC APIs. It is used by [
408
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
409
+ # data: error code, error message, and error details. You can find out more
410
+ # about this error model and how to work with it in the [API Design Guide](https:
411
+ # //cloud.google.com/apis/design/errors).
412
+ class Status
413
+ include Google::Apis::Core::Hashable
414
+
415
+ # The status code, which should be an enum value of google.rpc.Code.
416
+ # Corresponds to the JSON property `code`
417
+ # @return [Fixnum]
418
+ attr_accessor :code
419
+
420
+ # A list of messages that carry the error details. There is a common set of
421
+ # message types for APIs to use.
422
+ # Corresponds to the JSON property `details`
423
+ # @return [Array<Hash<String,Object>>]
424
+ attr_accessor :details
425
+
426
+ # A developer-facing error message, which should be in English. Any user-facing
427
+ # error message should be localized and sent in the google.rpc.Status.details
428
+ # field, or localized by the client.
429
+ # Corresponds to the JSON property `message`
430
+ # @return [String]
431
+ attr_accessor :message
432
+
433
+ def initialize(**args)
434
+ update!(**args)
435
+ end
436
+
437
+ # Update properties of this object
438
+ def update!(**args)
439
+ @code = args[:code] if args.key?(:code)
440
+ @details = args[:details] if args.key?(:details)
441
+ @message = args[:message] if args.key?(:message)
442
+ end
443
+ end
444
+
445
+ # The subnet in which to house the connector
446
+ class Subnet
447
+ include Google::Apis::Core::Hashable
448
+
449
+ # Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink
450
+ # is https://compute.googleapis.com/compute/v1/projects/`project`/regions/`
451
+ # region`/subnetworks/`subnetName` the correct input for this field would be `
452
+ # subnetName`
453
+ # Corresponds to the JSON property `name`
454
+ # @return [String]
455
+ attr_accessor :name
456
+
457
+ # Project in which the subnet exists. If not set, this project is assumed to be
458
+ # the project for which the connector create request was issued.
459
+ # Corresponds to the JSON property `projectId`
460
+ # @return [String]
461
+ attr_accessor :project_id
462
+
463
+ def initialize(**args)
464
+ update!(**args)
465
+ end
466
+
467
+ # Update properties of this object
468
+ def update!(**args)
469
+ @name = args[:name] if args.key?(:name)
470
+ @project_id = args[:project_id] if args.key?(:project_id)
471
+ end
472
+ end
473
+ end
474
+ end
475
+ 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 VpcaccessV1
18
+ # Version of the google-apis-vpcaccess_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.12.0"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20230105"
26
+ end
27
+ end
28
+ end