@@ -762,6 +762,140 @@ def update!(**args)
762762 end
763763 end
764764
765+ # `BatchingConfigProto` defines the batching configuration for an API method.
766+ class BatchingConfigProto
767+ include Google ::Apis ::Core ::Hashable
768+
769+ # `BatchingDescriptorProto` specifies the fields of the request message to be
770+ # used for batching, and, optionally, the fields of the response message to be
771+ # used for demultiplexing.
772+ # Corresponds to the JSON property `batchDescriptor`
773+ # @return [Google::Apis::ServiceusageV1::BatchingDescriptorProto]
774+ attr_accessor :batch_descriptor
775+
776+ # `BatchingSettingsProto` specifies a set of batching thresholds, each of which
777+ # acts as a trigger to send a batch of messages as a request. At least one
778+ # threshold must be positive nonzero.
779+ # Corresponds to the JSON property `thresholds`
780+ # @return [Google::Apis::ServiceusageV1::BatchingSettingsProto]
781+ attr_accessor :thresholds
782+
783+ def initialize ( **args )
784+ update! ( **args )
785+ end
786+
787+ # Update properties of this object
788+ def update! ( **args )
789+ @batch_descriptor = args [ :batch_descriptor ] if args . key? ( :batch_descriptor )
790+ @thresholds = args [ :thresholds ] if args . key? ( :thresholds )
791+ end
792+ end
793+
794+ # `BatchingDescriptorProto` specifies the fields of the request message to be
795+ # used for batching, and, optionally, the fields of the response message to be
796+ # used for demultiplexing.
797+ class BatchingDescriptorProto
798+ include Google ::Apis ::Core ::Hashable
799+
800+ # The repeated field in the request message to be aggregated by batching.
801+ # Corresponds to the JSON property `batchedField`
802+ # @return [String]
803+ attr_accessor :batched_field
804+
805+ # A list of the fields in the request message. Two requests will be batched
806+ # together only if the values of every field specified in `
807+ # request_discriminator_fields` is equal between the two requests.
808+ # Corresponds to the JSON property `discriminatorFields`
809+ # @return [Array<String>]
810+ attr_accessor :discriminator_fields
811+
812+ # Optional. When present, indicates the field in the response message to be used
813+ # to demultiplex the response into multiple response messages, in correspondence
814+ # with the multiple request messages originally batched together.
815+ # Corresponds to the JSON property `subresponseField`
816+ # @return [String]
817+ attr_accessor :subresponse_field
818+
819+ def initialize ( **args )
820+ update! ( **args )
821+ end
822+
823+ # Update properties of this object
824+ def update! ( **args )
825+ @batched_field = args [ :batched_field ] if args . key? ( :batched_field )
826+ @discriminator_fields = args [ :discriminator_fields ] if args . key? ( :discriminator_fields )
827+ @subresponse_field = args [ :subresponse_field ] if args . key? ( :subresponse_field )
828+ end
829+ end
830+
831+ # `BatchingSettingsProto` specifies a set of batching thresholds, each of which
832+ # acts as a trigger to send a batch of messages as a request. At least one
833+ # threshold must be positive nonzero.
834+ class BatchingSettingsProto
835+ include Google ::Apis ::Core ::Hashable
836+
837+ # The duration after which a batch should be sent, starting from the addition of
838+ # the first message to that batch.
839+ # Corresponds to the JSON property `delayThreshold`
840+ # @return [String]
841+ attr_accessor :delay_threshold
842+
843+ # The maximum number of elements collected in a batch that could be accepted by
844+ # server.
845+ # Corresponds to the JSON property `elementCountLimit`
846+ # @return [Fixnum]
847+ attr_accessor :element_count_limit
848+
849+ # The number of elements of a field collected into a batch which, if exceeded,
850+ # causes the batch to be sent.
851+ # Corresponds to the JSON property `elementCountThreshold`
852+ # @return [Fixnum]
853+ attr_accessor :element_count_threshold
854+
855+ # The maximum size of data allowed by flow control.
856+ # Corresponds to the JSON property `flowControlByteLimit`
857+ # @return [Fixnum]
858+ attr_accessor :flow_control_byte_limit
859+
860+ # The maximum number of elements allowed by flow control.
861+ # Corresponds to the JSON property `flowControlElementLimit`
862+ # @return [Fixnum]
863+ attr_accessor :flow_control_element_limit
864+
865+ # The behavior to take when the flow control limit is exceeded.
866+ # Corresponds to the JSON property `flowControlLimitExceededBehavior`
867+ # @return [String]
868+ attr_accessor :flow_control_limit_exceeded_behavior
869+
870+ # The maximum size of the request that could be accepted by server.
871+ # Corresponds to the JSON property `requestByteLimit`
872+ # @return [Fixnum]
873+ attr_accessor :request_byte_limit
874+
875+ # The aggregated size of the batched field which, if exceeded, causes the batch
876+ # to be sent. This size is computed by aggregating the sizes of the request
877+ # field to be batched, not of the entire request message.
878+ # Corresponds to the JSON property `requestByteThreshold`
879+ # @return [Fixnum]
880+ attr_accessor :request_byte_threshold
881+
882+ def initialize ( **args )
883+ update! ( **args )
884+ end
885+
886+ # Update properties of this object
887+ def update! ( **args )
888+ @delay_threshold = args [ :delay_threshold ] if args . key? ( :delay_threshold )
889+ @element_count_limit = args [ :element_count_limit ] if args . key? ( :element_count_limit )
890+ @element_count_threshold = args [ :element_count_threshold ] if args . key? ( :element_count_threshold )
891+ @flow_control_byte_limit = args [ :flow_control_byte_limit ] if args . key? ( :flow_control_byte_limit )
892+ @flow_control_element_limit = args [ :flow_control_element_limit ] if args . key? ( :flow_control_element_limit )
893+ @flow_control_limit_exceeded_behavior = args [ :flow_control_limit_exceeded_behavior ] if args . key? ( :flow_control_limit_exceeded_behavior )
894+ @request_byte_limit = args [ :request_byte_limit ] if args . key? ( :request_byte_limit )
895+ @request_byte_threshold = args [ :request_byte_threshold ] if args . key? ( :request_byte_threshold )
896+ end
897+ end
898+
765899 # Billing related configuration of the service. The following example shows how
766900 # to configure monitored resources and metrics for billing, `
767901 # consumer_destinations` is the only supported destination and the monitored
@@ -3696,6 +3830,11 @@ class MethodSettings
36963830 # @return [Array<String>]
36973831 attr_accessor :auto_populated_fields
36983832
3833+ # `BatchingConfigProto` defines the batching configuration for an API method.
3834+ # Corresponds to the JSON property `batching`
3835+ # @return [Google::Apis::ServiceusageV1::BatchingConfigProto]
3836+ attr_accessor :batching
3837+
36993838 # Describes settings to use when generating API methods that use the long-
37003839 # running operation pattern. All default values below are from those used in the
37013840 # client library generators (e.g. [Java](https://github.com/googleapis/gapic-
@@ -3720,6 +3859,7 @@ def initialize(**args)
37203859 # Update properties of this object
37213860 def update! ( **args )
37223861 @auto_populated_fields = args [ :auto_populated_fields ] if args . key? ( :auto_populated_fields )
3862+ @batching = args [ :batching ] if args . key? ( :batching )
37233863 @long_running = args [ :long_running ] if args . key? ( :long_running )
37243864 @selector = args [ :selector ] if args . key? ( :selector )
37253865 end
0 commit comments