google-apis-managedkafka_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,715 @@
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 ManagedkafkaV1
24
+
25
+ # The configuration of access to the Kafka cluster.
26
+ class AccessConfig
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Required. Virtual Private Cloud (VPC) networks that must be granted direct
30
+ # access to the Kafka cluster. Minimum of 1 network is required. Maximum 10
31
+ # networks can be specified.
32
+ # Corresponds to the JSON property `networkConfigs`
33
+ # @return [Array<Google::Apis::ManagedkafkaV1::NetworkConfig>]
34
+ attr_accessor :network_configs
35
+
36
+ def initialize(**args)
37
+ update!(**args)
38
+ end
39
+
40
+ # Update properties of this object
41
+ def update!(**args)
42
+ @network_configs = args[:network_configs] if args.key?(:network_configs)
43
+ end
44
+ end
45
+
46
+ # The request message for Operations.CancelOperation.
47
+ class CancelOperationRequest
48
+ include Google::Apis::Core::Hashable
49
+
50
+ def initialize(**args)
51
+ update!(**args)
52
+ end
53
+
54
+ # Update properties of this object
55
+ def update!(**args)
56
+ end
57
+ end
58
+
59
+ # A capacity configuration of a Kafka cluster.
60
+ class CapacityConfig
61
+ include Google::Apis::Core::Hashable
62
+
63
+ # Required. The memory to provision for the cluster in bytes. The CPU:memory
64
+ # ratio (vCPU:GiB) must be between 1:1 and 1:8. Minimum: 3221225472 (3 GiB).
65
+ # Corresponds to the JSON property `memoryBytes`
66
+ # @return [Fixnum]
67
+ attr_accessor :memory_bytes
68
+
69
+ # Required. The number of vCPUs to provision for the cluster. Minimum: 3.
70
+ # Corresponds to the JSON property `vcpuCount`
71
+ # @return [Fixnum]
72
+ attr_accessor :vcpu_count
73
+
74
+ def initialize(**args)
75
+ update!(**args)
76
+ end
77
+
78
+ # Update properties of this object
79
+ def update!(**args)
80
+ @memory_bytes = args[:memory_bytes] if args.key?(:memory_bytes)
81
+ @vcpu_count = args[:vcpu_count] if args.key?(:vcpu_count)
82
+ end
83
+ end
84
+
85
+ # An Apache Kafka cluster deployed in a location.
86
+ class Cluster
87
+ include Google::Apis::Core::Hashable
88
+
89
+ # A capacity configuration of a Kafka cluster.
90
+ # Corresponds to the JSON property `capacityConfig`
91
+ # @return [Google::Apis::ManagedkafkaV1::CapacityConfig]
92
+ attr_accessor :capacity_config
93
+
94
+ # Output only. The time when the cluster was created.
95
+ # Corresponds to the JSON property `createTime`
96
+ # @return [String]
97
+ attr_accessor :create_time
98
+
99
+ # Configuration properties for a Kafka cluster deployed to Google Cloud Platform.
100
+ # Corresponds to the JSON property `gcpConfig`
101
+ # @return [Google::Apis::ManagedkafkaV1::GcpConfig]
102
+ attr_accessor :gcp_config
103
+
104
+ # Optional. Labels as key value pairs.
105
+ # Corresponds to the JSON property `labels`
106
+ # @return [Hash<String,String>]
107
+ attr_accessor :labels
108
+
109
+ # Identifier. The name of the cluster. Structured like: projects/`project_number`
110
+ # /locations/`location`/clusters/`cluster_id`
111
+ # Corresponds to the JSON property `name`
112
+ # @return [String]
113
+ attr_accessor :name
114
+
115
+ # Defines rebalancing behavior of a Kafka cluster.
116
+ # Corresponds to the JSON property `rebalanceConfig`
117
+ # @return [Google::Apis::ManagedkafkaV1::RebalanceConfig]
118
+ attr_accessor :rebalance_config
119
+
120
+ # Output only. Reserved for future use.
121
+ # Corresponds to the JSON property `satisfiesPzi`
122
+ # @return [Boolean]
123
+ attr_accessor :satisfies_pzi
124
+ alias_method :satisfies_pzi?, :satisfies_pzi
125
+
126
+ # Output only. Reserved for future use.
127
+ # Corresponds to the JSON property `satisfiesPzs`
128
+ # @return [Boolean]
129
+ attr_accessor :satisfies_pzs
130
+ alias_method :satisfies_pzs?, :satisfies_pzs
131
+
132
+ # Output only. The current state of the cluster.
133
+ # Corresponds to the JSON property `state`
134
+ # @return [String]
135
+ attr_accessor :state
136
+
137
+ # Output only. The time when the cluster was last updated.
138
+ # Corresponds to the JSON property `updateTime`
139
+ # @return [String]
140
+ attr_accessor :update_time
141
+
142
+ def initialize(**args)
143
+ update!(**args)
144
+ end
145
+
146
+ # Update properties of this object
147
+ def update!(**args)
148
+ @capacity_config = args[:capacity_config] if args.key?(:capacity_config)
149
+ @create_time = args[:create_time] if args.key?(:create_time)
150
+ @gcp_config = args[:gcp_config] if args.key?(:gcp_config)
151
+ @labels = args[:labels] if args.key?(:labels)
152
+ @name = args[:name] if args.key?(:name)
153
+ @rebalance_config = args[:rebalance_config] if args.key?(:rebalance_config)
154
+ @satisfies_pzi = args[:satisfies_pzi] if args.key?(:satisfies_pzi)
155
+ @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
156
+ @state = args[:state] if args.key?(:state)
157
+ @update_time = args[:update_time] if args.key?(:update_time)
158
+ end
159
+ end
160
+
161
+ # A Kafka consumer group in a given cluster.
162
+ class ConsumerGroup
163
+ include Google::Apis::Core::Hashable
164
+
165
+ # Identifier. The name of the consumer group. The `consumer_group` segment is
166
+ # used when connecting directly to the cluster. Structured like: projects/`
167
+ # project`/locations/`location`/clusters/`cluster`/consumerGroups/`
168
+ # consumer_group`
169
+ # Corresponds to the JSON property `name`
170
+ # @return [String]
171
+ attr_accessor :name
172
+
173
+ # Optional. Metadata for this consumer group for all topics it has metadata for.
174
+ # The key of the map is a topic name, structured like: projects/`project`/
175
+ # locations/`location`/clusters/`cluster`/topics/`topic`
176
+ # Corresponds to the JSON property `topics`
177
+ # @return [Hash<String,Google::Apis::ManagedkafkaV1::ConsumerTopicMetadata>]
178
+ attr_accessor :topics
179
+
180
+ def initialize(**args)
181
+ update!(**args)
182
+ end
183
+
184
+ # Update properties of this object
185
+ def update!(**args)
186
+ @name = args[:name] if args.key?(:name)
187
+ @topics = args[:topics] if args.key?(:topics)
188
+ end
189
+ end
190
+
191
+ # Metadata for a consumer group corresponding to a specific partition.
192
+ class ConsumerPartitionMetadata
193
+ include Google::Apis::Core::Hashable
194
+
195
+ # Optional. The associated metadata for this partition, or empty if it does not
196
+ # exist.
197
+ # Corresponds to the JSON property `metadata`
198
+ # @return [String]
199
+ attr_accessor :metadata
200
+
201
+ # Required. The current offset for this partition, or 0 if no offset has been
202
+ # committed.
203
+ # Corresponds to the JSON property `offset`
204
+ # @return [Fixnum]
205
+ attr_accessor :offset
206
+
207
+ def initialize(**args)
208
+ update!(**args)
209
+ end
210
+
211
+ # Update properties of this object
212
+ def update!(**args)
213
+ @metadata = args[:metadata] if args.key?(:metadata)
214
+ @offset = args[:offset] if args.key?(:offset)
215
+ end
216
+ end
217
+
218
+ # Metadata for a consumer group corresponding to a specific topic.
219
+ class ConsumerTopicMetadata
220
+ include Google::Apis::Core::Hashable
221
+
222
+ # Optional. Metadata for this consumer group and topic for all partition indexes
223
+ # it has metadata for.
224
+ # Corresponds to the JSON property `partitions`
225
+ # @return [Hash<String,Google::Apis::ManagedkafkaV1::ConsumerPartitionMetadata>]
226
+ attr_accessor :partitions
227
+
228
+ def initialize(**args)
229
+ update!(**args)
230
+ end
231
+
232
+ # Update properties of this object
233
+ def update!(**args)
234
+ @partitions = args[:partitions] if args.key?(:partitions)
235
+ end
236
+ end
237
+
238
+ # A generic empty message that you can re-use to avoid defining duplicated empty
239
+ # messages in your APIs. A typical example is to use it as the request or the
240
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
241
+ # protobuf.Empty) returns (google.protobuf.Empty); `
242
+ class Empty
243
+ include Google::Apis::Core::Hashable
244
+
245
+ def initialize(**args)
246
+ update!(**args)
247
+ end
248
+
249
+ # Update properties of this object
250
+ def update!(**args)
251
+ end
252
+ end
253
+
254
+ # Configuration properties for a Kafka cluster deployed to Google Cloud Platform.
255
+ class GcpConfig
256
+ include Google::Apis::Core::Hashable
257
+
258
+ # The configuration of access to the Kafka cluster.
259
+ # Corresponds to the JSON property `accessConfig`
260
+ # @return [Google::Apis::ManagedkafkaV1::AccessConfig]
261
+ attr_accessor :access_config
262
+
263
+ # Optional. Immutable. The Cloud KMS Key name to use for encryption. The key
264
+ # must be located in the same region as the cluster and cannot be changed.
265
+ # Structured like: projects/`project`/locations/`location`/keyRings/`key_ring`/
266
+ # cryptoKeys/`crypto_key`.
267
+ # Corresponds to the JSON property `kmsKey`
268
+ # @return [String]
269
+ attr_accessor :kms_key
270
+
271
+ def initialize(**args)
272
+ update!(**args)
273
+ end
274
+
275
+ # Update properties of this object
276
+ def update!(**args)
277
+ @access_config = args[:access_config] if args.key?(:access_config)
278
+ @kms_key = args[:kms_key] if args.key?(:kms_key)
279
+ end
280
+ end
281
+
282
+ # Response for ListClusters.
283
+ class ListClustersResponse
284
+ include Google::Apis::Core::Hashable
285
+
286
+ # The list of Clusters in the requested parent.
287
+ # Corresponds to the JSON property `clusters`
288
+ # @return [Array<Google::Apis::ManagedkafkaV1::Cluster>]
289
+ attr_accessor :clusters
290
+
291
+ # A token that can be sent as `page_token` to retrieve the next page of results.
292
+ # If this field is omitted, there are no more results.
293
+ # Corresponds to the JSON property `nextPageToken`
294
+ # @return [String]
295
+ attr_accessor :next_page_token
296
+
297
+ # Locations that could not be reached.
298
+ # Corresponds to the JSON property `unreachable`
299
+ # @return [Array<String>]
300
+ attr_accessor :unreachable
301
+
302
+ def initialize(**args)
303
+ update!(**args)
304
+ end
305
+
306
+ # Update properties of this object
307
+ def update!(**args)
308
+ @clusters = args[:clusters] if args.key?(:clusters)
309
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
310
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
311
+ end
312
+ end
313
+
314
+ # Response for ListConsumerGroups.
315
+ class ListConsumerGroupsResponse
316
+ include Google::Apis::Core::Hashable
317
+
318
+ # The list of consumer group in the requested parent. The order of the consumer
319
+ # groups is unspecified.
320
+ # Corresponds to the JSON property `consumerGroups`
321
+ # @return [Array<Google::Apis::ManagedkafkaV1::ConsumerGroup>]
322
+ attr_accessor :consumer_groups
323
+
324
+ # A token that can be sent as `page_token` to retrieve the next page of results.
325
+ # If this field is omitted, there are no more results.
326
+ # Corresponds to the JSON property `nextPageToken`
327
+ # @return [String]
328
+ attr_accessor :next_page_token
329
+
330
+ def initialize(**args)
331
+ update!(**args)
332
+ end
333
+
334
+ # Update properties of this object
335
+ def update!(**args)
336
+ @consumer_groups = args[:consumer_groups] if args.key?(:consumer_groups)
337
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
338
+ end
339
+ end
340
+
341
+ # The response message for Locations.ListLocations.
342
+ class ListLocationsResponse
343
+ include Google::Apis::Core::Hashable
344
+
345
+ # A list of locations that matches the specified filter in the request.
346
+ # Corresponds to the JSON property `locations`
347
+ # @return [Array<Google::Apis::ManagedkafkaV1::Location>]
348
+ attr_accessor :locations
349
+
350
+ # The standard List next-page token.
351
+ # Corresponds to the JSON property `nextPageToken`
352
+ # @return [String]
353
+ attr_accessor :next_page_token
354
+
355
+ def initialize(**args)
356
+ update!(**args)
357
+ end
358
+
359
+ # Update properties of this object
360
+ def update!(**args)
361
+ @locations = args[:locations] if args.key?(:locations)
362
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
363
+ end
364
+ end
365
+
366
+ # The response message for Operations.ListOperations.
367
+ class ListOperationsResponse
368
+ include Google::Apis::Core::Hashable
369
+
370
+ # The standard List next-page token.
371
+ # Corresponds to the JSON property `nextPageToken`
372
+ # @return [String]
373
+ attr_accessor :next_page_token
374
+
375
+ # A list of operations that matches the specified filter in the request.
376
+ # Corresponds to the JSON property `operations`
377
+ # @return [Array<Google::Apis::ManagedkafkaV1::Operation>]
378
+ attr_accessor :operations
379
+
380
+ def initialize(**args)
381
+ update!(**args)
382
+ end
383
+
384
+ # Update properties of this object
385
+ def update!(**args)
386
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
387
+ @operations = args[:operations] if args.key?(:operations)
388
+ end
389
+ end
390
+
391
+ # Response for ListTopics.
392
+ class ListTopicsResponse
393
+ include Google::Apis::Core::Hashable
394
+
395
+ # A token that can be sent as `page_token` to retrieve the next page of results.
396
+ # If this field is omitted, there are no more results.
397
+ # Corresponds to the JSON property `nextPageToken`
398
+ # @return [String]
399
+ attr_accessor :next_page_token
400
+
401
+ # The list of topics in the requested parent. The order of the topics is
402
+ # unspecified.
403
+ # Corresponds to the JSON property `topics`
404
+ # @return [Array<Google::Apis::ManagedkafkaV1::Topic>]
405
+ attr_accessor :topics
406
+
407
+ def initialize(**args)
408
+ update!(**args)
409
+ end
410
+
411
+ # Update properties of this object
412
+ def update!(**args)
413
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
414
+ @topics = args[:topics] if args.key?(:topics)
415
+ end
416
+ end
417
+
418
+ # A resource that represents a Google Cloud location.
419
+ class Location
420
+ include Google::Apis::Core::Hashable
421
+
422
+ # The friendly name for this location, typically a nearby city name. For example,
423
+ # "Tokyo".
424
+ # Corresponds to the JSON property `displayName`
425
+ # @return [String]
426
+ attr_accessor :display_name
427
+
428
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
429
+ # region": "us-east1"`
430
+ # Corresponds to the JSON property `labels`
431
+ # @return [Hash<String,String>]
432
+ attr_accessor :labels
433
+
434
+ # The canonical id for this location. For example: `"us-east1"`.
435
+ # Corresponds to the JSON property `locationId`
436
+ # @return [String]
437
+ attr_accessor :location_id
438
+
439
+ # Service-specific metadata. For example the available capacity at the given
440
+ # location.
441
+ # Corresponds to the JSON property `metadata`
442
+ # @return [Hash<String,Object>]
443
+ attr_accessor :metadata
444
+
445
+ # Resource name for the location, which may vary between implementations. For
446
+ # example: `"projects/example-project/locations/us-east1"`
447
+ # Corresponds to the JSON property `name`
448
+ # @return [String]
449
+ attr_accessor :name
450
+
451
+ def initialize(**args)
452
+ update!(**args)
453
+ end
454
+
455
+ # Update properties of this object
456
+ def update!(**args)
457
+ @display_name = args[:display_name] if args.key?(:display_name)
458
+ @labels = args[:labels] if args.key?(:labels)
459
+ @location_id = args[:location_id] if args.key?(:location_id)
460
+ @metadata = args[:metadata] if args.key?(:metadata)
461
+ @name = args[:name] if args.key?(:name)
462
+ end
463
+ end
464
+
465
+ # The configuration of a Virtual Private Cloud (VPC) network that can access the
466
+ # Kafka cluster.
467
+ class NetworkConfig
468
+ include Google::Apis::Core::Hashable
469
+
470
+ # Required. Name of the VPC subnet in which to create Private Service Connect (
471
+ # PSC) endpoints for the Kafka brokers and bootstrap address. Structured like:
472
+ # projects/`project`/regions/`region`/subnetworks/`subnet_id` The subnet must be
473
+ # located in the same region as the Kafka cluster. The project may differ.
474
+ # Multiple subnets from the same parent network must not be specified.
475
+ # Corresponds to the JSON property `subnet`
476
+ # @return [String]
477
+ attr_accessor :subnet
478
+
479
+ def initialize(**args)
480
+ update!(**args)
481
+ end
482
+
483
+ # Update properties of this object
484
+ def update!(**args)
485
+ @subnet = args[:subnet] if args.key?(:subnet)
486
+ end
487
+ end
488
+
489
+ # This resource represents a long-running operation that is the result of a
490
+ # network API call.
491
+ class Operation
492
+ include Google::Apis::Core::Hashable
493
+
494
+ # If the value is `false`, it means the operation is still in progress. If `true`
495
+ # , the operation is completed, and either `error` or `response` is available.
496
+ # Corresponds to the JSON property `done`
497
+ # @return [Boolean]
498
+ attr_accessor :done
499
+ alias_method :done?, :done
500
+
501
+ # The `Status` type defines a logical error model that is suitable for different
502
+ # programming environments, including REST APIs and RPC APIs. It is used by [
503
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
504
+ # data: error code, error message, and error details. You can find out more
505
+ # about this error model and how to work with it in the [API Design Guide](https:
506
+ # //cloud.google.com/apis/design/errors).
507
+ # Corresponds to the JSON property `error`
508
+ # @return [Google::Apis::ManagedkafkaV1::Status]
509
+ attr_accessor :error
510
+
511
+ # Service-specific metadata associated with the operation. It typically contains
512
+ # progress information and common metadata such as create time. Some services
513
+ # might not provide such metadata. Any method that returns a long-running
514
+ # operation should document the metadata type, if any.
515
+ # Corresponds to the JSON property `metadata`
516
+ # @return [Hash<String,Object>]
517
+ attr_accessor :metadata
518
+
519
+ # The server-assigned name, which is only unique within the same service that
520
+ # originally returns it. If you use the default HTTP mapping, the `name` should
521
+ # be a resource name ending with `operations/`unique_id``.
522
+ # Corresponds to the JSON property `name`
523
+ # @return [String]
524
+ attr_accessor :name
525
+
526
+ # The normal, successful response of the operation. If the original method
527
+ # returns no data on success, such as `Delete`, the response is `google.protobuf.
528
+ # Empty`. If the original method is standard `Get`/`Create`/`Update`, the
529
+ # response should be the resource. For other methods, the response should have
530
+ # the type `XxxResponse`, where `Xxx` is the original method name. For example,
531
+ # if the original method name is `TakeSnapshot()`, the inferred response type is
532
+ # `TakeSnapshotResponse`.
533
+ # Corresponds to the JSON property `response`
534
+ # @return [Hash<String,Object>]
535
+ attr_accessor :response
536
+
537
+ def initialize(**args)
538
+ update!(**args)
539
+ end
540
+
541
+ # Update properties of this object
542
+ def update!(**args)
543
+ @done = args[:done] if args.key?(:done)
544
+ @error = args[:error] if args.key?(:error)
545
+ @metadata = args[:metadata] if args.key?(:metadata)
546
+ @name = args[:name] if args.key?(:name)
547
+ @response = args[:response] if args.key?(:response)
548
+ end
549
+ end
550
+
551
+ # Represents the metadata of the long-running operation.
552
+ class OperationMetadata
553
+ include Google::Apis::Core::Hashable
554
+
555
+ # Output only. API version used to start the operation.
556
+ # Corresponds to the JSON property `apiVersion`
557
+ # @return [String]
558
+ attr_accessor :api_version
559
+
560
+ # Output only. The time the operation was created.
561
+ # Corresponds to the JSON property `createTime`
562
+ # @return [String]
563
+ attr_accessor :create_time
564
+
565
+ # Output only. The time the operation finished running.
566
+ # Corresponds to the JSON property `endTime`
567
+ # @return [String]
568
+ attr_accessor :end_time
569
+
570
+ # Output only. Identifies whether the user has requested cancellation of the
571
+ # operation. Operations that have been cancelled successfully have Operation.
572
+ # error value with a google.rpc.Status.code of 1, corresponding to `Code.
573
+ # CANCELLED`.
574
+ # Corresponds to the JSON property `requestedCancellation`
575
+ # @return [Boolean]
576
+ attr_accessor :requested_cancellation
577
+ alias_method :requested_cancellation?, :requested_cancellation
578
+
579
+ # Output only. Human-readable status of the operation, if any.
580
+ # Corresponds to the JSON property `statusMessage`
581
+ # @return [String]
582
+ attr_accessor :status_message
583
+
584
+ # Output only. Server-defined resource path for the target of the operation.
585
+ # Corresponds to the JSON property `target`
586
+ # @return [String]
587
+ attr_accessor :target
588
+
589
+ # Output only. Name of the verb executed by the operation.
590
+ # Corresponds to the JSON property `verb`
591
+ # @return [String]
592
+ attr_accessor :verb
593
+
594
+ def initialize(**args)
595
+ update!(**args)
596
+ end
597
+
598
+ # Update properties of this object
599
+ def update!(**args)
600
+ @api_version = args[:api_version] if args.key?(:api_version)
601
+ @create_time = args[:create_time] if args.key?(:create_time)
602
+ @end_time = args[:end_time] if args.key?(:end_time)
603
+ @requested_cancellation = args[:requested_cancellation] if args.key?(:requested_cancellation)
604
+ @status_message = args[:status_message] if args.key?(:status_message)
605
+ @target = args[:target] if args.key?(:target)
606
+ @verb = args[:verb] if args.key?(:verb)
607
+ end
608
+ end
609
+
610
+ # Defines rebalancing behavior of a Kafka cluster.
611
+ class RebalanceConfig
612
+ include Google::Apis::Core::Hashable
613
+
614
+ # Optional. The rebalance behavior for the cluster. When not specified, defaults
615
+ # to `NO_REBALANCE`.
616
+ # Corresponds to the JSON property `mode`
617
+ # @return [String]
618
+ attr_accessor :mode
619
+
620
+ def initialize(**args)
621
+ update!(**args)
622
+ end
623
+
624
+ # Update properties of this object
625
+ def update!(**args)
626
+ @mode = args[:mode] if args.key?(:mode)
627
+ end
628
+ end
629
+
630
+ # The `Status` type defines a logical error model that is suitable for different
631
+ # programming environments, including REST APIs and RPC APIs. It is used by [
632
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
633
+ # data: error code, error message, and error details. You can find out more
634
+ # about this error model and how to work with it in the [API Design Guide](https:
635
+ # //cloud.google.com/apis/design/errors).
636
+ class Status
637
+ include Google::Apis::Core::Hashable
638
+
639
+ # The status code, which should be an enum value of google.rpc.Code.
640
+ # Corresponds to the JSON property `code`
641
+ # @return [Fixnum]
642
+ attr_accessor :code
643
+
644
+ # A list of messages that carry the error details. There is a common set of
645
+ # message types for APIs to use.
646
+ # Corresponds to the JSON property `details`
647
+ # @return [Array<Hash<String,Object>>]
648
+ attr_accessor :details
649
+
650
+ # A developer-facing error message, which should be in English. Any user-facing
651
+ # error message should be localized and sent in the google.rpc.Status.details
652
+ # field, or localized by the client.
653
+ # Corresponds to the JSON property `message`
654
+ # @return [String]
655
+ attr_accessor :message
656
+
657
+ def initialize(**args)
658
+ update!(**args)
659
+ end
660
+
661
+ # Update properties of this object
662
+ def update!(**args)
663
+ @code = args[:code] if args.key?(:code)
664
+ @details = args[:details] if args.key?(:details)
665
+ @message = args[:message] if args.key?(:message)
666
+ end
667
+ end
668
+
669
+ # A Kafka topic in a given cluster.
670
+ class Topic
671
+ include Google::Apis::Core::Hashable
672
+
673
+ # Optional. Configurations for the topic that are overridden from the cluster
674
+ # defaults. The key of the map is a Kafka topic property name, for example: `
675
+ # cleanup.policy`, `compression.type`.
676
+ # Corresponds to the JSON property `configs`
677
+ # @return [Hash<String,String>]
678
+ attr_accessor :configs
679
+
680
+ # Identifier. The name of the topic. The `topic` segment is used when connecting
681
+ # directly to the cluster. Structured like: projects/`project`/locations/`
682
+ # location`/clusters/`cluster`/topics/`topic`
683
+ # Corresponds to the JSON property `name`
684
+ # @return [String]
685
+ attr_accessor :name
686
+
687
+ # Required. The number of partitions this topic has. The partition count can
688
+ # only be increased, not decreased. Please note that if partitions are increased
689
+ # for a topic that has a key, the partitioning logic or the ordering of the
690
+ # messages will be affected.
691
+ # Corresponds to the JSON property `partitionCount`
692
+ # @return [Fixnum]
693
+ attr_accessor :partition_count
694
+
695
+ # Required. Immutable. The number of replicas of each partition. A replication
696
+ # factor of 3 is recommended for high availability.
697
+ # Corresponds to the JSON property `replicationFactor`
698
+ # @return [Fixnum]
699
+ attr_accessor :replication_factor
700
+
701
+ def initialize(**args)
702
+ update!(**args)
703
+ end
704
+
705
+ # Update properties of this object
706
+ def update!(**args)
707
+ @configs = args[:configs] if args.key?(:configs)
708
+ @name = args[:name] if args.key?(:name)
709
+ @partition_count = args[:partition_count] if args.key?(:partition_count)
710
+ @replication_factor = args[:replication_factor] if args.key?(:replication_factor)
711
+ end
712
+ end
713
+ end
714
+ end
715
+ end