Skip to content

Commit

Permalink
feat: Automated regeneration of BigQueryReservation client (#10891)
Browse files Browse the repository at this point in the history
Auto-created at 2024-03-12 01:33:46 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Mar 12, 2024
1 parent 92ad345 commit 2889514
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.BigQueryReservation.V1 do
API client metadata for GoogleApi.BigQueryReservation.V1.
"""

@discovery_revision "20221016"
@discovery_revision "20240306"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BigQueryReservation.V1.Model.Autoscale do
@moduledoc """
Auto scaling settings.
## Attributes
* `currentSlots` (*type:* `String.t`, *default:* `nil`) - Output only. The slot capacity added to this reservation when autoscale happens. Will be between [0, max_slots].
* `maxSlots` (*type:* `String.t`, *default:* `nil`) - Number of slots to be scaled when needed.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:currentSlots => String.t() | nil,
:maxSlots => String.t() | nil
}

field(:currentSlots)
field(:maxSlots)
end

defimpl Poison.Decoder, for: GoogleApi.BigQueryReservation.V1.Model.Autoscale do
def decode(value, options) do
GoogleApi.BigQueryReservation.V1.Model.Autoscale.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.BigQueryReservation.V1.Model.Autoscale do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ defmodule GoogleApi.BigQueryReservation.V1.Model.CapacityCommitment do
* `commitmentEndTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
* `commitmentStartTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
* `edition` (*type:* `String.t`, *default:* `nil`) - Edition of the capacity commitment.
* `failureStatus` (*type:* `GoogleApi.BigQueryReservation.V1.Model.Status.t`, *default:* `nil`) - Output only. For FAILED commitment plan, provides the reason of failure.
* `multiRegionAuxiliary` (*type:* `boolean()`, *default:* `nil`) - Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization's default region.
* `isFlatRate` (*type:* `boolean()`, *default:* `nil`) - Output only. If true, the commitment is a flat-rate commitment, otherwise, it's an edition commitment.
* `multiRegionAuxiliary` (*type:* `boolean()`, *default:* `nil`) - Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization's default region. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
* `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
* `plan` (*type:* `String.t`, *default:* `nil`) - Capacity commitment commitment plan.
* `renewalPlan` (*type:* `String.t`, *default:* `nil`) - The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
Expand All @@ -37,7 +39,9 @@ defmodule GoogleApi.BigQueryReservation.V1.Model.CapacityCommitment do
@type t :: %__MODULE__{
:commitmentEndTime => DateTime.t() | nil,
:commitmentStartTime => DateTime.t() | nil,
:edition => String.t() | nil,
:failureStatus => GoogleApi.BigQueryReservation.V1.Model.Status.t() | nil,
:isFlatRate => boolean() | nil,
:multiRegionAuxiliary => boolean() | nil,
:name => String.t() | nil,
:plan => String.t() | nil,
Expand All @@ -48,7 +52,9 @@ defmodule GoogleApi.BigQueryReservation.V1.Model.CapacityCommitment do

field(:commitmentEndTime, as: DateTime)
field(:commitmentStartTime, as: DateTime)
field(:edition)
field(:failureStatus, as: GoogleApi.BigQueryReservation.V1.Model.Status)
field(:isFlatRate)
field(:multiRegionAuxiliary)
field(:name)
field(:plan)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ defmodule GoogleApi.BigQueryReservation.V1.Model.MoveAssignmentRequest do
## Attributes
* `assignmentId` (*type:* `String.t`, *default:* `nil`) - The optional assignment ID. A new assignment name is generated if this field is empty. This field can contain only lowercase alphanumeric characters or dashes. Max length is 64 characters.
* `destinationId` (*type:* `String.t`, *default:* `nil`) - The new reservation ID, e.g.: `projects/myotherproject/locations/US/reservations/team2-prod`
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:assignmentId => String.t() | nil,
:destinationId => String.t() | nil
}

field(:assignmentId)
field(:destinationId)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,35 @@ defmodule GoogleApi.BigQueryReservation.V1.Model.Reservation do
## Attributes
* `concurrency` (*type:* `String.t`, *default:* `nil`) - Job concurrency target which sets a soft upper bound on the number of jobs that can run concurrently in this reservation. This is a soft target due to asynchronous nature of the system and various optimizations for small queries. Default value is 0 which means that concurrency target will be automatically computed by the system. NOTE: this field is exposed as `target_job_concurrency` in the Information Schema, DDL and BQ CLI.
* `autoscale` (*type:* `GoogleApi.BigQueryReservation.V1.Model.Autoscale.t`, *default:* `nil`) - The configuration parameters for the auto scaling feature.
* `concurrency` (*type:* `String.t`, *default:* `nil`) - Job concurrency target which sets a soft upper bound on the number of jobs that can run concurrently in this reservation. This is a soft target due to asynchronous nature of the system and various optimizations for small queries. Default value is 0 which means that concurrency target will be automatically computed by the system. NOTE: this field is exposed as target job concurrency in the Information Schema, DDL and BQ CLI.
* `creationTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Creation time of the reservation.
* `edition` (*type:* `String.t`, *default:* `nil`) - Edition of the reservation.
* `ignoreIdleSlots` (*type:* `boolean()`, *default:* `nil`) - If false, any query or pipeline job using this reservation will use idle slots from other reservations within the same admin project. If true, a query or pipeline job using this reservation will execute with the slot capacity specified in the slot_capacity field at most.
* `multiRegionAuxiliary` (*type:* `boolean()`, *default:* `nil`) - Applicable only for reservations located within one of the BigQuery multi-regions (US or EU). If set to true, this reservation is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this reservation is placed in the organization's default region.
* `multiRegionAuxiliary` (*type:* `boolean()`, *default:* `nil`) - Applicable only for reservations located within one of the BigQuery multi-regions (US or EU). If set to true, this reservation is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this reservation is placed in the organization's default region. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
* `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the reservation, e.g., `projects/*/locations/*/reservations/team1-prod`. The reservation_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
* `slotCapacity` (*type:* `String.t`, *default:* `nil`) - Minimum slots available to this reservation. A slot is a unit of computational power in BigQuery, and serves as the unit of parallelism. Queries using this reservation might use more slots during runtime if ignore_idle_slots is set to false. If total slot_capacity of the reservation and its siblings exceeds the total slot_count of all capacity commitments, the request will fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. NOTE: for reservations in US or EU multi-regions, slot capacity constraints are checked separately for default and auxiliary regions. See multi_region_auxiliary flag for more details.
* `slotCapacity` (*type:* `String.t`, *default:* `nil`) - Baseline slots available to this reservation. A slot is a unit of computational power in BigQuery, and serves as the unit of parallelism. Queries using this reservation might use more slots during runtime if ignore_idle_slots is set to false, or autoscaling is enabled. If edition is EDITION_UNSPECIFIED and total slot_capacity of the reservation and its siblings exceeds the total slot_count of all capacity commitments, the request will fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. If edition is any value but EDITION_UNSPECIFIED, then the above requirement is not needed. The total slot_capacity of the reservation and its siblings may exceed the total slot_count of capacity commitments. In that case, the exceeding slots will be charged with the autoscale SKU. You can increase the number of baseline slots in a reservation every few minutes. If you want to decrease your baseline slots, you are limited to once an hour if you have recently changed your baseline slot capacity and your baseline slots exceed your committed slots. Otherwise, you can decrease your baseline slots every few minutes.
* `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Last update time of the reservation.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:autoscale => GoogleApi.BigQueryReservation.V1.Model.Autoscale.t() | nil,
:concurrency => String.t() | nil,
:creationTime => DateTime.t() | nil,
:edition => String.t() | nil,
:ignoreIdleSlots => boolean() | nil,
:multiRegionAuxiliary => boolean() | nil,
:name => String.t() | nil,
:slotCapacity => String.t() | nil,
:updateTime => DateTime.t() | nil
}

field(:autoscale, as: GoogleApi.BigQueryReservation.V1.Model.Autoscale)
field(:concurrency)
field(:creationTime, as: DateTime)
field(:edition)
field(:ignoreIdleSlots)
field(:multiRegionAuxiliary)
field(:name)
Expand Down

0 comments on commit 2889514

Please sign in to comment.