Skip to content

Commit

Permalink
feat: added federation API
Browse files Browse the repository at this point in the history
feat: added EncryptionConfig field
feat: added NetworkConfig field
feat: added DatabaseType field
feat: added TelemetryConfiguration field

PiperOrigin-RevId: 490636886

Source-Link: googleapis/googleapis@791374c

Source-Link: googleapis/googleapis-gen@7a72bd9
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuTWV0YXN0b3JlLlYxQWxwaGEvLk93bEJvdC55YW1sIiwiaCI6IjdhNzJiZDljY2EwN2ZiZTA0MmFjMDIzZmZiNWZkNTk0MTQyZDc5NWQifQ==
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Nov 24, 2022
1 parent a361045 commit 08fe5f7
Show file tree
Hide file tree
Showing 41 changed files with 9,729 additions and 577 deletions.
@@ -0,0 +1,63 @@
// 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_DataprocMetastoreFederation_CreateFederation_async_flattened]
using Google.Cloud.Metastore.V1Alpha;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedDataprocMetastoreFederationClientSnippets
{
/// <summary>Snippet for CreateFederationAsync</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 CreateFederationAsync()
{
// Create client
DataprocMetastoreFederationClient dataprocMetastoreFederationClient = await DataprocMetastoreFederationClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Federation federation = new Federation();
string federationId = "";
// Make the request
Operation<Federation, OperationMetadata> response = await dataprocMetastoreFederationClient.CreateFederationAsync(parent, federation, federationId);

// Poll until the returned long-running operation is complete
Operation<Federation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Federation 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<Federation, OperationMetadata> retrievedResponse = await dataprocMetastoreFederationClient.PollOnceCreateFederationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Federation retrievedResult = retrievedResponse.Result;
}
}
}
// [END metastore_v1alpha_generated_DataprocMetastoreFederation_CreateFederation_async_flattened]
}
@@ -0,0 +1,68 @@
// 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_DataprocMetastoreFederation_CreateFederation_async]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Metastore.V1Alpha;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedDataprocMetastoreFederationClientSnippets
{
/// <summary>Snippet for CreateFederationAsync</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 CreateFederationRequestObjectAsync()
{
// Create client
DataprocMetastoreFederationClient dataprocMetastoreFederationClient = await DataprocMetastoreFederationClient.CreateAsync();
// Initialize request argument(s)
CreateFederationRequest request = new CreateFederationRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
FederationId = "",
Federation = new Federation(),
RequestId = "",
};
// Make the request
Operation<Federation, OperationMetadata> response = await dataprocMetastoreFederationClient.CreateFederationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Federation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Federation 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<Federation, OperationMetadata> retrievedResponse = await dataprocMetastoreFederationClient.PollOnceCreateFederationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Federation retrievedResult = retrievedResponse.Result;
}
}
}
// [END metastore_v1alpha_generated_DataprocMetastoreFederation_CreateFederation_async]
}
@@ -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_DataprocMetastoreFederation_CreateFederation_sync]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Metastore.V1Alpha;
using Google.LongRunning;

public sealed partial class GeneratedDataprocMetastoreFederationClientSnippets
{
/// <summary>Snippet for CreateFederation</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 CreateFederationRequestObject()
{
// Create client
DataprocMetastoreFederationClient dataprocMetastoreFederationClient = DataprocMetastoreFederationClient.Create();
// Initialize request argument(s)
CreateFederationRequest request = new CreateFederationRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
FederationId = "",
Federation = new Federation(),
RequestId = "",
};
// Make the request
Operation<Federation, OperationMetadata> response = dataprocMetastoreFederationClient.CreateFederation(request);

// Poll until the returned long-running operation is complete
Operation<Federation, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Federation 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<Federation, OperationMetadata> retrievedResponse = dataprocMetastoreFederationClient.PollOnceCreateFederation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Federation retrievedResult = retrievedResponse.Result;
}
}
}
// [END metastore_v1alpha_generated_DataprocMetastoreFederation_CreateFederation_sync]
}
@@ -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_DataprocMetastoreFederation_CreateFederation_async_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Metastore.V1Alpha;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedDataprocMetastoreFederationClientSnippets
{
/// <summary>Snippet for CreateFederationAsync</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 CreateFederationResourceNamesAsync()
{
// Create client
DataprocMetastoreFederationClient dataprocMetastoreFederationClient = await DataprocMetastoreFederationClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Federation federation = new Federation();
string federationId = "";
// Make the request
Operation<Federation, OperationMetadata> response = await dataprocMetastoreFederationClient.CreateFederationAsync(parent, federation, federationId);

// Poll until the returned long-running operation is complete
Operation<Federation, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Federation 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<Federation, OperationMetadata> retrievedResponse = await dataprocMetastoreFederationClient.PollOnceCreateFederationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Federation retrievedResult = retrievedResponse.Result;
}
}
}
// [END metastore_v1alpha_generated_DataprocMetastoreFederation_CreateFederation_async_flattened_resourceNames]
}
@@ -0,0 +1,63 @@
// 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_DataprocMetastoreFederation_CreateFederation_sync_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Metastore.V1Alpha;
using Google.LongRunning;

public sealed partial class GeneratedDataprocMetastoreFederationClientSnippets
{
/// <summary>Snippet for CreateFederation</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 CreateFederationResourceNames()
{
// Create client
DataprocMetastoreFederationClient dataprocMetastoreFederationClient = DataprocMetastoreFederationClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Federation federation = new Federation();
string federationId = "";
// Make the request
Operation<Federation, OperationMetadata> response = dataprocMetastoreFederationClient.CreateFederation(parent, federation, federationId);

// Poll until the returned long-running operation is complete
Operation<Federation, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Federation 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<Federation, OperationMetadata> retrievedResponse = dataprocMetastoreFederationClient.PollOnceCreateFederation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Federation retrievedResult = retrievedResponse.Result;
}
}
}
// [END metastore_v1alpha_generated_DataprocMetastoreFederation_CreateFederation_sync_flattened_resourceNames]
}
@@ -0,0 +1,62 @@
// 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_DataprocMetastoreFederation_CreateFederation_sync_flattened]
using Google.Cloud.Metastore.V1Alpha;
using Google.LongRunning;

public sealed partial class GeneratedDataprocMetastoreFederationClientSnippets
{
/// <summary>Snippet for CreateFederation</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 CreateFederation()
{
// Create client
DataprocMetastoreFederationClient dataprocMetastoreFederationClient = DataprocMetastoreFederationClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Federation federation = new Federation();
string federationId = "";
// Make the request
Operation<Federation, OperationMetadata> response = dataprocMetastoreFederationClient.CreateFederation(parent, federation, federationId);

// Poll until the returned long-running operation is complete
Operation<Federation, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Federation 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<Federation, OperationMetadata> retrievedResponse = dataprocMetastoreFederationClient.PollOnceCreateFederation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Federation retrievedResult = retrievedResponse.Result;
}
}
}
// [END metastore_v1alpha_generated_DataprocMetastoreFederation_CreateFederation_sync_flattened]
}

0 comments on commit 08fe5f7

Please sign in to comment.