Skip to content

Commit 3e22779

Browse files
feat: publish client batch config schema (#33437)
* feat: publish client batch config schema feat: publish new error reasons docs: fix documentation formatting docs: update various comments docs: update license year PiperOrigin-RevId: 889289393 Source-Link: googleapis/googleapis@94bc991 Source-Link: googleapis/googleapis-gen@db7143a Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9zX2NvbmZpZy12MS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9zX2NvbmZpZy12MWFscGhhLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9zX2xvZ2luLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW9zX2xvZ2luLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBhcmFsbGVsc3RvcmUtdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBhcmFsbGVsc3RvcmUtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBhcmFtZXRlcl9tYW5hZ2VyL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XYyLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJhcGlkX21pZ3JhdGlvbl9hc3Nlc3NtZW50LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY2FwdGNoYV9lbnRlcnByaXNlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY2FwdGNoYV9lbnRlcnByaXNlLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY29tbWVuZGF0aW9uX2VuZ2luZS12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY29tbWVuZGVyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlZGlzLWNsdXN0ZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 6b4d4ce commit 3e22779

16 files changed

Lines changed: 2320 additions & 464 deletions

File tree

  • google-cloud-os_login-v1beta/proto_docs/google/api
  • google-cloud-os_login-v1/proto_docs/google/api
  • google-cloud-parallelstore-v1beta/proto_docs/google/api
  • google-cloud-parallelstore-v1/proto_docs/google/api
  • google-cloud-parameter_manager-v1/proto_docs/google/api
  • google-cloud-phishing_protection-v1beta1/proto_docs/google/api
  • google-cloud-policy_troubleshooter-iam-v3/proto_docs/google/api
  • google-cloud-policy_troubleshooter-v1/proto_docs/google/api
  • google-cloud-private_catalog-v1beta1/proto_docs/google/api
  • google-cloud-privileged_access_manager-v1/proto_docs/google/api
  • google-cloud-profiler-v2/proto_docs/google/api
  • google-cloud-rapid_migration_assessment-v1/proto_docs/google/api
  • google-cloud-recaptcha_enterprise-v1beta1/proto_docs/google/api
  • google-cloud-recaptcha_enterprise-v1/proto_docs/google/api
  • google-cloud-recommendation_engine-v1beta1/proto_docs/google/api
  • google-cloud-recommender-v1/proto_docs/google/api

google-cloud-os_login-v1/proto_docs/google/api/client.rb

Lines changed: 145 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ class Publishing
141141
#
142142
# Example of a YAML configuration::
143143
#
144-
# publishing:
145-
# java_settings:
146-
# library_package: com.google.cloud.pubsub.v1
144+
# publishing:
145+
# library_settings:
146+
# java_settings:
147+
# library_package: com.google.cloud.pubsub.v1
147148
# @!attribute [rw] service_class_names
148149
# @return [::Google::Protobuf::Map{::String => ::String}]
149150
# Configure the Java class name to use instead of the service's for its
@@ -155,11 +156,11 @@ class Publishing
155156
#
156157
# Example of a YAML configuration::
157158
#
158-
# publishing:
159-
# java_settings:
160-
# service_class_names:
161-
# - google.pubsub.v1.Publisher: TopicAdmin
162-
# - google.pubsub.v1.Subscriber: SubscriptionAdmin
159+
# publishing:
160+
# java_settings:
161+
# service_class_names:
162+
# - google.pubsub.v1.Publisher: TopicAdmin
163+
# - google.pubsub.v1.Subscriber: SubscriptionAdmin
163164
# @!attribute [rw] common
164165
# @return [::Google::Api::CommonLanguageSettings]
165166
# Some settings.
@@ -190,6 +191,20 @@ class CppSettings
190191
# @!attribute [rw] common
191192
# @return [::Google::Api::CommonLanguageSettings]
192193
# Some settings.
194+
# @!attribute [rw] library_package
195+
# @return [::String]
196+
# The package name to use in Php. Clobbers the php_namespace option
197+
# set in the protobuf. This should be used **only** by APIs
198+
# who have already set the language_settings.php.package_name" field
199+
# in gapic.yaml. API teams should use the protobuf php_namespace option
200+
# where possible.
201+
#
202+
# Example of a YAML configuration::
203+
#
204+
# publishing:
205+
# library_settings:
206+
# php_settings:
207+
# library_package: Google\Cloud\PubSub\V1
193208
class PhpSettings
194209
include ::Google::Protobuf::MessageExts
195210
extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -318,10 +333,12 @@ class RubySettings
318333
# service names and values are the name to be used for the service client
319334
# and call options.
320335
#
321-
# publishing:
322-
# go_settings:
323-
# renamed_services:
324-
# Publisher: TopicAdmin
336+
# Example:
337+
#
338+
# publishing:
339+
# go_settings:
340+
# renamed_services:
341+
# Publisher: TopicAdmin
325342
class GoSettings
326343
include ::Google::Protobuf::MessageExts
327344
extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -344,10 +361,10 @@ class RenamedServicesEntry
344361
#
345362
# Example:
346363
#
347-
# publishing:
348-
# method_settings:
349-
# - selector: google.storage.control.v2.StorageControl.CreateFolder
350-
# # method settings for CreateFolder...
364+
# publishing:
365+
# method_settings:
366+
# - selector: google.storage.control.v2.StorageControl.CreateFolder
367+
# # method settings for CreateFolder...
351368
# @!attribute [rw] long_running
352369
# @return [::Google::Api::MethodSettings::LongRunning]
353370
# Describes settings to use for long-running operations when generating
@@ -356,14 +373,14 @@ class RenamedServicesEntry
356373
#
357374
# Example of a YAML configuration::
358375
#
359-
# publishing:
360-
# method_settings:
361-
# - selector: google.cloud.speech.v2.Speech.BatchRecognize
362-
# long_running:
363-
# initial_poll_delay: 60s # 1 minute
364-
# poll_delay_multiplier: 1.5
365-
# max_poll_delay: 360s # 6 minutes
366-
# total_poll_timeout: 54000s # 90 minutes
376+
# publishing:
377+
# method_settings:
378+
# - selector: google.cloud.speech.v2.Speech.BatchRecognize
379+
# long_running:
380+
# initial_poll_delay: 60s # 1 minute
381+
# poll_delay_multiplier: 1.5
382+
# max_poll_delay: 360s # 6 minutes
383+
# total_poll_timeout: 54000s # 90 minutes
367384
# @!attribute [rw] auto_populated_fields
368385
# @return [::Array<::String>]
369386
# List of top-level fields of the request message, that should be
@@ -372,11 +389,24 @@ class RenamedServicesEntry
372389
#
373390
# Example of a YAML configuration:
374391
#
375-
# publishing:
376-
# method_settings:
377-
# - selector: google.example.v1.ExampleService.CreateExample
378-
# auto_populated_fields:
379-
# - request_id
392+
# publishing:
393+
# method_settings:
394+
# - selector: google.example.v1.ExampleService.CreateExample
395+
# auto_populated_fields:
396+
# - request_id
397+
# @!attribute [rw] batching
398+
# @return [::Google::Api::BatchingConfigProto]
399+
# Batching configuration for an API method in client libraries.
400+
#
401+
# Example of a YAML configuration:
402+
#
403+
# publishing:
404+
# method_settings:
405+
# - selector: google.example.v1.ExampleService.BatchCreateExample
406+
# batching:
407+
# element_count_threshold: 1000
408+
# request_byte_threshold: 100000000
409+
# delay_threshold_millis: 10
380410
class MethodSettings
381411
include ::Google::Protobuf::MessageExts
382412
extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -428,6 +458,77 @@ class SelectiveGapicGeneration
428458
extend ::Google::Protobuf::MessageExts::ClassMethods
429459
end
430460

461+
# `BatchingConfigProto` defines the batching configuration for an API method.
462+
# @!attribute [rw] thresholds
463+
# @return [::Google::Api::BatchingSettingsProto]
464+
# The thresholds which trigger a batched request to be sent.
465+
# @!attribute [rw] batch_descriptor
466+
# @return [::Google::Api::BatchingDescriptorProto]
467+
# The request and response fields used in batching.
468+
class BatchingConfigProto
469+
include ::Google::Protobuf::MessageExts
470+
extend ::Google::Protobuf::MessageExts::ClassMethods
471+
end
472+
473+
# `BatchingSettingsProto` specifies a set of batching thresholds, each of
474+
# which acts as a trigger to send a batch of messages as a request. At least
475+
# one threshold must be positive nonzero.
476+
# @!attribute [rw] element_count_threshold
477+
# @return [::Integer]
478+
# The number of elements of a field collected into a batch which, if
479+
# exceeded, causes the batch to be sent.
480+
# @!attribute [rw] request_byte_threshold
481+
# @return [::Integer]
482+
# The aggregated size of the batched field which, if exceeded, causes the
483+
# batch to be sent. This size is computed by aggregating the sizes of the
484+
# request field to be batched, not of the entire request message.
485+
# @!attribute [rw] delay_threshold
486+
# @return [::Google::Protobuf::Duration]
487+
# The duration after which a batch should be sent, starting from the addition
488+
# of the first message to that batch.
489+
# @!attribute [rw] element_count_limit
490+
# @return [::Integer]
491+
# The maximum number of elements collected in a batch that could be accepted
492+
# by server.
493+
# @!attribute [rw] request_byte_limit
494+
# @return [::Integer]
495+
# The maximum size of the request that could be accepted by server.
496+
# @!attribute [rw] flow_control_element_limit
497+
# @return [::Integer]
498+
# The maximum number of elements allowed by flow control.
499+
# @!attribute [rw] flow_control_byte_limit
500+
# @return [::Integer]
501+
# The maximum size of data allowed by flow control.
502+
# @!attribute [rw] flow_control_limit_exceeded_behavior
503+
# @return [::Google::Api::FlowControlLimitExceededBehaviorProto]
504+
# The behavior to take when the flow control limit is exceeded.
505+
class BatchingSettingsProto
506+
include ::Google::Protobuf::MessageExts
507+
extend ::Google::Protobuf::MessageExts::ClassMethods
508+
end
509+
510+
# `BatchingDescriptorProto` specifies the fields of the request message to be
511+
# used for batching, and, optionally, the fields of the response message to be
512+
# used for demultiplexing.
513+
# @!attribute [rw] batched_field
514+
# @return [::String]
515+
# The repeated field in the request message to be aggregated by batching.
516+
# @!attribute [rw] discriminator_fields
517+
# @return [::Array<::String>]
518+
# A list of the fields in the request message. Two requests will be batched
519+
# together only if the values of every field specified in
520+
# `request_discriminator_fields` is equal between the two requests.
521+
# @!attribute [rw] subresponse_field
522+
# @return [::String]
523+
# Optional. When present, indicates the field in the response message to be
524+
# used to demultiplex the response into multiple response messages, in
525+
# correspondence with the multiple request messages originally batched
526+
# together.
527+
class BatchingDescriptorProto
528+
include ::Google::Protobuf::MessageExts
529+
extend ::Google::Protobuf::MessageExts::ClassMethods
530+
end
531+
431532
# The organization for which the client libraries are being published.
432533
# Affects the url where generated docs are published, etc.
433534
module ClientLibraryOrganization
@@ -469,5 +570,20 @@ module ClientLibraryDestination
469570
# Publish the library to package managers like nuget.org and npmjs.com.
470571
PACKAGE_MANAGER = 20
471572
end
573+
574+
# The behavior to take when the flow control limit is exceeded.
575+
module FlowControlLimitExceededBehaviorProto
576+
# Default behavior, system-defined.
577+
UNSET_BEHAVIOR = 0
578+
579+
# Stop operation, raise error.
580+
THROW_EXCEPTION = 1
581+
582+
# Pause operation until limit clears.
583+
BLOCK = 2
584+
585+
# Continue operation, disregard limit.
586+
IGNORE = 3
587+
end
472588
end
473589
end

0 commit comments

Comments
 (0)