Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [Google.Cloud.CloudControlsPartner.V1Beta] A new method CreateCustomer is added to service CloudControlsPartnerCore #14142

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright 2025 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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_async_flattened]
using Google.Cloud.CloudControlsPartner.V1Beta;
using System.Threading.Tasks;

public sealed partial class GeneratedCloudControlsPartnerCoreClientSnippets
{
/// <summary>Snippet for CreateCustomerAsync</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 CreateCustomerAsync()
{
// Create client
CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = await CloudControlsPartnerCoreClient.CreateAsync();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
Customer customer = new Customer();
string customerId = "";
// Make the request
Customer response = await cloudControlsPartnerCoreClient.CreateCustomerAsync(parent, customer, customerId);
}
}
// [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2025 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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_async]
using Google.Cloud.CloudControlsPartner.V1Beta;
using System.Threading.Tasks;

public sealed partial class GeneratedCloudControlsPartnerCoreClientSnippets
{
/// <summary>Snippet for CreateCustomerAsync</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 CreateCustomerRequestObjectAsync()
{
// Create client
CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = await CloudControlsPartnerCoreClient.CreateAsync();
// Initialize request argument(s)
CreateCustomerRequest request = new CreateCustomerRequest
{
ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
Customer = new Customer(),
CustomerId = "",
};
// Make the request
Customer response = await cloudControlsPartnerCoreClient.CreateCustomerAsync(request);
}
}
// [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Copyright 2025 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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync]
using Google.Cloud.CloudControlsPartner.V1Beta;

public sealed partial class GeneratedCloudControlsPartnerCoreClientSnippets
{
/// <summary>Snippet for CreateCustomer</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 CreateCustomerRequestObject()
{
// Create client
CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = CloudControlsPartnerCoreClient.Create();
// Initialize request argument(s)
CreateCustomerRequest request = new CreateCustomerRequest
{
ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
Customer = new Customer(),
CustomerId = "",
};
// Make the request
Customer response = cloudControlsPartnerCoreClient.CreateCustomer(request);
}
}
// [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright 2025 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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_async_flattened_resourceNames]
using Google.Cloud.CloudControlsPartner.V1Beta;
using System.Threading.Tasks;

public sealed partial class GeneratedCloudControlsPartnerCoreClientSnippets
{
/// <summary>Snippet for CreateCustomerAsync</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 CreateCustomerResourceNamesAsync()
{
// Create client
CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = await CloudControlsPartnerCoreClient.CreateAsync();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
Customer customer = new Customer();
string customerId = "";
// Make the request
Customer response = await cloudControlsPartnerCoreClient.CreateCustomerAsync(parent, customer, customerId);
}
}
// [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright 2025 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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync_flattened_resourceNames]
using Google.Cloud.CloudControlsPartner.V1Beta;

public sealed partial class GeneratedCloudControlsPartnerCoreClientSnippets
{
/// <summary>Snippet for CreateCustomer</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 CreateCustomerResourceNames()
{
// Create client
CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = CloudControlsPartnerCoreClient.Create();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
Customer customer = new Customer();
string customerId = "";
// Make the request
Customer response = cloudControlsPartnerCoreClient.CreateCustomer(parent, customer, customerId);
}
}
// [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright 2025 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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync_flattened]
using Google.Cloud.CloudControlsPartner.V1Beta;

public sealed partial class GeneratedCloudControlsPartnerCoreClientSnippets
{
/// <summary>Snippet for CreateCustomer</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 CreateCustomer()
{
// Create client
CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = CloudControlsPartnerCoreClient.Create();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
Customer customer = new Customer();
string customerId = "";
// Make the request
Customer response = cloudControlsPartnerCoreClient.CreateCustomer(parent, customer, customerId);
}
}
// [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2025 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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_DeleteCustomer_async_flattened]
using Google.Cloud.CloudControlsPartner.V1Beta;
using System.Threading.Tasks;

public sealed partial class GeneratedCloudControlsPartnerCoreClientSnippets
{
/// <summary>Snippet for DeleteCustomerAsync</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 DeleteCustomerAsync()
{
// Create client
CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = await CloudControlsPartnerCoreClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/customers/[CUSTOMER]";
// Make the request
await cloudControlsPartnerCoreClient.DeleteCustomerAsync(name);
}
}
// [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_DeleteCustomer_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright 2025 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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_DeleteCustomer_async]
using Google.Cloud.CloudControlsPartner.V1Beta;
using System.Threading.Tasks;

public sealed partial class GeneratedCloudControlsPartnerCoreClientSnippets
{
/// <summary>Snippet for DeleteCustomerAsync</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 DeleteCustomerRequestObjectAsync()
{
// Create client
CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = await CloudControlsPartnerCoreClient.CreateAsync();
// Initialize request argument(s)
DeleteCustomerRequest request = new DeleteCustomerRequest
{
CustomerName = CustomerName.FromOrganizationLocationCustomer("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]"),
};
// Make the request
await cloudControlsPartnerCoreClient.DeleteCustomerAsync(request);
}
}
// [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_DeleteCustomer_async]
}
Loading
Loading