Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added QueryMetadata API feat: added MoveTableToDatabase API feat: added AlterMetadataResourceLocation API PiperOrigin-RevId: 496501326 Source-Link: googleapis/googleapis@eb1941a Source-Link: googleapis/googleapis-gen@a66b195 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuTWV0YXN0b3JlLlYxQWxwaGEvLk93bEJvdC55YW1sIiwiaCI6ImE2NmIxOTU2ZWFlMjFlOGM5NDAyYWEzYmFkOTU4Y2E1Y2UyMjdlNDYifQ==
- Loading branch information
1 parent
300746b
commit 7844ed8
Showing
17 changed files
with
3,894 additions
and
154 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
...ppets/DataprocMetastoreClient.AlterMetadataResourceLocationRequestObjectAsyncSnippet.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 2022 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 Google.Cloud.Metastore.V1Alpha.Snippets | ||
{ | ||
// [START metastore_v1alpha_generated_DataprocMetastore_AlterMetadataResourceLocation_async] | ||
using Google.Cloud.Metastore.V1Alpha; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedDataprocMetastoreClientSnippets | ||
{ | ||
/// <summary>Snippet for AlterMetadataResourceLocationAsync</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 AlterMetadataResourceLocationRequestObjectAsync() | ||
{ | ||
// Create client | ||
DataprocMetastoreClient dataprocMetastoreClient = await DataprocMetastoreClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
AlterMetadataResourceLocationRequest request = new AlterMetadataResourceLocationRequest | ||
{ | ||
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"), | ||
ResourceName = "", | ||
LocationUri = "", | ||
}; | ||
// Make the request | ||
Operation<AlterMetadataResourceLocationResponse, OperationMetadata> response = await dataprocMetastoreClient.AlterMetadataResourceLocationAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<AlterMetadataResourceLocationResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
AlterMetadataResourceLocationResponse 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<AlterMetadataResourceLocationResponse, OperationMetadata> retrievedResponse = await dataprocMetastoreClient.PollOnceAlterMetadataResourceLocationAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
AlterMetadataResourceLocationResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END metastore_v1alpha_generated_DataprocMetastore_AlterMetadataResourceLocation_async] | ||
} |
65 changes: 65 additions & 0 deletions
65
...edSnippets/DataprocMetastoreClient.AlterMetadataResourceLocationRequestObjectSnippet.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 2022 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 Google.Cloud.Metastore.V1Alpha.Snippets | ||
{ | ||
// [START metastore_v1alpha_generated_DataprocMetastore_AlterMetadataResourceLocation_sync] | ||
using Google.Cloud.Metastore.V1Alpha; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedDataprocMetastoreClientSnippets | ||
{ | ||
/// <summary>Snippet for AlterMetadataResourceLocation</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 AlterMetadataResourceLocationRequestObject() | ||
{ | ||
// Create client | ||
DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.Create(); | ||
// Initialize request argument(s) | ||
AlterMetadataResourceLocationRequest request = new AlterMetadataResourceLocationRequest | ||
{ | ||
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"), | ||
ResourceName = "", | ||
LocationUri = "", | ||
}; | ||
// Make the request | ||
Operation<AlterMetadataResourceLocationResponse, OperationMetadata> response = dataprocMetastoreClient.AlterMetadataResourceLocation(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<AlterMetadataResourceLocationResponse, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
AlterMetadataResourceLocationResponse 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<AlterMetadataResourceLocationResponse, OperationMetadata> retrievedResponse = dataprocMetastoreClient.PollOnceAlterMetadataResourceLocation(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
AlterMetadataResourceLocationResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END metastore_v1alpha_generated_DataprocMetastore_AlterMetadataResourceLocation_sync] | ||
} |
67 changes: 67 additions & 0 deletions
67
...neratedSnippets/DataprocMetastoreClient.MoveTableToDatabaseRequestObjectAsyncSnippet.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 2022 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 Google.Cloud.Metastore.V1Alpha.Snippets | ||
{ | ||
// [START metastore_v1alpha_generated_DataprocMetastore_MoveTableToDatabase_async] | ||
using Google.Cloud.Metastore.V1Alpha; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedDataprocMetastoreClientSnippets | ||
{ | ||
/// <summary>Snippet for MoveTableToDatabaseAsync</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 MoveTableToDatabaseRequestObjectAsync() | ||
{ | ||
// Create client | ||
DataprocMetastoreClient dataprocMetastoreClient = await DataprocMetastoreClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
MoveTableToDatabaseRequest request = new MoveTableToDatabaseRequest | ||
{ | ||
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"), | ||
TableName = "", | ||
DbName = "", | ||
DestinationDbName = "", | ||
}; | ||
// Make the request | ||
Operation<MoveTableToDatabaseResponse, OperationMetadata> response = await dataprocMetastoreClient.MoveTableToDatabaseAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<MoveTableToDatabaseResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
MoveTableToDatabaseResponse 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<MoveTableToDatabaseResponse, OperationMetadata> retrievedResponse = await dataprocMetastoreClient.PollOnceMoveTableToDatabaseAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
MoveTableToDatabaseResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END metastore_v1alpha_generated_DataprocMetastore_MoveTableToDatabase_async] | ||
} |
66 changes: 66 additions & 0 deletions
66
...ha.GeneratedSnippets/DataprocMetastoreClient.MoveTableToDatabaseRequestObjectSnippet.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 2022 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 Google.Cloud.Metastore.V1Alpha.Snippets | ||
{ | ||
// [START metastore_v1alpha_generated_DataprocMetastore_MoveTableToDatabase_sync] | ||
using Google.Cloud.Metastore.V1Alpha; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedDataprocMetastoreClientSnippets | ||
{ | ||
/// <summary>Snippet for MoveTableToDatabase</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 MoveTableToDatabaseRequestObject() | ||
{ | ||
// Create client | ||
DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.Create(); | ||
// Initialize request argument(s) | ||
MoveTableToDatabaseRequest request = new MoveTableToDatabaseRequest | ||
{ | ||
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"), | ||
TableName = "", | ||
DbName = "", | ||
DestinationDbName = "", | ||
}; | ||
// Make the request | ||
Operation<MoveTableToDatabaseResponse, OperationMetadata> response = dataprocMetastoreClient.MoveTableToDatabase(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<MoveTableToDatabaseResponse, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
MoveTableToDatabaseResponse 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<MoveTableToDatabaseResponse, OperationMetadata> retrievedResponse = dataprocMetastoreClient.PollOnceMoveTableToDatabase(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
MoveTableToDatabaseResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END metastore_v1alpha_generated_DataprocMetastore_MoveTableToDatabase_sync] | ||
} |
65 changes: 65 additions & 0 deletions
65
...pha.GeneratedSnippets/DataprocMetastoreClient.QueryMetadataRequestObjectAsyncSnippet.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 2022 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 Google.Cloud.Metastore.V1Alpha.Snippets | ||
{ | ||
// [START metastore_v1alpha_generated_DataprocMetastore_QueryMetadata_async] | ||
using Google.Cloud.Metastore.V1Alpha; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedDataprocMetastoreClientSnippets | ||
{ | ||
/// <summary>Snippet for QueryMetadataAsync</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 QueryMetadataRequestObjectAsync() | ||
{ | ||
// Create client | ||
DataprocMetastoreClient dataprocMetastoreClient = await DataprocMetastoreClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
QueryMetadataRequest request = new QueryMetadataRequest | ||
{ | ||
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"), | ||
Query = "", | ||
}; | ||
// Make the request | ||
Operation<QueryMetadataResponse, OperationMetadata> response = await dataprocMetastoreClient.QueryMetadataAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<QueryMetadataResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
QueryMetadataResponse 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<QueryMetadataResponse, OperationMetadata> retrievedResponse = await dataprocMetastoreClient.PollOnceQueryMetadataAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
QueryMetadataResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END metastore_v1alpha_generated_DataprocMetastore_QueryMetadata_async] | ||
} |
64 changes: 64 additions & 0 deletions
64
....V1Alpha.GeneratedSnippets/DataprocMetastoreClient.QueryMetadataRequestObjectSnippet.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,64 @@ | ||
// Copyright 2022 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 Google.Cloud.Metastore.V1Alpha.Snippets | ||
{ | ||
// [START metastore_v1alpha_generated_DataprocMetastore_QueryMetadata_sync] | ||
using Google.Cloud.Metastore.V1Alpha; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedDataprocMetastoreClientSnippets | ||
{ | ||
/// <summary>Snippet for QueryMetadata</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 QueryMetadataRequestObject() | ||
{ | ||
// Create client | ||
DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.Create(); | ||
// Initialize request argument(s) | ||
QueryMetadataRequest request = new QueryMetadataRequest | ||
{ | ||
ServiceAsServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"), | ||
Query = "", | ||
}; | ||
// Make the request | ||
Operation<QueryMetadataResponse, OperationMetadata> response = dataprocMetastoreClient.QueryMetadata(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<QueryMetadataResponse, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
QueryMetadataResponse 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<QueryMetadataResponse, OperationMetadata> retrievedResponse = dataprocMetastoreClient.PollOnceQueryMetadata(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
QueryMetadataResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END metastore_v1alpha_generated_DataprocMetastore_QueryMetadata_sync] | ||
} |
Oops, something went wrong.