1"""Generated message classes for pubsublite version v1. 2 3""" 4# NOTE: This file is autogenerated and should not be edited by hand. 5 6from __future__ import absolute_import 7 8from apitools.base.protorpclite import messages as _messages 9from apitools.base.py import encoding 10 11 12package = 'pubsublite' 13 14 15class Capacity(_messages.Message): 16 r"""The throughput capacity configuration for each partition. 17 18 Fields: 19 publishMibPerSec: Publish throughput capacity per partition in MiB/s. Must 20 be >= 4 and <= 16. 21 subscribeMibPerSec: Subscribe throughput capacity per partition in MiB/s. 22 Must be >= 4 and <= 32. 23 """ 24 25 publishMibPerSec = _messages.IntegerField(1, variant=_messages.Variant.INT32) 26 subscribeMibPerSec = _messages.IntegerField(2, variant=_messages.Variant.INT32) 27 28 29class ComputeHeadCursorRequest(_messages.Message): 30 r"""Compute the current head cursor for a partition. 31 32 Fields: 33 partition: Required. The partition for which we should compute the head 34 cursor. 35 """ 36 37 partition = _messages.IntegerField(1) 38 39 40class ComputeHeadCursorResponse(_messages.Message): 41 r"""Response containing the head cursor for the requested topic and 42 partition. 43 44 Fields: 45 headCursor: The head cursor. 46 """ 47 48 headCursor = _messages.MessageField('Cursor', 1) 49 50 51class ComputeMessageStatsRequest(_messages.Message): 52 r"""Compute statistics about a range of messages in a given topic and 53 partition. 54 55 Fields: 56 endCursor: The exclusive end of the range. The range is empty if 57 end_cursor <= start_cursor. Specifying a start_cursor before the first 58 message and an end_cursor after the last message will retrieve all 59 messages. 60 partition: Required. The partition for which we should compute message 61 stats. 62 startCursor: The inclusive start of the range. 63 """ 64 65 endCursor = _messages.MessageField('Cursor', 1) 66 partition = _messages.IntegerField(2) 67 startCursor = _messages.MessageField('Cursor', 3) 68 69 70class ComputeMessageStatsResponse(_messages.Message): 71 r"""Response containing stats for messages in the requested topic and 72 partition. 73 74 Fields: 75 messageBytes: The number of quota bytes accounted to these messages. 76 messageCount: The count of messages. 77 minimumEventTime: The minimum event timestamp across these messages. For 78 the purposes of this computation, if a message does not have an event 79 time, we use the publish time. The timestamp will be unset if there are 80 no messages. 81 minimumPublishTime: The minimum publish timestamp across these messages. 82 Note that publish timestamps within a partition are not guaranteed to be 83 non-decreasing. The timestamp will be unset if there are no messages. 84 """ 85 86 messageBytes = _messages.IntegerField(1) 87 messageCount = _messages.IntegerField(2) 88 minimumEventTime = _messages.StringField(3) 89 minimumPublishTime = _messages.StringField(4) 90 91 92class Cursor(_messages.Message): 93 r"""A cursor that describes the position of a message within a topic 94 partition. 95 96 Fields: 97 offset: The offset of a message within a topic partition. Must be greater 98 than or equal 0. 99 """ 100 101 offset = _messages.IntegerField(1) 102 103 104class DeliveryConfig(_messages.Message): 105 r"""The settings for a subscription's message delivery. 106 107 Enums: 108 DeliveryRequirementValueValuesEnum: The DeliveryRequirement for this 109 subscription. 110 111 Fields: 112 deliveryRequirement: The DeliveryRequirement for this subscription. 113 """ 114 115 class DeliveryRequirementValueValuesEnum(_messages.Enum): 116 r"""The DeliveryRequirement for this subscription. 117 118 Values: 119 DELIVERY_REQUIREMENT_UNSPECIFIED: Default value. This value is unused. 120 DELIVER_IMMEDIATELY: The server does not wait for a published message to 121 be successfully written to storage before delivering it to 122 subscribers. 123 DELIVER_AFTER_STORED: The server will not deliver a published message to 124 subscribers until the message has been successfully written to 125 storage. This will result in higher end-to-end latency, but consistent 126 delivery. 127 """ 128 DELIVERY_REQUIREMENT_UNSPECIFIED = 0 129 DELIVER_IMMEDIATELY = 1 130 DELIVER_AFTER_STORED = 2 131 132 deliveryRequirement = _messages.EnumField('DeliveryRequirementValueValuesEnum', 1) 133 134 135class Empty(_messages.Message): 136 r"""A generic empty message that you can re-use to avoid defining duplicated 137 empty messages in your APIs. A typical example is to use it as the request 138 or the response type of an API method. For instance: service Foo { rpc 139 Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON 140 representation for `Empty` is empty JSON object `{}`. 141 """ 142 143 144 145class ListPartitionCursorsResponse(_messages.Message): 146 r"""Response for ListPartitionCursors 147 148 Fields: 149 nextPageToken: A token, which can be sent as `page_token` to retrieve the 150 next page. If this field is omitted, there are no subsequent pages. 151 partitionCursors: The partition cursors from this request. 152 """ 153 154 nextPageToken = _messages.StringField(1) 155 partitionCursors = _messages.MessageField('PartitionCursor', 2, repeated=True) 156 157 158class ListSubscriptionsResponse(_messages.Message): 159 r"""Response for ListSubscriptions. 160 161 Fields: 162 nextPageToken: A token that can be sent as `page_token` to retrieve the 163 next page of results. If this field is omitted, there are no more 164 results. 165 subscriptions: The list of subscriptions in the requested parent. The 166 order of the subscriptions is unspecified. 167 """ 168 169 nextPageToken = _messages.StringField(1) 170 subscriptions = _messages.MessageField('Subscription', 2, repeated=True) 171 172 173class ListTopicSubscriptionsResponse(_messages.Message): 174 r"""Response for ListTopicSubscriptions. 175 176 Fields: 177 nextPageToken: A token that can be sent as `page_token` to retrieve the 178 next page of results. If this field is omitted, there are no more 179 results. 180 subscriptions: The names of subscriptions attached to the topic. The order 181 of the subscriptions is unspecified. 182 """ 183 184 nextPageToken = _messages.StringField(1) 185 subscriptions = _messages.StringField(2, repeated=True) 186 187 188class ListTopicsResponse(_messages.Message): 189 r"""Response for ListTopics. 190 191 Fields: 192 nextPageToken: A token that can be sent as `page_token` to retrieve the 193 next page of results. If this field is omitted, there are no more 194 results. 195 topics: The list of topic in the requested parent. The order of the topics 196 is unspecified. 197 """ 198 199 nextPageToken = _messages.StringField(1) 200 topics = _messages.MessageField('Topic', 2, repeated=True) 201 202 203class PartitionConfig(_messages.Message): 204 r"""The settings for a topic's partitions. 205 206 Fields: 207 capacity: The capacity configuration. 208 count: The number of partitions in the topic. Must be at least 1. Once a 209 topic has been created the number of partitions can be increased but not 210 decreased. Message ordering is not guaranteed across a topic resize. For 211 more information see 212 https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity 213 scale: DEPRECATED: Use capacity instead which can express a superset of 214 configurations. Every partition in the topic is allocated throughput 215 equivalent to `scale` times the standard partition throughput (4 MiB/s). 216 This is also reflected in the cost of this topic; a topic with `scale` 217 of 2 and count of 10 is charged for 20 partitions. This value must be in 218 the range [1,4]. 219 """ 220 221 capacity = _messages.MessageField('Capacity', 1) 222 count = _messages.IntegerField(2) 223 scale = _messages.IntegerField(3, variant=_messages.Variant.INT32) 224 225 226class PartitionCursor(_messages.Message): 227 r"""A pair of a Cursor and the partition it is for. 228 229 Fields: 230 cursor: The value of the cursor. 231 partition: The partition this is for. 232 """ 233 234 cursor = _messages.MessageField('Cursor', 1) 235 partition = _messages.IntegerField(2) 236 237 238class PubsubliteAdminProjectsLocationsSubscriptionsCreateRequest(_messages.Message): 239 r"""A PubsubliteAdminProjectsLocationsSubscriptionsCreateRequest object. 240 241 Fields: 242 parent: Required. The parent location in which to create the subscription. 243 Structured like `projects/{project_number}/locations/{location}`. 244 subscription: A Subscription resource to be passed as the request body. 245 subscriptionId: Required. The ID to use for the subscription, which will 246 become the final component of the subscription's name. This value is 247 structured like: `my-sub-name`. 248 """ 249 250 parent = _messages.StringField(1, required=True) 251 subscription = _messages.MessageField('Subscription', 2) 252 subscriptionId = _messages.StringField(3) 253 254 255class PubsubliteAdminProjectsLocationsSubscriptionsDeleteRequest(_messages.Message): 256 r"""A PubsubliteAdminProjectsLocationsSubscriptionsDeleteRequest object. 257 258 Fields: 259 name: Required. The name of the subscription to delete. 260 """ 261 262 name = _messages.StringField(1, required=True) 263 264 265class PubsubliteAdminProjectsLocationsSubscriptionsGetRequest(_messages.Message): 266 r"""A PubsubliteAdminProjectsLocationsSubscriptionsGetRequest object. 267 268 Fields: 269 name: Required. The name of the subscription whose configuration to 270 return. 271 """ 272 273 name = _messages.StringField(1, required=True) 274 275 276class PubsubliteAdminProjectsLocationsSubscriptionsListRequest(_messages.Message): 277 r"""A PubsubliteAdminProjectsLocationsSubscriptionsListRequest object. 278 279 Fields: 280 pageSize: The maximum number of subscriptions to return. The service may 281 return fewer than this value. If unset or zero, all subscriptions for 282 the parent will be returned. 283 pageToken: A page token, received from a previous `ListSubscriptions` 284 call. Provide this to retrieve the subsequent page. When paginating, all 285 other parameters provided to `ListSubscriptions` must match the call 286 that provided the page token. 287 parent: Required. The parent whose subscriptions are to be listed. 288 Structured like `projects/{project_number}/locations/{location}`. 289 """ 290 291 pageSize = _messages.IntegerField(1, variant=_messages.Variant.INT32) 292 pageToken = _messages.StringField(2) 293 parent = _messages.StringField(3, required=True) 294 295 296class PubsubliteAdminProjectsLocationsSubscriptionsPatchRequest(_messages.Message): 297 r"""A PubsubliteAdminProjectsLocationsSubscriptionsPatchRequest object. 298 299 Fields: 300 name: The name of the subscription. Structured like: projects/{project_num 301 ber}/locations/{location}/subscriptions/{subscription_id} 302 subscription: A Subscription resource to be passed as the request body. 303 updateMask: Required. A mask specifying the subscription fields to change. 304 """ 305 306 name = _messages.StringField(1, required=True) 307 subscription = _messages.MessageField('Subscription', 2) 308 updateMask = _messages.StringField(3) 309 310 311class PubsubliteAdminProjectsLocationsTopicsCreateRequest(_messages.Message): 312 r"""A PubsubliteAdminProjectsLocationsTopicsCreateRequest object. 313 314 Fields: 315 parent: Required. The parent location in which to create the topic. 316 Structured like `projects/{project_number}/locations/{location}`. 317 topic: A Topic resource to be passed as the request body. 318 topicId: Required. The ID to use for the topic, which will become the 319 final component of the topic's name. This value is structured like: `my- 320 topic-name`. 321 """ 322 323 parent = _messages.StringField(1, required=True) 324 topic = _messages.MessageField('Topic', 2) 325 topicId = _messages.StringField(3) 326 327 328class PubsubliteAdminProjectsLocationsTopicsDeleteRequest(_messages.Message): 329 r"""A PubsubliteAdminProjectsLocationsTopicsDeleteRequest object. 330 331 Fields: 332 name: Required. The name of the topic to delete. 333 """ 334 335 name = _messages.StringField(1, required=True) 336 337 338class PubsubliteAdminProjectsLocationsTopicsGetPartitionsRequest(_messages.Message): 339 r"""A PubsubliteAdminProjectsLocationsTopicsGetPartitionsRequest object. 340 341 Fields: 342 name: Required. The topic whose partition information to return. 343 """ 344 345 name = _messages.StringField(1, required=True) 346 347 348class PubsubliteAdminProjectsLocationsTopicsGetRequest(_messages.Message): 349 r"""A PubsubliteAdminProjectsLocationsTopicsGetRequest object. 350 351 Fields: 352 name: Required. The name of the topic whose configuration to return. 353 """ 354 355 name = _messages.StringField(1, required=True) 356 357 358class PubsubliteAdminProjectsLocationsTopicsListRequest(_messages.Message): 359 r"""A PubsubliteAdminProjectsLocationsTopicsListRequest object. 360 361 Fields: 362 pageSize: The maximum number of topics to return. The service may return 363 fewer than this value. If unset or zero, all topics for the parent will 364 be returned. 365 pageToken: A page token, received from a previous `ListTopics` call. 366 Provide this to retrieve the subsequent page. When paginating, all other 367 parameters provided to `ListTopics` must match the call that provided 368 the page token. 369 parent: Required. The parent whose topics are to be listed. Structured 370 like `projects/{project_number}/locations/{location}`. 371 """ 372 373 pageSize = _messages.IntegerField(1, variant=_messages.Variant.INT32) 374 pageToken = _messages.StringField(2) 375 parent = _messages.StringField(3, required=True) 376 377 378class PubsubliteAdminProjectsLocationsTopicsPatchRequest(_messages.Message): 379 r"""A PubsubliteAdminProjectsLocationsTopicsPatchRequest object. 380 381 Fields: 382 name: The name of the topic. Structured like: 383 projects/{project_number}/locations/{location}/topics/{topic_id} 384 topic: A Topic resource to be passed as the request body. 385 updateMask: Required. A mask specifying the topic fields to change. 386 """ 387 388 name = _messages.StringField(1, required=True) 389 topic = _messages.MessageField('Topic', 2) 390 updateMask = _messages.StringField(3) 391 392 393class PubsubliteAdminProjectsLocationsTopicsSubscriptionsListRequest(_messages.Message): 394 r"""A PubsubliteAdminProjectsLocationsTopicsSubscriptionsListRequest object. 395 396 Fields: 397 name: Required. The name of the topic whose subscriptions to list. 398 pageSize: The maximum number of subscriptions to return. The service may 399 return fewer than this value. If unset or zero, all subscriptions for 400 the given topic will be returned. 401 pageToken: A page token, received from a previous `ListTopicSubscriptions` 402 call. Provide this to retrieve the subsequent page. When paginating, all 403 other parameters provided to `ListTopicSubscriptions` must match the 404 call that provided the page token. 405 """ 406 407 name = _messages.StringField(1, required=True) 408 pageSize = _messages.IntegerField(2, variant=_messages.Variant.INT32) 409 pageToken = _messages.StringField(3) 410 411 412class PubsubliteCursorProjectsLocationsSubscriptionsCursorsListRequest(_messages.Message): 413 r"""A PubsubliteCursorProjectsLocationsSubscriptionsCursorsListRequest 414 object. 415 416 Fields: 417 pageSize: The maximum number of cursors to return. The service may return 418 fewer than this value. If unset or zero, all cursors for the parent will 419 be returned. 420 pageToken: A page token, received from a previous `ListPartitionCursors` 421 call. Provide this to retrieve the subsequent page. When paginating, all 422 other parameters provided to `ListPartitionCursors` must match the call 423 that provided the page token. 424 parent: Required. The subscription for which to retrieve cursors. 425 Structured like `projects/{project_number}/locations/{location}/subscrip 426 tions/{subscription_id}`. 427 """ 428 429 pageSize = _messages.IntegerField(1, variant=_messages.Variant.INT32) 430 pageToken = _messages.StringField(2) 431 parent = _messages.StringField(3, required=True) 432 433 434class PubsubliteTopicStatsProjectsLocationsTopicsComputeHeadCursorRequest(_messages.Message): 435 r"""A PubsubliteTopicStatsProjectsLocationsTopicsComputeHeadCursorRequest 436 object. 437 438 Fields: 439 computeHeadCursorRequest: A ComputeHeadCursorRequest resource to be passed 440 as the request body. 441 topic: Required. The topic for which we should compute the head cursor. 442 """ 443 444 computeHeadCursorRequest = _messages.MessageField('ComputeHeadCursorRequest', 1) 445 topic = _messages.StringField(2, required=True) 446 447 448class PubsubliteTopicStatsProjectsLocationsTopicsComputeMessageStatsRequest(_messages.Message): 449 r"""A PubsubliteTopicStatsProjectsLocationsTopicsComputeMessageStatsRequest 450 object. 451 452 Fields: 453 computeMessageStatsRequest: A ComputeMessageStatsRequest resource to be 454 passed as the request body. 455 topic: Required. The topic for which we should compute message stats. 456 """ 457 458 computeMessageStatsRequest = _messages.MessageField('ComputeMessageStatsRequest', 1) 459 topic = _messages.StringField(2, required=True) 460 461 462class RetentionConfig(_messages.Message): 463 r"""The settings for a topic's message retention. 464 465 Fields: 466 perPartitionBytes: The provisioned storage, in bytes, per partition. If 467 the number of bytes stored in any of the topic's partitions grows beyond 468 this value, older messages will be dropped to make room for newer ones, 469 regardless of the value of `period`. 470 period: How long a published message is retained. If unset, messages will 471 be retained as long as the bytes retained for each partition is below 472 `per_partition_bytes`. 473 """ 474 475 perPartitionBytes = _messages.IntegerField(1) 476 period = _messages.StringField(2) 477 478 479class StandardQueryParameters(_messages.Message): 480 r"""Query parameters accepted by all methods. 481 482 Enums: 483 FXgafvValueValuesEnum: V1 error format. 484 AltValueValuesEnum: Data format for response. 485 486 Fields: 487 f__xgafv: V1 error format. 488 access_token: OAuth access token. 489 alt: Data format for response. 490 callback: JSONP 491 fields: Selector specifying which fields to include in a partial response. 492 key: API key. Your API key identifies your project and provides you with 493 API access, quota, and reports. Required unless you provide an OAuth 2.0 494 token. 495 oauth_token: OAuth 2.0 token for the current user. 496 prettyPrint: Returns response with indentations and line breaks. 497 quotaUser: Available to use for quota purposes for server-side 498 applications. Can be any arbitrary string assigned to a user, but should 499 not exceed 40 characters. 500 trace: A tracing token of the form "token:<tokenid>" to include in api 501 requests. 502 uploadType: Legacy upload protocol for media (e.g. "media", "multipart"). 503 upload_protocol: Upload protocol for media (e.g. "raw", "multipart"). 504 """ 505 506 class AltValueValuesEnum(_messages.Enum): 507 r"""Data format for response. 508 509 Values: 510 json: Responses with Content-Type of application/json 511 media: Media download with context-dependent Content-Type 512 proto: Responses with Content-Type of application/x-protobuf 513 """ 514 json = 0 515 media = 1 516 proto = 2 517 518 class FXgafvValueValuesEnum(_messages.Enum): 519 r"""V1 error format. 520 521 Values: 522 _1: v1 error format 523 _2: v2 error format 524 """ 525 _1 = 0 526 _2 = 1 527 528 f__xgafv = _messages.EnumField('FXgafvValueValuesEnum', 1) 529 access_token = _messages.StringField(2) 530 alt = _messages.EnumField('AltValueValuesEnum', 3, default='json') 531 callback = _messages.StringField(4) 532 fields = _messages.StringField(5) 533 key = _messages.StringField(6) 534 oauth_token = _messages.StringField(7) 535 prettyPrint = _messages.BooleanField(8, default=True) 536 quotaUser = _messages.StringField(9) 537 trace = _messages.StringField(10) 538 uploadType = _messages.StringField(11) 539 upload_protocol = _messages.StringField(12) 540 541 542class Subscription(_messages.Message): 543 r"""Metadata about a subscription resource. 544 545 Fields: 546 deliveryConfig: The settings for this subscription's message delivery. 547 name: The name of the subscription. Structured like: projects/{project_num 548 ber}/locations/{location}/subscriptions/{subscription_id} 549 topic: The name of the topic this subscription is attached to. Structured 550 like: projects/{project_number}/locations/{location}/topics/{topic_id} 551 """ 552 553 deliveryConfig = _messages.MessageField('DeliveryConfig', 1) 554 name = _messages.StringField(2) 555 topic = _messages.StringField(3) 556 557 558class Topic(_messages.Message): 559 r"""Metadata about a topic resource. 560 561 Fields: 562 name: The name of the topic. Structured like: 563 projects/{project_number}/locations/{location}/topics/{topic_id} 564 partitionConfig: The settings for this topic's partitions. 565 retentionConfig: The settings for this topic's message retention. 566 """ 567 568 name = _messages.StringField(1) 569 partitionConfig = _messages.MessageField('PartitionConfig', 2) 570 retentionConfig = _messages.MessageField('RetentionConfig', 3) 571 572 573class TopicPartitions(_messages.Message): 574 r"""Response for GetTopicPartitions. 575 576 Fields: 577 partitionCount: The number of partitions in the topic. 578 """ 579 580 partitionCount = _messages.IntegerField(1) 581 582 583encoding.AddCustomJsonFieldMapping( 584 StandardQueryParameters, 'f__xgafv', '$.xgafv') 585encoding.AddCustomJsonEnumMapping( 586 StandardQueryParameters.FXgafvValueValuesEnum, '_1', '1') 587encoding.AddCustomJsonEnumMapping( 588 StandardQueryParameters.FXgafvValueValuesEnum, '_2', '2') 589