-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(parallelstore/v1beta): add ImportData and ExportData RPCs
docs: fix typo in Instance.reserved_ip_range field doc PiperOrigin-RevId: 629176948 Source-Link: googleapis/googleapis@35125cf Source-Link: googleapis/googleapis-gen@dda684f Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuUGFyYWxsZWxzdG9yZS5WMUJldGEvLk93bEJvdC55YW1sIiwiaCI6ImRkYTY4NGZlZDMyNWI0YjNiOGNlODAzNWNmOWI1MzE3NjM4MWMzODgifQ==
- Loading branch information
1 parent
f73940b
commit aded486
Showing
11 changed files
with
3,607 additions
and
75 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
...ore.V1Beta.GeneratedSnippets/ParallelstoreClient.ExportDataRequestObjectAsyncSnippet.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,67 @@ | ||
// 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 parallelstore_v1beta_generated_Parallelstore_ExportData_async] | ||
using Google.Cloud.Parallelstore.V1Beta; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedParallelstoreClientSnippets | ||
{ | ||
/// <summary>Snippet for ExportDataAsync</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 ExportDataRequestObjectAsync() | ||
{ | ||
// Create client | ||
ParallelstoreClient parallelstoreClient = await ParallelstoreClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
ExportDataRequest request = new ExportDataRequest | ||
{ | ||
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), | ||
SourcePath = "", | ||
DestinationGcsUri = "", | ||
RequestId = "", | ||
}; | ||
// Make the request | ||
Operation<ExportDataResponse, ExportDataMetadata> response = await parallelstoreClient.ExportDataAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<ExportDataResponse, ExportDataMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
ExportDataResponse 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<ExportDataResponse, ExportDataMetadata> retrievedResponse = await parallelstoreClient.PollOnceExportDataAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
ExportDataResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END parallelstore_v1beta_generated_Parallelstore_ExportData_async] | ||
} |
66 changes: 66 additions & 0 deletions
66
...lelstore.V1Beta.GeneratedSnippets/ParallelstoreClient.ExportDataRequestObjectSnippet.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 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 parallelstore_v1beta_generated_Parallelstore_ExportData_sync] | ||
using Google.Cloud.Parallelstore.V1Beta; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedParallelstoreClientSnippets | ||
{ | ||
/// <summary>Snippet for ExportData</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 ExportDataRequestObject() | ||
{ | ||
// Create client | ||
ParallelstoreClient parallelstoreClient = ParallelstoreClient.Create(); | ||
// Initialize request argument(s) | ||
ExportDataRequest request = new ExportDataRequest | ||
{ | ||
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), | ||
SourcePath = "", | ||
DestinationGcsUri = "", | ||
RequestId = "", | ||
}; | ||
// Make the request | ||
Operation<ExportDataResponse, ExportDataMetadata> response = parallelstoreClient.ExportData(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<ExportDataResponse, ExportDataMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
ExportDataResponse 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<ExportDataResponse, ExportDataMetadata> retrievedResponse = parallelstoreClient.PollOnceExportData(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
ExportDataResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END parallelstore_v1beta_generated_Parallelstore_ExportData_sync] | ||
} |
67 changes: 67 additions & 0 deletions
67
...ore.V1Beta.GeneratedSnippets/ParallelstoreClient.ImportDataRequestObjectAsyncSnippet.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,67 @@ | ||
// 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 parallelstore_v1beta_generated_Parallelstore_ImportData_async] | ||
using Google.Cloud.Parallelstore.V1Beta; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedParallelstoreClientSnippets | ||
{ | ||
/// <summary>Snippet for ImportDataAsync</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 ImportDataRequestObjectAsync() | ||
{ | ||
// Create client | ||
ParallelstoreClient parallelstoreClient = await ParallelstoreClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
ImportDataRequest request = new ImportDataRequest | ||
{ | ||
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), | ||
SourceGcsUri = "", | ||
DestinationPath = "", | ||
RequestId = "", | ||
}; | ||
// Make the request | ||
Operation<ImportDataResponse, ImportDataMetadata> response = await parallelstoreClient.ImportDataAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<ImportDataResponse, ImportDataMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
ImportDataResponse 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<ImportDataResponse, ImportDataMetadata> retrievedResponse = await parallelstoreClient.PollOnceImportDataAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
ImportDataResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END parallelstore_v1beta_generated_Parallelstore_ImportData_async] | ||
} |
66 changes: 66 additions & 0 deletions
66
...lelstore.V1Beta.GeneratedSnippets/ParallelstoreClient.ImportDataRequestObjectSnippet.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 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 parallelstore_v1beta_generated_Parallelstore_ImportData_sync] | ||
using Google.Cloud.Parallelstore.V1Beta; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedParallelstoreClientSnippets | ||
{ | ||
/// <summary>Snippet for ImportData</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 ImportDataRequestObject() | ||
{ | ||
// Create client | ||
ParallelstoreClient parallelstoreClient = ParallelstoreClient.Create(); | ||
// Initialize request argument(s) | ||
ImportDataRequest request = new ImportDataRequest | ||
{ | ||
InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), | ||
SourceGcsUri = "", | ||
DestinationPath = "", | ||
RequestId = "", | ||
}; | ||
// Make the request | ||
Operation<ImportDataResponse, ImportDataMetadata> response = parallelstoreClient.ImportData(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<ImportDataResponse, ImportDataMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
ImportDataResponse 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<ImportDataResponse, ImportDataMetadata> retrievedResponse = parallelstoreClient.PollOnceImportData(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
ImportDataResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END parallelstore_v1beta_generated_Parallelstore_ImportData_sync] | ||
} |
Oops, something went wrong.