@@ -79,6 +79,39 @@ public final class Reservation extends com.google.api.client.json.GenericJson {
7979 @ com .google .api .client .util .Key
8080 private java .util .Map <String , java .lang .String > labels ;
8181
82+ /**
83+ * Optional. The overall max slots for the reservation, covering slot_capacity (baseline), idle
84+ * slots (if ignore_idle_slots is false) and scaled slots. If present, the reservation won't use
85+ * more than the specified number of slots, even if there is demand and supply (from idle slots).
86+ * NOTE: capping a reservation's idle slot usage is best effort and its usage may exceed the
87+ * max_slots value. However, in terms of autoscale.current_slots (which accounts for the
88+ * additional added slots), it will never exceed the max_slots - baseline. This field must be set
89+ * together with the scaling_mode enum value, otherwise the request will be rejected with error
90+ * code `google.rpc.Code.INVALID_ARGUMENT`. If the max_slots and scaling_mode are set, the
91+ * autoscale or autoscale.max_slots field must be unset. Otherwise the request will be rejected
92+ * with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the autoscale field may still be
93+ * in the output. The autopscale.max_slots will always show as 0 and the autoscaler.current_slots
94+ * will represent the current slots from autoscaler excluding idle slots. For example, if the
95+ * max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, then in the output, the
96+ * autoscaler.max_slots will be 0 and the autoscaler.current_slots may be any value between 0 and
97+ * 1000. If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 and idle slots
98+ * usage is 200, then in the output, the autoscaler.max_slots will be 0 and the
99+ * autoscaler.current_slots will not be higher than 700. If the max_slots is 1000, scaling_mode is
100+ * IDLE_SLOTS_ONLY, then in the output, the autoscaler field will be null. If the max_slots and
101+ * scaling_mode are set, then the ignore_idle_slots field must be aligned with the scaling_mode
102+ * enum value.(See details in ScalingMode comments). Otherwise the request will be rejected with
103+ * error code `google.rpc.Code.INVALID_ARGUMENT`. Please note, the max_slots is for user to manage
104+ * the part of slots greater than the baseline. Therefore, we don't allow users to set max_slots
105+ * smaller or equal to the baseline as it will not be meaningful. If the field is present and
106+ * slot_capacity>=max_slots, requests will be rejected with error code
107+ * `google.rpc.Code.INVALID_ARGUMENT`. Please note that if max_slots is set to 0, we will treat it
108+ * as unset. Customers can set max_slots to 0 and set scaling_mode to SCALING_MODE_UNSPECIFIED to
109+ * disable the max_slots feature.
110+ * The value may be {@code null}.
111+ */
112+ @ com .google .api .client .util .Key @ com .google .api .client .json .JsonString
113+ private java .lang .Long maxSlots ;
114+
82115 /**
83116 * Applicable only for reservations located within one of the BigQuery multi-regions (US or EU).
84117 * If set to true, this reservation is placed in the organization's secondary region which is
@@ -126,6 +159,14 @@ public final class Reservation extends com.google.api.client.json.GenericJson {
126159 @ com .google .api .client .util .Key
127160 private ReplicationStatus replicationStatus ;
128161
162+ /**
163+ * The scaling mode for the reservation. If the field is present but max_slots is not present,
164+ * requests will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`.
165+ * The value may be {@code null}.
166+ */
167+ @ com .google .api .client .util .Key
168+ private java .lang .String scalingMode ;
169+
129170 /**
130171 * Optional. The current location of the reservation's secondary replica. This field is only set
131172 * for reservations using the managed disaster recovery feature. Users can set this in create
@@ -274,6 +315,75 @@ public Reservation setLabels(java.util.Map<String, java.lang.String> labels) {
274315 return this ;
275316 }
276317
318+ /**
319+ * Optional. The overall max slots for the reservation, covering slot_capacity (baseline), idle
320+ * slots (if ignore_idle_slots is false) and scaled slots. If present, the reservation won't use
321+ * more than the specified number of slots, even if there is demand and supply (from idle slots).
322+ * NOTE: capping a reservation's idle slot usage is best effort and its usage may exceed the
323+ * max_slots value. However, in terms of autoscale.current_slots (which accounts for the
324+ * additional added slots), it will never exceed the max_slots - baseline. This field must be set
325+ * together with the scaling_mode enum value, otherwise the request will be rejected with error
326+ * code `google.rpc.Code.INVALID_ARGUMENT`. If the max_slots and scaling_mode are set, the
327+ * autoscale or autoscale.max_slots field must be unset. Otherwise the request will be rejected
328+ * with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the autoscale field may still be
329+ * in the output. The autopscale.max_slots will always show as 0 and the autoscaler.current_slots
330+ * will represent the current slots from autoscaler excluding idle slots. For example, if the
331+ * max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, then in the output, the
332+ * autoscaler.max_slots will be 0 and the autoscaler.current_slots may be any value between 0 and
333+ * 1000. If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 and idle slots
334+ * usage is 200, then in the output, the autoscaler.max_slots will be 0 and the
335+ * autoscaler.current_slots will not be higher than 700. If the max_slots is 1000, scaling_mode is
336+ * IDLE_SLOTS_ONLY, then in the output, the autoscaler field will be null. If the max_slots and
337+ * scaling_mode are set, then the ignore_idle_slots field must be aligned with the scaling_mode
338+ * enum value.(See details in ScalingMode comments). Otherwise the request will be rejected with
339+ * error code `google.rpc.Code.INVALID_ARGUMENT`. Please note, the max_slots is for user to manage
340+ * the part of slots greater than the baseline. Therefore, we don't allow users to set max_slots
341+ * smaller or equal to the baseline as it will not be meaningful. If the field is present and
342+ * slot_capacity>=max_slots, requests will be rejected with error code
343+ * `google.rpc.Code.INVALID_ARGUMENT`. Please note that if max_slots is set to 0, we will treat it
344+ * as unset. Customers can set max_slots to 0 and set scaling_mode to SCALING_MODE_UNSPECIFIED to
345+ * disable the max_slots feature.
346+ * @return value or {@code null} for none
347+ */
348+ public java .lang .Long getMaxSlots () {
349+ return maxSlots ;
350+ }
351+
352+ /**
353+ * Optional. The overall max slots for the reservation, covering slot_capacity (baseline), idle
354+ * slots (if ignore_idle_slots is false) and scaled slots. If present, the reservation won't use
355+ * more than the specified number of slots, even if there is demand and supply (from idle slots).
356+ * NOTE: capping a reservation's idle slot usage is best effort and its usage may exceed the
357+ * max_slots value. However, in terms of autoscale.current_slots (which accounts for the
358+ * additional added slots), it will never exceed the max_slots - baseline. This field must be set
359+ * together with the scaling_mode enum value, otherwise the request will be rejected with error
360+ * code `google.rpc.Code.INVALID_ARGUMENT`. If the max_slots and scaling_mode are set, the
361+ * autoscale or autoscale.max_slots field must be unset. Otherwise the request will be rejected
362+ * with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the autoscale field may still be
363+ * in the output. The autopscale.max_slots will always show as 0 and the autoscaler.current_slots
364+ * will represent the current slots from autoscaler excluding idle slots. For example, if the
365+ * max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, then in the output, the
366+ * autoscaler.max_slots will be 0 and the autoscaler.current_slots may be any value between 0 and
367+ * 1000. If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 and idle slots
368+ * usage is 200, then in the output, the autoscaler.max_slots will be 0 and the
369+ * autoscaler.current_slots will not be higher than 700. If the max_slots is 1000, scaling_mode is
370+ * IDLE_SLOTS_ONLY, then in the output, the autoscaler field will be null. If the max_slots and
371+ * scaling_mode are set, then the ignore_idle_slots field must be aligned with the scaling_mode
372+ * enum value.(See details in ScalingMode comments). Otherwise the request will be rejected with
373+ * error code `google.rpc.Code.INVALID_ARGUMENT`. Please note, the max_slots is for user to manage
374+ * the part of slots greater than the baseline. Therefore, we don't allow users to set max_slots
375+ * smaller or equal to the baseline as it will not be meaningful. If the field is present and
376+ * slot_capacity>=max_slots, requests will be rejected with error code
377+ * `google.rpc.Code.INVALID_ARGUMENT`. Please note that if max_slots is set to 0, we will treat it
378+ * as unset. Customers can set max_slots to 0 and set scaling_mode to SCALING_MODE_UNSPECIFIED to
379+ * disable the max_slots feature.
380+ * @param maxSlots maxSlots or {@code null} for none
381+ */
382+ public Reservation setMaxSlots (java .lang .Long maxSlots ) {
383+ this .maxSlots = maxSlots ;
384+ return this ;
385+ }
386+
277387 /**
278388 * Applicable only for reservations located within one of the BigQuery multi-regions (US or EU).
279389 * If set to true, this reservation is placed in the organization's secondary region which is
@@ -383,6 +493,25 @@ public Reservation setReplicationStatus(ReplicationStatus replicationStatus) {
383493 return this ;
384494 }
385495
496+ /**
497+ * The scaling mode for the reservation. If the field is present but max_slots is not present,
498+ * requests will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`.
499+ * @return value or {@code null} for none
500+ */
501+ public java .lang .String getScalingMode () {
502+ return scalingMode ;
503+ }
504+
505+ /**
506+ * The scaling mode for the reservation. If the field is present but max_slots is not present,
507+ * requests will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`.
508+ * @param scalingMode scalingMode or {@code null} for none
509+ */
510+ public Reservation setScalingMode (java .lang .String scalingMode ) {
511+ this .scalingMode = scalingMode ;
512+ return this ;
513+ }
514+
386515 /**
387516 * Optional. The current location of the reservation's secondary replica. This field is only set
388517 * for reservations using the managed disaster recovery feature. Users can set this in create
0 commit comments