google-apis-tpu_v2alpha1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,989 @@
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 TpuV2alpha1
24
+
25
+ # A accelerator type that a Node can be configured with.
26
+ class AcceleratorType
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # The resource name.
30
+ # Corresponds to the JSON property `name`
31
+ # @return [String]
32
+ attr_accessor :name
33
+
34
+ # the accelerator type.
35
+ # Corresponds to the JSON property `type`
36
+ # @return [String]
37
+ attr_accessor :type
38
+
39
+ def initialize(**args)
40
+ update!(**args)
41
+ end
42
+
43
+ # Update properties of this object
44
+ def update!(**args)
45
+ @name = args[:name] if args.key?(:name)
46
+ @type = args[:type] if args.key?(:type)
47
+ end
48
+ end
49
+
50
+ # An access config attached to the TPU worker.
51
+ class AccessConfig
52
+ include Google::Apis::Core::Hashable
53
+
54
+ # Output only. An external IP address associated with the TPU worker.
55
+ # Corresponds to the JSON property `externalIp`
56
+ # @return [String]
57
+ attr_accessor :external_ip
58
+
59
+ def initialize(**args)
60
+ update!(**args)
61
+ end
62
+
63
+ # Update properties of this object
64
+ def update!(**args)
65
+ @external_ip = args[:external_ip] if args.key?(:external_ip)
66
+ end
67
+ end
68
+
69
+ # A node-attached disk resource. Next ID: 8;
70
+ class AttachedDisk
71
+ include Google::Apis::Core::Hashable
72
+
73
+ # The mode in which to attach this disk. If not specified, the default is
74
+ # READ_WRITE mode. Only applicable to data_disks.
75
+ # Corresponds to the JSON property `mode`
76
+ # @return [String]
77
+ attr_accessor :mode
78
+
79
+ # Specifies the full path to an existing disk. For example: "projects/my-project/
80
+ # zones/us-central1-c/disks/my-disk".
81
+ # Corresponds to the JSON property `sourceDisk`
82
+ # @return [String]
83
+ attr_accessor :source_disk
84
+
85
+ def initialize(**args)
86
+ update!(**args)
87
+ end
88
+
89
+ # Update properties of this object
90
+ def update!(**args)
91
+ @mode = args[:mode] if args.key?(:mode)
92
+ @source_disk = args[:source_disk] if args.key?(:source_disk)
93
+ end
94
+ end
95
+
96
+ # A generic empty message that you can re-use to avoid defining duplicated empty
97
+ # messages in your APIs. A typical example is to use it as the request or the
98
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
99
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
100
+ # `Empty` is empty JSON object ````.
101
+ class Empty
102
+ include Google::Apis::Core::Hashable
103
+
104
+ def initialize(**args)
105
+ update!(**args)
106
+ end
107
+
108
+ # Update properties of this object
109
+ def update!(**args)
110
+ end
111
+ end
112
+
113
+ # Request for GenerateServiceIdentity.
114
+ class GenerateServiceIdentityRequest
115
+ include Google::Apis::Core::Hashable
116
+
117
+ def initialize(**args)
118
+ update!(**args)
119
+ end
120
+
121
+ # Update properties of this object
122
+ def update!(**args)
123
+ end
124
+ end
125
+
126
+ # Response for GenerateServiceIdentity.
127
+ class GenerateServiceIdentityResponse
128
+ include Google::Apis::Core::Hashable
129
+
130
+ # The per-product per-project service identity for Cloud TPU service.
131
+ # Corresponds to the JSON property `identity`
132
+ # @return [Google::Apis::TpuV2alpha1::ServiceIdentity]
133
+ attr_accessor :identity
134
+
135
+ def initialize(**args)
136
+ update!(**args)
137
+ end
138
+
139
+ # Update properties of this object
140
+ def update!(**args)
141
+ @identity = args[:identity] if args.key?(:identity)
142
+ end
143
+ end
144
+
145
+ # Request for GetGuestAttributes.
146
+ class GetGuestAttributesRequest
147
+ include Google::Apis::Core::Hashable
148
+
149
+ # The guest attributes path to be queried.
150
+ # Corresponds to the JSON property `queryPath`
151
+ # @return [String]
152
+ attr_accessor :query_path
153
+
154
+ # The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
155
+ # returned.
156
+ # Corresponds to the JSON property `workerIds`
157
+ # @return [Array<String>]
158
+ attr_accessor :worker_ids
159
+
160
+ def initialize(**args)
161
+ update!(**args)
162
+ end
163
+
164
+ # Update properties of this object
165
+ def update!(**args)
166
+ @query_path = args[:query_path] if args.key?(:query_path)
167
+ @worker_ids = args[:worker_ids] if args.key?(:worker_ids)
168
+ end
169
+ end
170
+
171
+ # Response for GetGuestAttributes.
172
+ class GetGuestAttributesResponse
173
+ include Google::Apis::Core::Hashable
174
+
175
+ # The guest attributes for the TPU workers.
176
+ # Corresponds to the JSON property `guestAttributes`
177
+ # @return [Array<Google::Apis::TpuV2alpha1::GuestAttributes>]
178
+ attr_accessor :guest_attributes
179
+
180
+ def initialize(**args)
181
+ update!(**args)
182
+ end
183
+
184
+ # Update properties of this object
185
+ def update!(**args)
186
+ @guest_attributes = args[:guest_attributes] if args.key?(:guest_attributes)
187
+ end
188
+ end
189
+
190
+ # A guest attributes.
191
+ class GuestAttributes
192
+ include Google::Apis::Core::Hashable
193
+
194
+ # The path to be queried. This can be the default namespace ('/') or a nested
195
+ # namespace ('/\/') or a specified key ('/\/\')
196
+ # Corresponds to the JSON property `queryPath`
197
+ # @return [String]
198
+ attr_accessor :query_path
199
+
200
+ # Array of guest attribute namespace/key/value tuples.
201
+ # Corresponds to the JSON property `queryValue`
202
+ # @return [Google::Apis::TpuV2alpha1::GuestAttributesValue]
203
+ attr_accessor :query_value
204
+
205
+ def initialize(**args)
206
+ update!(**args)
207
+ end
208
+
209
+ # Update properties of this object
210
+ def update!(**args)
211
+ @query_path = args[:query_path] if args.key?(:query_path)
212
+ @query_value = args[:query_value] if args.key?(:query_value)
213
+ end
214
+ end
215
+
216
+ # A guest attributes namespace/key/value entry.
217
+ class GuestAttributesEntry
218
+ include Google::Apis::Core::Hashable
219
+
220
+ # Key for the guest attribute entry.
221
+ # Corresponds to the JSON property `key`
222
+ # @return [String]
223
+ attr_accessor :key
224
+
225
+ # Namespace for the guest attribute entry.
226
+ # Corresponds to the JSON property `namespace`
227
+ # @return [String]
228
+ attr_accessor :namespace
229
+
230
+ # Value for the guest attribute entry.
231
+ # Corresponds to the JSON property `value`
232
+ # @return [String]
233
+ attr_accessor :value
234
+
235
+ def initialize(**args)
236
+ update!(**args)
237
+ end
238
+
239
+ # Update properties of this object
240
+ def update!(**args)
241
+ @key = args[:key] if args.key?(:key)
242
+ @namespace = args[:namespace] if args.key?(:namespace)
243
+ @value = args[:value] if args.key?(:value)
244
+ end
245
+ end
246
+
247
+ # Array of guest attribute namespace/key/value tuples.
248
+ class GuestAttributesValue
249
+ include Google::Apis::Core::Hashable
250
+
251
+ # The list of guest attributes entries.
252
+ # Corresponds to the JSON property `items`
253
+ # @return [Array<Google::Apis::TpuV2alpha1::GuestAttributesEntry>]
254
+ attr_accessor :items
255
+
256
+ def initialize(**args)
257
+ update!(**args)
258
+ end
259
+
260
+ # Update properties of this object
261
+ def update!(**args)
262
+ @items = args[:items] if args.key?(:items)
263
+ end
264
+ end
265
+
266
+ # Response for ListAcceleratorTypes.
267
+ class ListAcceleratorTypesResponse
268
+ include Google::Apis::Core::Hashable
269
+
270
+ # The listed nodes.
271
+ # Corresponds to the JSON property `acceleratorTypes`
272
+ # @return [Array<Google::Apis::TpuV2alpha1::AcceleratorType>]
273
+ attr_accessor :accelerator_types
274
+
275
+ # The next page token or empty if none.
276
+ # Corresponds to the JSON property `nextPageToken`
277
+ # @return [String]
278
+ attr_accessor :next_page_token
279
+
280
+ # Locations that could not be reached.
281
+ # Corresponds to the JSON property `unreachable`
282
+ # @return [Array<String>]
283
+ attr_accessor :unreachable
284
+
285
+ def initialize(**args)
286
+ update!(**args)
287
+ end
288
+
289
+ # Update properties of this object
290
+ def update!(**args)
291
+ @accelerator_types = args[:accelerator_types] if args.key?(:accelerator_types)
292
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
293
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
294
+ end
295
+ end
296
+
297
+ # The response message for Locations.ListLocations.
298
+ class ListLocationsResponse
299
+ include Google::Apis::Core::Hashable
300
+
301
+ # A list of locations that matches the specified filter in the request.
302
+ # Corresponds to the JSON property `locations`
303
+ # @return [Array<Google::Apis::TpuV2alpha1::Location>]
304
+ attr_accessor :locations
305
+
306
+ # The standard List next-page token.
307
+ # Corresponds to the JSON property `nextPageToken`
308
+ # @return [String]
309
+ attr_accessor :next_page_token
310
+
311
+ def initialize(**args)
312
+ update!(**args)
313
+ end
314
+
315
+ # Update properties of this object
316
+ def update!(**args)
317
+ @locations = args[:locations] if args.key?(:locations)
318
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
319
+ end
320
+ end
321
+
322
+ # Response for ListNodes.
323
+ class ListNodesResponse
324
+ include Google::Apis::Core::Hashable
325
+
326
+ # The next page token or empty if none.
327
+ # Corresponds to the JSON property `nextPageToken`
328
+ # @return [String]
329
+ attr_accessor :next_page_token
330
+
331
+ # The listed nodes.
332
+ # Corresponds to the JSON property `nodes`
333
+ # @return [Array<Google::Apis::TpuV2alpha1::Node>]
334
+ attr_accessor :nodes
335
+
336
+ # Locations that could not be reached.
337
+ # Corresponds to the JSON property `unreachable`
338
+ # @return [Array<String>]
339
+ attr_accessor :unreachable
340
+
341
+ def initialize(**args)
342
+ update!(**args)
343
+ end
344
+
345
+ # Update properties of this object
346
+ def update!(**args)
347
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
348
+ @nodes = args[:nodes] if args.key?(:nodes)
349
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
350
+ end
351
+ end
352
+
353
+ # The response message for Operations.ListOperations.
354
+ class ListOperationsResponse
355
+ include Google::Apis::Core::Hashable
356
+
357
+ # The standard List next-page token.
358
+ # Corresponds to the JSON property `nextPageToken`
359
+ # @return [String]
360
+ attr_accessor :next_page_token
361
+
362
+ # A list of operations that matches the specified filter in the request.
363
+ # Corresponds to the JSON property `operations`
364
+ # @return [Array<Google::Apis::TpuV2alpha1::Operation>]
365
+ attr_accessor :operations
366
+
367
+ def initialize(**args)
368
+ update!(**args)
369
+ end
370
+
371
+ # Update properties of this object
372
+ def update!(**args)
373
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
374
+ @operations = args[:operations] if args.key?(:operations)
375
+ end
376
+ end
377
+
378
+ # Response for ListRuntimeVersions.
379
+ class ListRuntimeVersionsResponse
380
+ include Google::Apis::Core::Hashable
381
+
382
+ # The next page token or empty if none.
383
+ # Corresponds to the JSON property `nextPageToken`
384
+ # @return [String]
385
+ attr_accessor :next_page_token
386
+
387
+ # The listed nodes.
388
+ # Corresponds to the JSON property `runtimeVersions`
389
+ # @return [Array<Google::Apis::TpuV2alpha1::RuntimeVersion>]
390
+ attr_accessor :runtime_versions
391
+
392
+ # Locations that could not be reached.
393
+ # Corresponds to the JSON property `unreachable`
394
+ # @return [Array<String>]
395
+ attr_accessor :unreachable
396
+
397
+ def initialize(**args)
398
+ update!(**args)
399
+ end
400
+
401
+ # Update properties of this object
402
+ def update!(**args)
403
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
404
+ @runtime_versions = args[:runtime_versions] if args.key?(:runtime_versions)
405
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
406
+ end
407
+ end
408
+
409
+ # A resource that represents Google Cloud Platform location.
410
+ class Location
411
+ include Google::Apis::Core::Hashable
412
+
413
+ # The friendly name for this location, typically a nearby city name. For example,
414
+ # "Tokyo".
415
+ # Corresponds to the JSON property `displayName`
416
+ # @return [String]
417
+ attr_accessor :display_name
418
+
419
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
420
+ # region": "us-east1"`
421
+ # Corresponds to the JSON property `labels`
422
+ # @return [Hash<String,String>]
423
+ attr_accessor :labels
424
+
425
+ # The canonical id for this location. For example: `"us-east1"`.
426
+ # Corresponds to the JSON property `locationId`
427
+ # @return [String]
428
+ attr_accessor :location_id
429
+
430
+ # Service-specific metadata. For example the available capacity at the given
431
+ # location.
432
+ # Corresponds to the JSON property `metadata`
433
+ # @return [Hash<String,Object>]
434
+ attr_accessor :metadata
435
+
436
+ # Resource name for the location, which may vary between implementations. For
437
+ # example: `"projects/example-project/locations/us-east1"`
438
+ # Corresponds to the JSON property `name`
439
+ # @return [String]
440
+ attr_accessor :name
441
+
442
+ def initialize(**args)
443
+ update!(**args)
444
+ end
445
+
446
+ # Update properties of this object
447
+ def update!(**args)
448
+ @display_name = args[:display_name] if args.key?(:display_name)
449
+ @labels = args[:labels] if args.key?(:labels)
450
+ @location_id = args[:location_id] if args.key?(:location_id)
451
+ @metadata = args[:metadata] if args.key?(:metadata)
452
+ @name = args[:name] if args.key?(:name)
453
+ end
454
+ end
455
+
456
+ # Network related configurations.
457
+ class NetworkConfig
458
+ include Google::Apis::Core::Hashable
459
+
460
+ # Indicates that external IP addresses would be associated with the TPU workers.
461
+ # If set to false, the specified subnetwork or network should have Private
462
+ # Google Access enabled.
463
+ # Corresponds to the JSON property `enableExternalIps`
464
+ # @return [Boolean]
465
+ attr_accessor :enable_external_ips
466
+ alias_method :enable_external_ips?, :enable_external_ips
467
+
468
+ # The name of the network for the TPU node. It must be a preexisting Google
469
+ # Compute Engine network. If none is provided, "default" will be used.
470
+ # Corresponds to the JSON property `network`
471
+ # @return [String]
472
+ attr_accessor :network
473
+
474
+ # The name of the subnetwork for the TPU node. It must be a preexisting Google
475
+ # Compute Engine subnetwork. If none is provided, "default" will be used.
476
+ # Corresponds to the JSON property `subnetwork`
477
+ # @return [String]
478
+ attr_accessor :subnetwork
479
+
480
+ def initialize(**args)
481
+ update!(**args)
482
+ end
483
+
484
+ # Update properties of this object
485
+ def update!(**args)
486
+ @enable_external_ips = args[:enable_external_ips] if args.key?(:enable_external_ips)
487
+ @network = args[:network] if args.key?(:network)
488
+ @subnetwork = args[:subnetwork] if args.key?(:subnetwork)
489
+ end
490
+ end
491
+
492
+ # A network endpoint over which a TPU worker can be reached.
493
+ class NetworkEndpoint
494
+ include Google::Apis::Core::Hashable
495
+
496
+ # An access config attached to the TPU worker.
497
+ # Corresponds to the JSON property `accessConfig`
498
+ # @return [Google::Apis::TpuV2alpha1::AccessConfig]
499
+ attr_accessor :access_config
500
+
501
+ # The internal IP address of this network endpoint.
502
+ # Corresponds to the JSON property `ipAddress`
503
+ # @return [String]
504
+ attr_accessor :ip_address
505
+
506
+ # The port of this network endpoint.
507
+ # Corresponds to the JSON property `port`
508
+ # @return [Fixnum]
509
+ attr_accessor :port
510
+
511
+ def initialize(**args)
512
+ update!(**args)
513
+ end
514
+
515
+ # Update properties of this object
516
+ def update!(**args)
517
+ @access_config = args[:access_config] if args.key?(:access_config)
518
+ @ip_address = args[:ip_address] if args.key?(:ip_address)
519
+ @port = args[:port] if args.key?(:port)
520
+ end
521
+ end
522
+
523
+ # A TPU instance.
524
+ class Node
525
+ include Google::Apis::Core::Hashable
526
+
527
+ # Required. The type of hardware accelerators associated with this node.
528
+ # Corresponds to the JSON property `acceleratorType`
529
+ # @return [String]
530
+ attr_accessor :accelerator_type
531
+
532
+ # Output only. The API version that created this Node.
533
+ # Corresponds to the JSON property `apiVersion`
534
+ # @return [String]
535
+ attr_accessor :api_version
536
+
537
+ # The CIDR block that the TPU node will use when selecting an IP address. This
538
+ # CIDR block must be a /29 block; the Compute Engine networks API forbids a
539
+ # smaller block, and using a larger block would be wasteful (a node can only
540
+ # consume one IP address). Errors will occur if the CIDR block has already been
541
+ # used for a currently existing TPU node, the CIDR block conflicts with any
542
+ # subnetworks in the user's provided network, or the provided network is peered
543
+ # with another network that is using that CIDR block.
544
+ # Corresponds to the JSON property `cidrBlock`
545
+ # @return [String]
546
+ attr_accessor :cidr_block
547
+
548
+ # Output only. The time when the node was created.
549
+ # Corresponds to the JSON property `createTime`
550
+ # @return [String]
551
+ attr_accessor :create_time
552
+
553
+ # The additional data disks for the Node.
554
+ # Corresponds to the JSON property `dataDisks`
555
+ # @return [Array<Google::Apis::TpuV2alpha1::AttachedDisk>]
556
+ attr_accessor :data_disks
557
+
558
+ # The user-supplied description of the TPU. Maximum of 512 characters.
559
+ # Corresponds to the JSON property `description`
560
+ # @return [String]
561
+ attr_accessor :description
562
+
563
+ # The health status of the TPU node.
564
+ # Corresponds to the JSON property `health`
565
+ # @return [String]
566
+ attr_accessor :health
567
+
568
+ # Output only. If this field is populated, it contains a description of why the
569
+ # TPU Node is unhealthy.
570
+ # Corresponds to the JSON property `healthDescription`
571
+ # @return [String]
572
+ attr_accessor :health_description
573
+
574
+ # Output only. The unique identifier for the TPU Node.
575
+ # Corresponds to the JSON property `id`
576
+ # @return [Fixnum]
577
+ attr_accessor :id
578
+
579
+ # Resource labels to represent user-provided metadata.
580
+ # Corresponds to the JSON property `labels`
581
+ # @return [Hash<String,String>]
582
+ attr_accessor :labels
583
+
584
+ # Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-
585
+ # script
586
+ # Corresponds to the JSON property `metadata`
587
+ # @return [Hash<String,String>]
588
+ attr_accessor :metadata
589
+
590
+ # Output only. Immutable. The name of the TPU.
591
+ # Corresponds to the JSON property `name`
592
+ # @return [String]
593
+ attr_accessor :name
594
+
595
+ # Network related configurations.
596
+ # Corresponds to the JSON property `networkConfig`
597
+ # @return [Google::Apis::TpuV2alpha1::NetworkConfig]
598
+ attr_accessor :network_config
599
+
600
+ # Output only. The network endpoints where TPU workers can be accessed and sent
601
+ # work. It is recommended that runtime clients of the node reach out to the 0th
602
+ # entry in this map first.
603
+ # Corresponds to the JSON property `networkEndpoints`
604
+ # @return [Array<Google::Apis::TpuV2alpha1::NetworkEndpoint>]
605
+ attr_accessor :network_endpoints
606
+
607
+ # Required. The runtime version running in the Node.
608
+ # Corresponds to the JSON property `runtimeVersion`
609
+ # @return [String]
610
+ attr_accessor :runtime_version
611
+
612
+ # Sets the scheduling options for this node.
613
+ # Corresponds to the JSON property `schedulingConfig`
614
+ # @return [Google::Apis::TpuV2alpha1::SchedulingConfig]
615
+ attr_accessor :scheduling_config
616
+
617
+ # A service account.
618
+ # Corresponds to the JSON property `serviceAccount`
619
+ # @return [Google::Apis::TpuV2alpha1::ServiceAccount]
620
+ attr_accessor :service_account
621
+
622
+ # Output only. The current state for the TPU Node.
623
+ # Corresponds to the JSON property `state`
624
+ # @return [String]
625
+ attr_accessor :state
626
+
627
+ # Output only. The Symptoms that have occurred to the TPU Node.
628
+ # Corresponds to the JSON property `symptoms`
629
+ # @return [Array<Google::Apis::TpuV2alpha1::Symptom>]
630
+ attr_accessor :symptoms
631
+
632
+ # Tags to apply to the TPU Node. Tags are used to identify valid sources or
633
+ # targets for network firewalls.
634
+ # Corresponds to the JSON property `tags`
635
+ # @return [Array<String>]
636
+ attr_accessor :tags
637
+
638
+ def initialize(**args)
639
+ update!(**args)
640
+ end
641
+
642
+ # Update properties of this object
643
+ def update!(**args)
644
+ @accelerator_type = args[:accelerator_type] if args.key?(:accelerator_type)
645
+ @api_version = args[:api_version] if args.key?(:api_version)
646
+ @cidr_block = args[:cidr_block] if args.key?(:cidr_block)
647
+ @create_time = args[:create_time] if args.key?(:create_time)
648
+ @data_disks = args[:data_disks] if args.key?(:data_disks)
649
+ @description = args[:description] if args.key?(:description)
650
+ @health = args[:health] if args.key?(:health)
651
+ @health_description = args[:health_description] if args.key?(:health_description)
652
+ @id = args[:id] if args.key?(:id)
653
+ @labels = args[:labels] if args.key?(:labels)
654
+ @metadata = args[:metadata] if args.key?(:metadata)
655
+ @name = args[:name] if args.key?(:name)
656
+ @network_config = args[:network_config] if args.key?(:network_config)
657
+ @network_endpoints = args[:network_endpoints] if args.key?(:network_endpoints)
658
+ @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
659
+ @scheduling_config = args[:scheduling_config] if args.key?(:scheduling_config)
660
+ @service_account = args[:service_account] if args.key?(:service_account)
661
+ @state = args[:state] if args.key?(:state)
662
+ @symptoms = args[:symptoms] if args.key?(:symptoms)
663
+ @tags = args[:tags] if args.key?(:tags)
664
+ end
665
+ end
666
+
667
+ # This resource represents a long-running operation that is the result of a
668
+ # network API call.
669
+ class Operation
670
+ include Google::Apis::Core::Hashable
671
+
672
+ # If the value is `false`, it means the operation is still in progress. If `true`
673
+ # , the operation is completed, and either `error` or `response` is available.
674
+ # Corresponds to the JSON property `done`
675
+ # @return [Boolean]
676
+ attr_accessor :done
677
+ alias_method :done?, :done
678
+
679
+ # The `Status` type defines a logical error model that is suitable for different
680
+ # programming environments, including REST APIs and RPC APIs. It is used by [
681
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
682
+ # data: error code, error message, and error details. You can find out more
683
+ # about this error model and how to work with it in the [API Design Guide](https:
684
+ # //cloud.google.com/apis/design/errors).
685
+ # Corresponds to the JSON property `error`
686
+ # @return [Google::Apis::TpuV2alpha1::Status]
687
+ attr_accessor :error
688
+
689
+ # Service-specific metadata associated with the operation. It typically contains
690
+ # progress information and common metadata such as create time. Some services
691
+ # might not provide such metadata. Any method that returns a long-running
692
+ # operation should document the metadata type, if any.
693
+ # Corresponds to the JSON property `metadata`
694
+ # @return [Hash<String,Object>]
695
+ attr_accessor :metadata
696
+
697
+ # The server-assigned name, which is only unique within the same service that
698
+ # originally returns it. If you use the default HTTP mapping, the `name` should
699
+ # be a resource name ending with `operations/`unique_id``.
700
+ # Corresponds to the JSON property `name`
701
+ # @return [String]
702
+ attr_accessor :name
703
+
704
+ # The normal response of the operation in case of success. If the original
705
+ # method returns no data on success, such as `Delete`, the response is `google.
706
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
707
+ # the response should be the resource. For other methods, the response should
708
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
709
+ # example, if the original method name is `TakeSnapshot()`, the inferred
710
+ # response type is `TakeSnapshotResponse`.
711
+ # Corresponds to the JSON property `response`
712
+ # @return [Hash<String,Object>]
713
+ attr_accessor :response
714
+
715
+ def initialize(**args)
716
+ update!(**args)
717
+ end
718
+
719
+ # Update properties of this object
720
+ def update!(**args)
721
+ @done = args[:done] if args.key?(:done)
722
+ @error = args[:error] if args.key?(:error)
723
+ @metadata = args[:metadata] if args.key?(:metadata)
724
+ @name = args[:name] if args.key?(:name)
725
+ @response = args[:response] if args.key?(:response)
726
+ end
727
+ end
728
+
729
+ # Represents the metadata of the long-running operation.
730
+ class OperationMetadata
731
+ include Google::Apis::Core::Hashable
732
+
733
+ # Output only. API version used to start the operation.
734
+ # Corresponds to the JSON property `apiVersion`
735
+ # @return [String]
736
+ attr_accessor :api_version
737
+
738
+ # Output only. Identifies whether the user has requested cancellation of the
739
+ # operation. Operations that have been cancelled successfully have Operation.
740
+ # error value with a google.rpc.Status.code of 1, corresponding to `Code.
741
+ # CANCELLED`.
742
+ # Corresponds to the JSON property `cancelRequested`
743
+ # @return [Boolean]
744
+ attr_accessor :cancel_requested
745
+ alias_method :cancel_requested?, :cancel_requested
746
+
747
+ # Output only. The time the operation was created.
748
+ # Corresponds to the JSON property `createTime`
749
+ # @return [String]
750
+ attr_accessor :create_time
751
+
752
+ # Output only. The time the operation finished running.
753
+ # Corresponds to the JSON property `endTime`
754
+ # @return [String]
755
+ attr_accessor :end_time
756
+
757
+ # Output only. Human-readable status of the operation, if any.
758
+ # Corresponds to the JSON property `statusDetail`
759
+ # @return [String]
760
+ attr_accessor :status_detail
761
+
762
+ # Output only. Server-defined resource path for the target of the operation.
763
+ # Corresponds to the JSON property `target`
764
+ # @return [String]
765
+ attr_accessor :target
766
+
767
+ # Output only. Name of the verb executed by the operation.
768
+ # Corresponds to the JSON property `verb`
769
+ # @return [String]
770
+ attr_accessor :verb
771
+
772
+ def initialize(**args)
773
+ update!(**args)
774
+ end
775
+
776
+ # Update properties of this object
777
+ def update!(**args)
778
+ @api_version = args[:api_version] if args.key?(:api_version)
779
+ @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)
780
+ @create_time = args[:create_time] if args.key?(:create_time)
781
+ @end_time = args[:end_time] if args.key?(:end_time)
782
+ @status_detail = args[:status_detail] if args.key?(:status_detail)
783
+ @target = args[:target] if args.key?(:target)
784
+ @verb = args[:verb] if args.key?(:verb)
785
+ end
786
+ end
787
+
788
+ # A runtime version that a Node can be configured with.
789
+ class RuntimeVersion
790
+ include Google::Apis::Core::Hashable
791
+
792
+ # The resource name.
793
+ # Corresponds to the JSON property `name`
794
+ # @return [String]
795
+ attr_accessor :name
796
+
797
+ # The runtime version.
798
+ # Corresponds to the JSON property `version`
799
+ # @return [String]
800
+ attr_accessor :version
801
+
802
+ def initialize(**args)
803
+ update!(**args)
804
+ end
805
+
806
+ # Update properties of this object
807
+ def update!(**args)
808
+ @name = args[:name] if args.key?(:name)
809
+ @version = args[:version] if args.key?(:version)
810
+ end
811
+ end
812
+
813
+ # Sets the scheduling options for this node.
814
+ class SchedulingConfig
815
+ include Google::Apis::Core::Hashable
816
+
817
+ # Defines whether the node is preemptible.
818
+ # Corresponds to the JSON property `preemptible`
819
+ # @return [Boolean]
820
+ attr_accessor :preemptible
821
+ alias_method :preemptible?, :preemptible
822
+
823
+ # Whether the node is created under a reservation.
824
+ # Corresponds to the JSON property `reserved`
825
+ # @return [Boolean]
826
+ attr_accessor :reserved
827
+ alias_method :reserved?, :reserved
828
+
829
+ def initialize(**args)
830
+ update!(**args)
831
+ end
832
+
833
+ # Update properties of this object
834
+ def update!(**args)
835
+ @preemptible = args[:preemptible] if args.key?(:preemptible)
836
+ @reserved = args[:reserved] if args.key?(:reserved)
837
+ end
838
+ end
839
+
840
+ # A service account.
841
+ class ServiceAccount
842
+ include Google::Apis::Core::Hashable
843
+
844
+ # Email address of the service account. If empty, default Compute service
845
+ # account will be used.
846
+ # Corresponds to the JSON property `email`
847
+ # @return [String]
848
+ attr_accessor :email
849
+
850
+ # The list of scopes to be made available for this service account. If empty,
851
+ # access to all Cloud APIs will be allowed.
852
+ # Corresponds to the JSON property `scope`
853
+ # @return [Array<String>]
854
+ attr_accessor :scope
855
+
856
+ def initialize(**args)
857
+ update!(**args)
858
+ end
859
+
860
+ # Update properties of this object
861
+ def update!(**args)
862
+ @email = args[:email] if args.key?(:email)
863
+ @scope = args[:scope] if args.key?(:scope)
864
+ end
865
+ end
866
+
867
+ # The per-product per-project service identity for Cloud TPU service.
868
+ class ServiceIdentity
869
+ include Google::Apis::Core::Hashable
870
+
871
+ # The email address of the service identity.
872
+ # Corresponds to the JSON property `email`
873
+ # @return [String]
874
+ attr_accessor :email
875
+
876
+ def initialize(**args)
877
+ update!(**args)
878
+ end
879
+
880
+ # Update properties of this object
881
+ def update!(**args)
882
+ @email = args[:email] if args.key?(:email)
883
+ end
884
+ end
885
+
886
+ # Request for StartNode.
887
+ class StartNodeRequest
888
+ include Google::Apis::Core::Hashable
889
+
890
+ def initialize(**args)
891
+ update!(**args)
892
+ end
893
+
894
+ # Update properties of this object
895
+ def update!(**args)
896
+ end
897
+ end
898
+
899
+ # The `Status` type defines a logical error model that is suitable for different
900
+ # programming environments, including REST APIs and RPC APIs. It is used by [
901
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
902
+ # data: error code, error message, and error details. You can find out more
903
+ # about this error model and how to work with it in the [API Design Guide](https:
904
+ # //cloud.google.com/apis/design/errors).
905
+ class Status
906
+ include Google::Apis::Core::Hashable
907
+
908
+ # The status code, which should be an enum value of google.rpc.Code.
909
+ # Corresponds to the JSON property `code`
910
+ # @return [Fixnum]
911
+ attr_accessor :code
912
+
913
+ # A list of messages that carry the error details. There is a common set of
914
+ # message types for APIs to use.
915
+ # Corresponds to the JSON property `details`
916
+ # @return [Array<Hash<String,Object>>]
917
+ attr_accessor :details
918
+
919
+ # A developer-facing error message, which should be in English. Any user-facing
920
+ # error message should be localized and sent in the google.rpc.Status.details
921
+ # field, or localized by the client.
922
+ # Corresponds to the JSON property `message`
923
+ # @return [String]
924
+ attr_accessor :message
925
+
926
+ def initialize(**args)
927
+ update!(**args)
928
+ end
929
+
930
+ # Update properties of this object
931
+ def update!(**args)
932
+ @code = args[:code] if args.key?(:code)
933
+ @details = args[:details] if args.key?(:details)
934
+ @message = args[:message] if args.key?(:message)
935
+ end
936
+ end
937
+
938
+ # Request for StopNode.
939
+ class StopNodeRequest
940
+ include Google::Apis::Core::Hashable
941
+
942
+ def initialize(**args)
943
+ update!(**args)
944
+ end
945
+
946
+ # Update properties of this object
947
+ def update!(**args)
948
+ end
949
+ end
950
+
951
+ # A Symptom instance.
952
+ class Symptom
953
+ include Google::Apis::Core::Hashable
954
+
955
+ # Timestamp when the Symptom is created.
956
+ # Corresponds to the JSON property `createTime`
957
+ # @return [String]
958
+ attr_accessor :create_time
959
+
960
+ # Detailed information of the current Symptom.
961
+ # Corresponds to the JSON property `details`
962
+ # @return [String]
963
+ attr_accessor :details
964
+
965
+ # Type of the Symptom.
966
+ # Corresponds to the JSON property `symptomType`
967
+ # @return [String]
968
+ attr_accessor :symptom_type
969
+
970
+ # A string used to uniquely distinguish a worker within a TPU node.
971
+ # Corresponds to the JSON property `workerId`
972
+ # @return [String]
973
+ attr_accessor :worker_id
974
+
975
+ def initialize(**args)
976
+ update!(**args)
977
+ end
978
+
979
+ # Update properties of this object
980
+ def update!(**args)
981
+ @create_time = args[:create_time] if args.key?(:create_time)
982
+ @details = args[:details] if args.key?(:details)
983
+ @symptom_type = args[:symptom_type] if args.key?(:symptom_type)
984
+ @worker_id = args[:worker_id] if args.key?(:worker_id)
985
+ end
986
+ end
987
+ end
988
+ end
989
+ end