-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added REGIONAL tier support in the v1 API
PiperOrigin-RevId: 582440290 Source-Link: googleapis/googleapis@d30f933 Source-Link: googleapis/googleapis-gen@7872d2e Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRmlsZXN0b3JlLlYxLy5Pd2xCb3QueWFtbCIsImgiOiI3ODcyZDJlNzU5YTY3OWI4YjM1ZjkzOTkxYWJiNjEyMDEwMmM5MDk1In0=
- Loading branch information
1 parent
48009d9
commit e6cd7ec
Showing
13 changed files
with
1,104 additions
and
199 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
...eneratedSnippets/CloudFilestoreManagerClient.RevertInstanceRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Copyright 2023 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 file_v1_generated_CloudFilestoreManager_RevertInstance_async] | ||
using Google.Cloud.Common; | ||
using Google.Cloud.Filestore.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedCloudFilestoreManagerClientSnippets | ||
{ | ||
/// <summary>Snippet for RevertInstanceAsync</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 RevertInstanceRequestObjectAsync() | ||
{ | ||
// Create client | ||
CloudFilestoreManagerClient cloudFilestoreManagerClient = await CloudFilestoreManagerClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
RevertInstanceRequest request = new RevertInstanceRequest | ||
{ | ||
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), | ||
TargetSnapshotId = "", | ||
}; | ||
// Make the request | ||
Operation<Instance, OperationMetadata> response = await cloudFilestoreManagerClient.RevertInstanceAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
Instance result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<Instance, OperationMetadata> retrievedResponse = await cloudFilestoreManagerClient.PollOnceRevertInstanceAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Instance retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END file_v1_generated_CloudFilestoreManager_RevertInstance_async] | ||
} |
65 changes: 65 additions & 0 deletions
65
....V1.GeneratedSnippets/CloudFilestoreManagerClient.RevertInstanceRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Copyright 2023 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 file_v1_generated_CloudFilestoreManager_RevertInstance_sync] | ||
using Google.Cloud.Common; | ||
using Google.Cloud.Filestore.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedCloudFilestoreManagerClientSnippets | ||
{ | ||
/// <summary>Snippet for RevertInstance</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 RevertInstanceRequestObject() | ||
{ | ||
// Create client | ||
CloudFilestoreManagerClient cloudFilestoreManagerClient = CloudFilestoreManagerClient.Create(); | ||
// Initialize request argument(s) | ||
RevertInstanceRequest request = new RevertInstanceRequest | ||
{ | ||
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), | ||
TargetSnapshotId = "", | ||
}; | ||
// Make the request | ||
Operation<Instance, OperationMetadata> response = cloudFilestoreManagerClient.RevertInstance(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
Instance result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<Instance, OperationMetadata> retrievedResponse = cloudFilestoreManagerClient.PollOnceRevertInstance(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Instance retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END file_v1_generated_CloudFilestoreManager_RevertInstance_sync] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.