Skip to content

Commit

Permalink
feat: Add the managed disaster recovery API(https://cloud.google.com/…
Browse files Browse the repository at this point in the history
…bigquery/docs/managed-disaster-recovery)

feat: Add a new field `is_flat_rate` to `.google.cloud.bigquery.reservation.v1.CapacityCommitment` to distinguish between flat rate and edition commitments
docs: Clarify that `Autoscale.current_slots` in message `.google.cloud.bigquery.reservation.v1.Reservation` can temporarily be larger than `Autoscale.max_slots` if users reduce `Autoscale.max_slots`
docs: Update comment for `slot_capacity` in message `.google.cloud.bigquery.reservation.v1.Reservation` to provide more clarity about reservation baselines, committed slots and autoscaler SKU charges when the baseline exceeds committed slots
docs: Update comments for `commitment_start_time` and `commitment_end_time` in message `.google.cloud.bigquery.reservation.v1.CapacityCommitment` to provide details on how these values are affected by commitment renewal

PiperOrigin-RevId: 702079972

Source-Link: googleapis/googleapis@4743cf9

Source-Link: googleapis/googleapis-gen@30e9360
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQmlnUXVlcnkuUmVzZXJ2YXRpb24uVjEvLk93bEJvdC55YW1sIiwiaCI6IjMwZTkzNjAwMGJmYWI5OWJmMjg1NmJiODQ2YTUwZWIwZWUwMzg1YjcifQ==
  • Loading branch information
gcf-owl-bot[bot] committed Dec 3, 2024
1 parent cad74b5 commit 71d77b1
Show file tree
Hide file tree
Showing 9 changed files with 1,148 additions and 297 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright 2024 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
//
// https://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.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START bigqueryreservation_v1_generated_ReservationService_FailoverReservation_async]
using Google.Cloud.BigQuery.Reservation.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedReservationServiceClientSnippets
{
/// <summary>Snippet for FailoverReservationAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task FailoverReservationRequestObjectAsync()
{
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
FailoverReservationRequest request = new FailoverReservationRequest
{
ReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
Reservation response = await reservationServiceClient.FailoverReservationAsync(request);
}
}
// [END bigqueryreservation_v1_generated_ReservationService_FailoverReservation_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright 2024 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
//
// https://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.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync]
using Google.Cloud.BigQuery.Reservation.V1;

public sealed partial class GeneratedReservationServiceClientSnippets
{
/// <summary>Snippet for FailoverReservation</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void FailoverReservationRequestObject()
{
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
FailoverReservationRequest request = new FailoverReservationRequest
{
ReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
Reservation response = reservationServiceClient.FailoverReservation(request);
}
}
// [END bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync]
}
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,103 @@
}
]
},
{
"regionTag": "bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync",
"title": "FailoverReservationRequestObject",
"description": "Snippet for FailoverReservation",
"file": "ReservationServiceClient.FailoverReservationRequestObjectSnippet.g.cs",
"language": "C_SHARP",
"clientMethod": {
"shortName": "FailoverReservation",
"fullName": "Google.Cloud.BigQuery.Reservation.V1.ReservationServiceClient.FailoverReservation",
"parameters": [
{
"type": "Google.Cloud.BigQuery.Reservation.V1.FailoverReservationRequest",
"name": "request"
},
{
"type": "Google.Api.Gax.Grpc.CallSettings",
"name": "callSettings"
}
],
"resultType": "Google.Cloud.BigQuery.Reservation.V1.Reservation",
"client": {
"shortName": "ReservationServiceClient",
"fullName": "Google.Cloud.BigQuery.Reservation.V1.ReservationServiceClient"
},
"method": {
"shortName": "FailoverReservation",
"fullName": "google.cloud.bigquery.reservation.v1.ReservationService.FailoverReservation",
"service": {
"shortName": "ReservationService",
"fullName": "google.cloud.bigquery.reservation.v1.ReservationService"
}
}
},
"canonical": true,
"origin": "API_DEFINITION",
"segments": [
{
"start": 20,
"end": 44,
"type": "FULL"
},
{
"start": 34,
"end": 42,
"type": "SHORT"
}
]
},
{
"regionTag": "bigqueryreservation_v1_generated_ReservationService_FailoverReservation_async",
"title": "FailoverReservationRequestObjectAsync",
"description": "Snippet for FailoverReservationAsync",
"file": "ReservationServiceClient.FailoverReservationRequestObjectAsyncSnippet.g.cs",
"language": "C_SHARP",
"clientMethod": {
"shortName": "FailoverReservationAsync",
"fullName": "Google.Cloud.BigQuery.Reservation.V1.ReservationServiceClient.FailoverReservationAsync",
"async": true,
"parameters": [
{
"type": "Google.Cloud.BigQuery.Reservation.V1.FailoverReservationRequest",
"name": "request"
},
{
"type": "Google.Api.Gax.Grpc.CallSettings",
"name": "callSettings"
}
],
"resultType": "System.Threading.Tasks.Task<Google.Cloud.BigQuery.Reservation.V1.Reservation>",
"client": {
"shortName": "ReservationServiceClient",
"fullName": "Google.Cloud.BigQuery.Reservation.V1.ReservationServiceClient"
},
"method": {
"shortName": "FailoverReservation",
"fullName": "google.cloud.bigquery.reservation.v1.ReservationService.FailoverReservation",
"service": {
"shortName": "ReservationService",
"fullName": "google.cloud.bigquery.reservation.v1.ReservationService"
}
}
},
"canonical": true,
"origin": "API_DEFINITION",
"segments": [
{
"start": 20,
"end": 45,
"type": "FULL"
},
{
"start": 35,
"end": 43,
"type": "SHORT"
}
]
},
{
"regionTag": "bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync",
"title": "CreateCapacityCommitmentRequestObject",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,39 @@ public async Task UpdateReservationAsync()
// End snippet
}

/// <summary>Snippet for FailoverReservation</summary>
public void FailoverReservationRequestObject()
{
// Snippet: FailoverReservation(FailoverReservationRequest, CallSettings)
// Create client
ReservationServiceClient reservationServiceClient = ReservationServiceClient.Create();
// Initialize request argument(s)
FailoverReservationRequest request = new FailoverReservationRequest
{
ReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
Reservation response = reservationServiceClient.FailoverReservation(request);
// End snippet
}

/// <summary>Snippet for FailoverReservationAsync</summary>
public async Task FailoverReservationRequestObjectAsync()
{
// Snippet: FailoverReservationAsync(FailoverReservationRequest, CallSettings)
// Additional: FailoverReservationAsync(FailoverReservationRequest, CancellationToken)
// Create client
ReservationServiceClient reservationServiceClient = await ReservationServiceClient.CreateAsync();
// Initialize request argument(s)
FailoverReservationRequest request = new FailoverReservationRequest
{
ReservationName = ReservationName.FromProjectLocationReservation("[PROJECT]", "[LOCATION]", "[RESERVATION]"),
};
// Make the request
Reservation response = await reservationServiceClient.FailoverReservationAsync(request);
// End snippet
}

/// <summary>Snippet for CreateCapacityCommitment</summary>
public void CreateCapacityCommitmentRequestObject()
{
Expand Down
Loading

0 comments on commit 71d77b1

Please sign in to comment.