Skip to content

Commit f3f636e

Browse files
feat: Automated regeneration of bigqueryreservation v1 client (googleapis#21931)
Auto-created at 2025-03-02 10:16:42 +0000 using the toys pull request generator.
1 parent 1a98819 commit f3f636e

File tree

5 files changed

+52
-3
lines changed

5 files changed

+52
-3
lines changed

api_names_out.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50780,11 +50780,13 @@
5078050780
"/bigqueryreservation:v1/Reservation/ignoreIdleSlots": ignore_idle_slots
5078150781
"/bigqueryreservation:v1/Reservation/labels": labels
5078250782
"/bigqueryreservation:v1/Reservation/labels/label": label
50783+
"/bigqueryreservation:v1/Reservation/maxSlots": max_slots
5078350784
"/bigqueryreservation:v1/Reservation/multiRegionAuxiliary": multi_region_auxiliary
5078450785
"/bigqueryreservation:v1/Reservation/name": name
5078550786
"/bigqueryreservation:v1/Reservation/originalPrimaryLocation": original_primary_location
5078650787
"/bigqueryreservation:v1/Reservation/primaryLocation": primary_location
5078750788
"/bigqueryreservation:v1/Reservation/replicationStatus": replication_status
50789+
"/bigqueryreservation:v1/Reservation/scalingMode": scaling_mode
5078850790
"/bigqueryreservation:v1/Reservation/secondaryLocation": secondary_location
5078950791
"/bigqueryreservation:v1/Reservation/slotCapacity": slot_capacity
5079050792
"/bigqueryreservation:v1/Reservation/updateTime": update_time

generated/google-apis-bigqueryreservation_v1/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Release history for google-apis-bigqueryreservation_v1
22

3-
### v0.41.0 (2025-02-26)
3+
### v0.41.0 (2025-03-02)
44

5-
* Regenerated from discovery document revision 20250211
5+
* Regenerated from discovery document revision 20250218
66

77
### v0.40.0 (2025-01-12)
88

generated/google-apis-bigqueryreservation_v1/lib/google/apis/bigqueryreservation_v1/classes.rb

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,42 @@ class Reservation
506506
# @return [Hash<String,String>]
507507
attr_accessor :labels
508508

509+
# Optional. The overall max slots for the reservation, covering slot_capacity (
510+
# baseline), idle slots (if ignore_idle_slots is false) and scaled slots. If
511+
# present, the reservation won't use more than the specified number of slots,
512+
# even if there is demand and supply (from idle slots). NOTE: capping a
513+
# reservation's idle slot usage is best effort and its usage may exceed the
514+
# max_slots value. However, in terms of autoscale.current_slots (which accounts
515+
# for the additional added slots), it will never exceed the max_slots - baseline.
516+
# This field must be set together with the scaling_mode enum value, otherwise
517+
# the request will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`
518+
# . If the max_slots and scaling_mode are set, the autoscale or autoscale.
519+
# max_slots field must be unset. Otherwise the request will be rejected with
520+
# error code `google.rpc.Code.INVALID_ARGUMENT`. However, the autoscale field
521+
# may still be in the output. The autopscale.max_slots will always show as 0 and
522+
# the autoscaler.current_slots will represent the current slots from autoscaler
523+
# excluding idle slots. For example, if the max_slots is 1000 and scaling_mode
524+
# is AUTOSCALE_ONLY, then in the output, the autoscaler.max_slots will be 0 and
525+
# the autoscaler.current_slots may be any value between 0 and 1000. If the
526+
# max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 and idle
527+
# slots usage is 200, then in the output, the autoscaler.max_slots will be 0 and
528+
# the autoscaler.current_slots will not be higher than 700. If the max_slots is
529+
# 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the output, the autoscaler
530+
# field will be null. If the max_slots and scaling_mode are set, then the
531+
# ignore_idle_slots field must be aligned with the scaling_mode enum value.(See
532+
# details in ScalingMode comments). Otherwise the request will be rejected with
533+
# error code `google.rpc.Code.INVALID_ARGUMENT`. Please note, the max_slots is
534+
# for user to manage the part of slots greater than the baseline. Therefore, we
535+
# don't allow users to set max_slots smaller or equal to the baseline as it will
536+
# not be meaningful. If the field is present and slot_capacity>=max_slots,
537+
# requests will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`.
538+
# Please note that if max_slots is set to 0, we will treat it as unset.
539+
# Customers can set max_slots to 0 and set scaling_mode to
540+
# SCALING_MODE_UNSPECIFIED to disable the max_slots feature.
541+
# Corresponds to the JSON property `maxSlots`
542+
# @return [Fixnum]
543+
attr_accessor :max_slots
544+
509545
# Applicable only for reservations located within one of the BigQuery multi-
510546
# regions (US or EU). If set to true, this reservation is placed in the
511547
# organization's secondary region which is designated for disaster recovery
@@ -543,6 +579,13 @@ class Reservation
543579
# @return [Google::Apis::BigqueryreservationV1::ReplicationStatus]
544580
attr_accessor :replication_status
545581

582+
# The scaling mode for the reservation. If the field is present but max_slots is
583+
# not present, requests will be rejected with error code `google.rpc.Code.
584+
# INVALID_ARGUMENT`.
585+
# Corresponds to the JSON property `scalingMode`
586+
# @return [String]
587+
attr_accessor :scaling_mode
588+
546589
# Optional. The current location of the reservation's secondary replica. This
547590
# field is only set for reservations using the managed disaster recovery feature.
548591
# Users can set this in create reservation calls to create a failover
@@ -584,11 +627,13 @@ def update!(**args)
584627
@edition = args[:edition] if args.key?(:edition)
585628
@ignore_idle_slots = args[:ignore_idle_slots] if args.key?(:ignore_idle_slots)
586629
@labels = args[:labels] if args.key?(:labels)
630+
@max_slots = args[:max_slots] if args.key?(:max_slots)
587631
@multi_region_auxiliary = args[:multi_region_auxiliary] if args.key?(:multi_region_auxiliary)
588632
@name = args[:name] if args.key?(:name)
589633
@original_primary_location = args[:original_primary_location] if args.key?(:original_primary_location)
590634
@primary_location = args[:primary_location] if args.key?(:primary_location)
591635
@replication_status = args[:replication_status] if args.key?(:replication_status)
636+
@scaling_mode = args[:scaling_mode] if args.key?(:scaling_mode)
592637
@secondary_location = args[:secondary_location] if args.key?(:secondary_location)
593638
@slot_capacity = args[:slot_capacity] if args.key?(:slot_capacity)
594639
@update_time = args[:update_time] if args.key?(:update_time)

generated/google-apis-bigqueryreservation_v1/lib/google/apis/bigqueryreservation_v1/gem_version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module BigqueryreservationV1
2222
GENERATOR_VERSION = "0.16.0"
2323

2424
# Revision of the discovery document this client was generated from
25-
REVISION = "20250211"
25+
REVISION = "20250218"
2626
end
2727
end
2828
end

generated/google-apis-bigqueryreservation_v1/lib/google/apis/bigqueryreservation_v1/representations.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,14 @@ class Representation < Google::Apis::Core::JsonRepresentation
259259
property :edition, as: 'edition'
260260
property :ignore_idle_slots, as: 'ignoreIdleSlots'
261261
hash :labels, as: 'labels'
262+
property :max_slots, :numeric_string => true, as: 'maxSlots'
262263
property :multi_region_auxiliary, as: 'multiRegionAuxiliary'
263264
property :name, as: 'name'
264265
property :original_primary_location, as: 'originalPrimaryLocation'
265266
property :primary_location, as: 'primaryLocation'
266267
property :replication_status, as: 'replicationStatus', class: Google::Apis::BigqueryreservationV1::ReplicationStatus, decorator: Google::Apis::BigqueryreservationV1::ReplicationStatus::Representation
267268

269+
property :scaling_mode, as: 'scalingMode'
268270
property :secondary_location, as: 'secondaryLocation'
269271
property :slot_capacity, :numeric_string => true, as: 'slotCapacity'
270272
property :update_time, as: 'updateTime'

0 commit comments

Comments
 (0)