From 79a1fc7e664c313586fe3d57d6f965861f40f0da Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 5 Oct 2024 01:11:59 +0000 Subject: [PATCH] feat: add Order modification RPCs and License Management Service docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL` in enum `LineItemChangeState` is changed docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_APPROVED` in enum `LineItemChangeState` is changed docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_COMPLETED` in enum `LineItemChangeState` is changed docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_REJECTED` in enum `LineItemChangeState` is changed docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_ABANDONED` in enum `LineItemChangeState` is changed docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_ACTIVATING` in enum `LineItemChangeState` is changed docs: A comment for field `request_id` in message `.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest` is changed docs: A comment for field `filter` in message `.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest` is changed PiperOrigin-RevId: 682457622 Source-Link: https://github.com/googleapis/googleapis/commit/1f8352cf46df74d7db6fd544181655c590689b8c Source-Link: https://github.com/googleapis/googleapis-gen/commit/172720068f2259b365a56a22a0c7c2a6d446c732 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29tbWVyY2UuQ29uc3VtZXIuUHJvY3VyZW1lbnQuVjEvLk93bEJvdC55YW1sIiwiaCI6IjE3MjcyMDA2OGYyMjU5YjM2NWE1NmEyMmEwYzdjMmE2ZDQ0NmM3MzIifQ== --- ....CancelOrderRequestObjectAsyncSnippet.g.cs | 66 + ...lient.CancelOrderRequestObjectSnippet.g.cs | 65 + ....ModifyOrderRequestObjectAsyncSnippet.g.cs | 70 + ...lient.ModifyOrderRequestObjectSnippet.g.cs | 69 + ...ementServiceClient.AssignAsyncSnippet.g.cs | 46 + ...lient.AssignRequestObjectAsyncSnippet.g.cs | 48 + ...viceClient.AssignRequestObjectSnippet.g.cs | 47 + ...ManagementServiceClient.AssignSnippet.g.cs | 45 + ...nt.EnumerateLicensedUsersAsyncSnippet.g.cs | 79 + ...icensedUsersRequestObjectAsyncSnippet.g.cs | 79 + ...rateLicensedUsersRequestObjectSnippet.g.cs | 77 + ...eClient.EnumerateLicensedUsersSnippet.g.cs | 77 + ...viceClient.GetLicensePoolAsyncSnippet.g.cs | 44 + ...tLicensePoolRequestObjectAsyncSnippet.g.cs | 44 + ...nt.GetLicensePoolRequestObjectSnippet.g.cs | 43 + ...ntServiceClient.GetLicensePoolSnippet.g.cs | 43 + ...entServiceClient.UnassignAsyncSnippet.g.cs | 46 + ...ent.UnassignRequestObjectAsyncSnippet.g.cs | 48 + ...ceClient.UnassignRequestObjectSnippet.g.cs | 47 + ...nagementServiceClient.UnassignSnippet.g.cs | 45 + ...eClient.UpdateLicensePoolAsyncSnippet.g.cs | 46 + ...eLicensePoolRequestObjectAsyncSnippet.g.cs | 49 + ...UpdateLicensePoolRequestObjectSnippet.g.cs | 48 + ...erviceClient.UpdateLicensePoolSnippet.g.cs | 45 + ...loud.commerce.consumer.procurement.v1.json | 1194 +++++++ ...sumerProcurementServiceClientSnippets.g.cs | 146 + ...icenseManagementServiceClientSnippets.g.cs | 456 +++ .../ConsumerProcurementServiceClient.g.cs | 263 +- .../LicenseManagementService.g.cs | 3150 +++++++++++++++++ .../LicenseManagementServiceClient.g.cs | 894 +++++ .../LicenseManagementServiceGrpc.g.cs | 501 +++ ...LicenseManagementServiceResourceNames.g.cs | 269 ++ .../Order.g.cs | 24 +- .../PackageApiMetadata.g.cs | 1 + .../ProcurementService.g.cs | 1389 +++++++- .../ProcurementServiceGrpc.g.cs | 161 +- .../ServiceCollectionExtensions.g.cs | 36 + .../gapic_metadata.json | 51 + 38 files changed, 9812 insertions(+), 39 deletions(-) create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.CancelOrderRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.CancelOrderRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.ModifyOrderRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.ModifyOrderRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolSnippet.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.Snippets/LicenseManagementServiceClientSnippets.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementService.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceClient.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceGrpc.g.cs create mode 100644 apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceResourceNames.g.cs diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.CancelOrderRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.CancelOrderRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..9ec8c34a80c6 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.CancelOrderRequestObjectAsyncSnippet.g.cs @@ -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 cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_CancelOrder_async] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedConsumerProcurementServiceClientSnippets + { + /// Snippet for CancelOrderAsync + /// + /// 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. + /// + public async Task CancelOrderRequestObjectAsync() + { + // Create client + ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync(); + // Initialize request argument(s) + CancelOrderRequest request = new CancelOrderRequest + { + Name = "", + Etag = "", + CancellationPolicy = CancelOrderRequest.Types.CancellationPolicy.Unspecified, + }; + // Make the request + Operation response = await consumerProcurementServiceClient.CancelOrderAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Order 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 retrievedResponse = await consumerProcurementServiceClient.PollOnceCancelOrderAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Order retrievedResult = retrievedResponse.Result; + } + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_CancelOrder_async] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.CancelOrderRequestObjectSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.CancelOrderRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..27354608ad92 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.CancelOrderRequestObjectSnippet.g.cs @@ -0,0 +1,65 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_CancelOrder_sync] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using Google.LongRunning; + + public sealed partial class GeneratedConsumerProcurementServiceClientSnippets + { + /// Snippet for CancelOrder + /// + /// 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. + /// + public void CancelOrderRequestObject() + { + // Create client + ConsumerProcurementServiceClient consumerProcurementServiceClient = ConsumerProcurementServiceClient.Create(); + // Initialize request argument(s) + CancelOrderRequest request = new CancelOrderRequest + { + Name = "", + Etag = "", + CancellationPolicy = CancelOrderRequest.Types.CancellationPolicy.Unspecified, + }; + // Make the request + Operation response = consumerProcurementServiceClient.CancelOrder(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Order 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 retrievedResponse = consumerProcurementServiceClient.PollOnceCancelOrder(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Order retrievedResult = retrievedResponse.Result; + } + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_CancelOrder_sync] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.ModifyOrderRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.ModifyOrderRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..4bb584de4a5e --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.ModifyOrderRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,70 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_ModifyOrder_async] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedConsumerProcurementServiceClientSnippets + { + /// Snippet for ModifyOrderAsync + /// + /// 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. + /// + public async Task ModifyOrderRequestObjectAsync() + { + // Create client + ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync(); + // Initialize request argument(s) + ModifyOrderRequest request = new ModifyOrderRequest + { + Name = "", + Etag = "", + DisplayName = "", + Modifications = + { + new ModifyOrderRequest.Types.Modification(), + }, + }; + // Make the request + Operation response = await consumerProcurementServiceClient.ModifyOrderAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Order 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 retrievedResponse = await consumerProcurementServiceClient.PollOnceModifyOrderAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Order retrievedResult = retrievedResponse.Result; + } + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_ModifyOrder_async] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.ModifyOrderRequestObjectSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.ModifyOrderRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..b1568f15b23e --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/ConsumerProcurementServiceClient.ModifyOrderRequestObjectSnippet.g.cs @@ -0,0 +1,69 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_ModifyOrder_sync] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using Google.LongRunning; + + public sealed partial class GeneratedConsumerProcurementServiceClientSnippets + { + /// Snippet for ModifyOrder + /// + /// 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. + /// + public void ModifyOrderRequestObject() + { + // Create client + ConsumerProcurementServiceClient consumerProcurementServiceClient = ConsumerProcurementServiceClient.Create(); + // Initialize request argument(s) + ModifyOrderRequest request = new ModifyOrderRequest + { + Name = "", + Etag = "", + DisplayName = "", + Modifications = + { + new ModifyOrderRequest.Types.Modification(), + }, + }; + // Make the request + Operation response = consumerProcurementServiceClient.ModifyOrder(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Order 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 retrievedResponse = consumerProcurementServiceClient.PollOnceModifyOrder(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Order retrievedResult = retrievedResponse.Result; + } + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_ModifyOrder_sync] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignAsyncSnippet.g.cs new file mode 100644 index 000000000000..99a6e03afb81 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignAsyncSnippet.g.cs @@ -0,0 +1,46 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_async_flattened] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System.Collections.Generic; + using System.Threading.Tasks; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for AssignAsync + /// + /// 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. + /// + public async Task AssignAsync() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = ""; + IEnumerable usernames = new string[] { "", }; + // Make the request + AssignResponse response = await licenseManagementServiceClient.AssignAsync(parent, usernames); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_async_flattened] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..e85719a3e18e --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,48 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_async] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for AssignAsync + /// + /// 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. + /// + public async Task AssignRequestObjectAsync() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + AssignRequest request = new AssignRequest + { + Parent = "", + Usernames = { "", }, + }; + // Make the request + AssignResponse response = await licenseManagementServiceClient.AssignAsync(request); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_async] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignRequestObjectSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..5d0c93a21c5f --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignRequestObjectSnippet.g.cs @@ -0,0 +1,47 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_sync] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for Assign + /// + /// 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. + /// + public void AssignRequestObject() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + AssignRequest request = new AssignRequest + { + Parent = "", + Usernames = { "", }, + }; + // Make the request + AssignResponse response = licenseManagementServiceClient.Assign(request); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_sync] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignSnippet.g.cs new file mode 100644 index 000000000000..abb7e1efcf90 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.AssignSnippet.g.cs @@ -0,0 +1,45 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_sync_flattened] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System.Collections.Generic; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for Assign + /// + /// 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. + /// + public void Assign() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + string parent = ""; + IEnumerable usernames = new string[] { "", }; + // Make the request + AssignResponse response = licenseManagementServiceClient.Assign(parent, usernames); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_sync_flattened] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersAsyncSnippet.g.cs new file mode 100644 index 000000000000..78b115043537 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersAsyncSnippet.g.cs @@ -0,0 +1,79 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_async_flattened] + using Google.Api.Gax; + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for EnumerateLicensedUsersAsync + /// + /// 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. + /// + public async Task EnumerateLicensedUsersAsync() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = ""; + // Make the request + PagedAsyncEnumerable response = licenseManagementServiceClient.EnumerateLicensedUsersAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((LicensedUser item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((EnumerateLicensedUsersResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (LicensedUser item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (LicensedUser item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_async_flattened] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..0a49bf1a246c --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,79 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_async] + using Google.Api.Gax; + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for EnumerateLicensedUsersAsync + /// + /// 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. + /// + public async Task EnumerateLicensedUsersRequestObjectAsync() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + EnumerateLicensedUsersRequest request = new EnumerateLicensedUsersRequest { Parent = "", }; + // Make the request + PagedAsyncEnumerable response = licenseManagementServiceClient.EnumerateLicensedUsersAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((LicensedUser item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((EnumerateLicensedUsersResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (LicensedUser item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (LicensedUser item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_async] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersRequestObjectSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..64cabcc47b8c --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersRequestObjectSnippet.g.cs @@ -0,0 +1,77 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_sync] + using Google.Api.Gax; + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for EnumerateLicensedUsers + /// + /// 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. + /// + public void EnumerateLicensedUsersRequestObject() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + EnumerateLicensedUsersRequest request = new EnumerateLicensedUsersRequest { Parent = "", }; + // Make the request + PagedEnumerable response = licenseManagementServiceClient.EnumerateLicensedUsers(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (LicensedUser item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (EnumerateLicensedUsersResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (LicensedUser item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (LicensedUser item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_sync] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersSnippet.g.cs new file mode 100644 index 000000000000..62f451d02851 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.EnumerateLicensedUsersSnippet.g.cs @@ -0,0 +1,77 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_sync_flattened] + using Google.Api.Gax; + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for EnumerateLicensedUsers + /// + /// 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. + /// + public void EnumerateLicensedUsers() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + string parent = ""; + // Make the request + PagedEnumerable response = licenseManagementServiceClient.EnumerateLicensedUsers(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (LicensedUser item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (EnumerateLicensedUsersResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (LicensedUser item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (LicensedUser item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_sync_flattened] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolAsyncSnippet.g.cs new file mode 100644 index 000000000000..750a07c01cfb --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_async_flattened] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for GetLicensePoolAsync + /// + /// 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. + /// + public async Task GetLicensePoolAsync() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = ""; + // Make the request + LicensePool response = await licenseManagementServiceClient.GetLicensePoolAsync(name); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_async_flattened] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..26fb598ec6a9 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_async] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for GetLicensePoolAsync + /// + /// 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. + /// + public async Task GetLicensePoolRequestObjectAsync() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + GetLicensePoolRequest request = new GetLicensePoolRequest { Name = "", }; + // Make the request + LicensePool response = await licenseManagementServiceClient.GetLicensePoolAsync(request); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_async] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolRequestObjectSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..6226dd449c38 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolRequestObjectSnippet.g.cs @@ -0,0 +1,43 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_sync] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for GetLicensePool + /// + /// 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. + /// + public void GetLicensePoolRequestObject() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + GetLicensePoolRequest request = new GetLicensePoolRequest { Name = "", }; + // Make the request + LicensePool response = licenseManagementServiceClient.GetLicensePool(request); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_sync] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolSnippet.g.cs new file mode 100644 index 000000000000..de9347ea0991 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.GetLicensePoolSnippet.g.cs @@ -0,0 +1,43 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_sync_flattened] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for GetLicensePool + /// + /// 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. + /// + public void GetLicensePool() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + string name = ""; + // Make the request + LicensePool response = licenseManagementServiceClient.GetLicensePool(name); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_sync_flattened] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignAsyncSnippet.g.cs new file mode 100644 index 000000000000..481c07bcb93b --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignAsyncSnippet.g.cs @@ -0,0 +1,46 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_async_flattened] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System.Collections.Generic; + using System.Threading.Tasks; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for UnassignAsync + /// + /// 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. + /// + public async Task UnassignAsync() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = ""; + IEnumerable usernames = new string[] { "", }; + // Make the request + UnassignResponse response = await licenseManagementServiceClient.UnassignAsync(parent, usernames); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_async_flattened] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..3ec393a7cfc6 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,48 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_async] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for UnassignAsync + /// + /// 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. + /// + public async Task UnassignRequestObjectAsync() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + UnassignRequest request = new UnassignRequest + { + Parent = "", + Usernames = { "", }, + }; + // Make the request + UnassignResponse response = await licenseManagementServiceClient.UnassignAsync(request); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_async] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignRequestObjectSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..b3396ffe6ebf --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignRequestObjectSnippet.g.cs @@ -0,0 +1,47 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_sync] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for Unassign + /// + /// 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. + /// + public void UnassignRequestObject() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + UnassignRequest request = new UnassignRequest + { + Parent = "", + Usernames = { "", }, + }; + // Make the request + UnassignResponse response = licenseManagementServiceClient.Unassign(request); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_sync] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignSnippet.g.cs new file mode 100644 index 000000000000..2fb2a239c9e7 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UnassignSnippet.g.cs @@ -0,0 +1,45 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_sync_flattened] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using System.Collections.Generic; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for Unassign + /// + /// 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. + /// + public void Unassign() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + string parent = ""; + IEnumerable usernames = new string[] { "", }; + // Make the request + UnassignResponse response = licenseManagementServiceClient.Unassign(parent, usernames); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_sync_flattened] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolAsyncSnippet.g.cs new file mode 100644 index 000000000000..ad5ffebf2fe5 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolAsyncSnippet.g.cs @@ -0,0 +1,46 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_async_flattened] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for UpdateLicensePoolAsync + /// + /// 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. + /// + public async Task UpdateLicensePoolAsync() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + LicensePool licensePool = new LicensePool(); + FieldMask updateMask = new FieldMask(); + // Make the request + LicensePool response = await licenseManagementServiceClient.UpdateLicensePoolAsync(licensePool, updateMask); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_async_flattened] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..62cbcd3e3703 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,49 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_async] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for UpdateLicensePoolAsync + /// + /// 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. + /// + public async Task UpdateLicensePoolRequestObjectAsync() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + UpdateLicensePoolRequest request = new UpdateLicensePoolRequest + { + LicensePool = new LicensePool(), + UpdateMask = new FieldMask(), + }; + // Make the request + LicensePool response = await licenseManagementServiceClient.UpdateLicensePoolAsync(request); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_async] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolRequestObjectSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..d2dc59c31737 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolRequestObjectSnippet.g.cs @@ -0,0 +1,48 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_sync] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for UpdateLicensePool + /// + /// 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. + /// + public void UpdateLicensePoolRequestObject() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + UpdateLicensePoolRequest request = new UpdateLicensePoolRequest + { + LicensePool = new LicensePool(), + UpdateMask = new FieldMask(), + }; + // Make the request + LicensePool response = licenseManagementServiceClient.UpdateLicensePool(request); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_sync] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolSnippet.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolSnippet.g.cs new file mode 100644 index 000000000000..98daa5f5ece4 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/LicenseManagementServiceClient.UpdateLicensePoolSnippet.g.cs @@ -0,0 +1,45 @@ +// 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_sync_flattened] + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for UpdateLicensePool + /// + /// 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. + /// + public void UpdateLicensePool() + { + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + LicensePool licensePool = new LicensePool(); + FieldMask updateMask = new FieldMask(); + // Make the request + LicensePool response = licenseManagementServiceClient.UpdateLicensePool(licensePool, updateMask); + } + } + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_sync_flattened] +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json index e550b69f4f33..ba9e8f24820c 100644 --- a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.GeneratedSnippets/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json @@ -506,6 +506,1200 @@ "type": "SHORT" } ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_ModifyOrder_sync", + "title": "ModifyOrderRequestObject", + "description": "Snippet for ModifyOrder", + "file": "ConsumerProcurementServiceClient.ModifyOrderRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ModifyOrder", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient.ModifyOrder", + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "ConsumerProcurementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient" + }, + "method": { + "shortName": "ModifyOrder", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ModifyOrder", + "service": { + "shortName": "ConsumerProcurementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 67, + "type": "FULL" + }, + { + "start": 35, + "end": 65, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_ModifyOrder_async", + "title": "ModifyOrderRequestObjectAsync", + "description": "Snippet for ModifyOrderAsync", + "file": "ConsumerProcurementServiceClient.ModifyOrderRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ModifyOrderAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient.ModifyOrderAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "ConsumerProcurementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient" + }, + "method": { + "shortName": "ModifyOrder", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ModifyOrder", + "service": { + "shortName": "ConsumerProcurementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 68, + "type": "FULL" + }, + { + "start": 36, + "end": 66, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_CancelOrder_sync", + "title": "CancelOrderRequestObject", + "description": "Snippet for CancelOrder", + "file": "ConsumerProcurementServiceClient.CancelOrderRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CancelOrder", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient.CancelOrder", + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "ConsumerProcurementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient" + }, + "method": { + "shortName": "CancelOrder", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.CancelOrder", + "service": { + "shortName": "ConsumerProcurementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 63, + "type": "FULL" + }, + { + "start": 35, + "end": 61, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_CancelOrder_async", + "title": "CancelOrderRequestObjectAsync", + "description": "Snippet for CancelOrderAsync", + "file": "ConsumerProcurementServiceClient.CancelOrderRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CancelOrderAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient.CancelOrderAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "ConsumerProcurementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient" + }, + "method": { + "shortName": "CancelOrder", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.CancelOrder", + "service": { + "shortName": "ConsumerProcurementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 64, + "type": "FULL" + }, + { + "start": 36, + "end": 62, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_sync", + "title": "GetLicensePoolRequestObject", + "description": "Snippet for GetLicensePool", + "file": "LicenseManagementServiceClient.GetLicensePoolRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetLicensePool", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.GetLicensePool", + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.GetLicensePoolRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "GetLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.GetLicensePool", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_async", + "title": "GetLicensePoolRequestObjectAsync", + "description": "Snippet for GetLicensePoolAsync", + "file": "LicenseManagementServiceClient.GetLicensePoolRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetLicensePoolAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.GetLicensePoolAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.GetLicensePoolRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "GetLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.GetLicensePool", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_sync_flattened", + "title": "GetLicensePool", + "description": "Snippet for GetLicensePool", + "file": "LicenseManagementServiceClient.GetLicensePoolSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetLicensePool", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.GetLicensePool", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "GetLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.GetLicensePool", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_async_flattened", + "title": "GetLicensePoolAsync", + "description": "Snippet for GetLicensePoolAsync", + "file": "LicenseManagementServiceClient.GetLicensePoolAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetLicensePoolAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.GetLicensePoolAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "GetLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.GetLicensePool", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_sync", + "title": "UpdateLicensePoolRequestObject", + "description": "Snippet for UpdateLicensePool", + "file": "LicenseManagementServiceClient.UpdateLicensePoolRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateLicensePool", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.UpdateLicensePool", + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.UpdateLicensePoolRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "UpdateLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.UpdateLicensePool", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 35, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_async", + "title": "UpdateLicensePoolRequestObjectAsync", + "description": "Snippet for UpdateLicensePoolAsync", + "file": "LicenseManagementServiceClient.UpdateLicensePoolRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateLicensePoolAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.UpdateLicensePoolAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.UpdateLicensePoolRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "UpdateLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.UpdateLicensePool", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 47, + "type": "FULL" + }, + { + "start": 36, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_sync_flattened", + "title": "UpdateLicensePool", + "description": "Snippet for UpdateLicensePool", + "file": "LicenseManagementServiceClient.UpdateLicensePoolSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateLicensePool", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.UpdateLicensePool", + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool", + "name": "licensePool" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "UpdateLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.UpdateLicensePool", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_async_flattened", + "title": "UpdateLicensePoolAsync", + "description": "Snippet for UpdateLicensePoolAsync", + "file": "LicenseManagementServiceClient.UpdateLicensePoolAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateLicensePoolAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.UpdateLicensePoolAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool", + "name": "licensePool" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "UpdateLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.UpdateLicensePool", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 36, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_sync", + "title": "AssignRequestObject", + "description": "Snippet for Assign", + "file": "LicenseManagementServiceClient.AssignRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Assign", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.Assign", + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.AssignRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Commerce.Consumer.Procurement.V1.AssignResponse", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "Assign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Assign", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 34, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_async", + "title": "AssignRequestObjectAsync", + "description": "Snippet for AssignAsync", + "file": "LicenseManagementServiceClient.AssignRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "AssignAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.AssignAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.AssignRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "Assign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Assign", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 35, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_sync_flattened", + "title": "Assign", + "description": "Snippet for Assign", + "file": "LicenseManagementServiceClient.AssignSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Assign", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.Assign", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "usernames" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Commerce.Consumer.Procurement.V1.AssignResponse", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "Assign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Assign", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_async_flattened", + "title": "AssignAsync", + "description": "Snippet for AssignAsync", + "file": "LicenseManagementServiceClient.AssignAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "AssignAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.AssignAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "usernames" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "Assign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Assign", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 36, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_sync", + "title": "UnassignRequestObject", + "description": "Snippet for Unassign", + "file": "LicenseManagementServiceClient.UnassignRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Unassign", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.Unassign", + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignResponse", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "Unassign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Unassign", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 34, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_async", + "title": "UnassignRequestObjectAsync", + "description": "Snippet for UnassignAsync", + "file": "LicenseManagementServiceClient.UnassignRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UnassignAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.UnassignAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "Unassign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Unassign", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 35, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_sync_flattened", + "title": "Unassign", + "description": "Snippet for Unassign", + "file": "LicenseManagementServiceClient.UnassignSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Unassign", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.Unassign", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "usernames" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignResponse", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "Unassign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Unassign", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_async_flattened", + "title": "UnassignAsync", + "description": "Snippet for UnassignAsync", + "file": "LicenseManagementServiceClient.UnassignAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UnassignAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.UnassignAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "usernames" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "Unassign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Unassign", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 36, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_sync", + "title": "EnumerateLicensedUsersRequestObject", + "description": "Snippet for EnumerateLicensedUsers", + "file": "LicenseManagementServiceClient.EnumerateLicensedUsersRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "EnumerateLicensedUsers", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.EnumerateLicensedUsers", + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "EnumerateLicensedUsers", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsers", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_async", + "title": "EnumerateLicensedUsersRequestObjectAsync", + "description": "Snippet for EnumerateLicensedUsersAsync", + "file": "LicenseManagementServiceClient.EnumerateLicensedUsersRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "EnumerateLicensedUsersAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.EnumerateLicensedUsersAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "EnumerateLicensedUsers", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsers", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 38, + "end": 75, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_sync_flattened", + "title": "EnumerateLicensedUsers", + "description": "Snippet for EnumerateLicensedUsers", + "file": "LicenseManagementServiceClient.EnumerateLicensedUsersSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "EnumerateLicensedUsers", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.EnumerateLicensedUsers", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "EnumerateLicensedUsers", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsers", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_async_flattened", + "title": "EnumerateLicensedUsersAsync", + "description": "Snippet for EnumerateLicensedUsersAsync", + "file": "LicenseManagementServiceClient.EnumerateLicensedUsersAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "EnumerateLicensedUsersAsync", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient.EnumerateLicensedUsersAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "EnumerateLicensedUsers", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsers", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 38, + "end": 75, + "type": "SHORT" + } + ] } ] } diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.Snippets/ConsumerProcurementServiceClientSnippets.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.Snippets/ConsumerProcurementServiceClientSnippets.g.cs index 71c03b2af9a8..6fc0e2256741 100644 --- a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.Snippets/ConsumerProcurementServiceClientSnippets.g.cs +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.Snippets/ConsumerProcurementServiceClientSnippets.g.cs @@ -339,5 +339,151 @@ await response.AsRawResponses().ForEachAsync((ListOrdersResponse page) => string nextPageToken = singlePage.NextPageToken; // End snippet } + + /// Snippet for ModifyOrder + public void ModifyOrderRequestObject() + { + // Snippet: ModifyOrder(ModifyOrderRequest, CallSettings) + // Create client + ConsumerProcurementServiceClient consumerProcurementServiceClient = ConsumerProcurementServiceClient.Create(); + // Initialize request argument(s) + ModifyOrderRequest request = new ModifyOrderRequest + { + Name = "", + Etag = "", + DisplayName = "", + Modifications = + { + new ModifyOrderRequest.Types.Modification(), + }, + }; + // Make the request + Operation response = consumerProcurementServiceClient.ModifyOrder(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Order 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 retrievedResponse = consumerProcurementServiceClient.PollOnceModifyOrder(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Order retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for ModifyOrderAsync + public async Task ModifyOrderRequestObjectAsync() + { + // Snippet: ModifyOrderAsync(ModifyOrderRequest, CallSettings) + // Additional: ModifyOrderAsync(ModifyOrderRequest, CancellationToken) + // Create client + ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync(); + // Initialize request argument(s) + ModifyOrderRequest request = new ModifyOrderRequest + { + Name = "", + Etag = "", + DisplayName = "", + Modifications = + { + new ModifyOrderRequest.Types.Modification(), + }, + }; + // Make the request + Operation response = await consumerProcurementServiceClient.ModifyOrderAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Order 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 retrievedResponse = await consumerProcurementServiceClient.PollOnceModifyOrderAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Order retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CancelOrder + public void CancelOrderRequestObject() + { + // Snippet: CancelOrder(CancelOrderRequest, CallSettings) + // Create client + ConsumerProcurementServiceClient consumerProcurementServiceClient = ConsumerProcurementServiceClient.Create(); + // Initialize request argument(s) + CancelOrderRequest request = new CancelOrderRequest + { + Name = "", + Etag = "", + CancellationPolicy = CancelOrderRequest.Types.CancellationPolicy.Unspecified, + }; + // Make the request + Operation response = consumerProcurementServiceClient.CancelOrder(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Order 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 retrievedResponse = consumerProcurementServiceClient.PollOnceCancelOrder(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Order retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CancelOrderAsync + public async Task CancelOrderRequestObjectAsync() + { + // Snippet: CancelOrderAsync(CancelOrderRequest, CallSettings) + // Additional: CancelOrderAsync(CancelOrderRequest, CancellationToken) + // Create client + ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync(); + // Initialize request argument(s) + CancelOrderRequest request = new CancelOrderRequest + { + Name = "", + Etag = "", + CancellationPolicy = CancelOrderRequest.Types.CancellationPolicy.Unspecified, + }; + // Make the request + Operation response = await consumerProcurementServiceClient.CancelOrderAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Order 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 retrievedResponse = await consumerProcurementServiceClient.PollOnceCancelOrderAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Order retrievedResult = retrievedResponse.Result; + } + // End snippet + } } } diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.Snippets/LicenseManagementServiceClientSnippets.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.Snippets/LicenseManagementServiceClientSnippets.g.cs new file mode 100644 index 000000000000..23fff9a2cd25 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1.Snippets/LicenseManagementServiceClientSnippets.g.cs @@ -0,0 +1,456 @@ +// 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 +{ + using Google.Api.Gax; + using Google.Cloud.Commerce.Consumer.Procurement.V1; + using Google.Protobuf.WellKnownTypes; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Threading.Tasks; + + /// Generated snippets. + public sealed class AllGeneratedLicenseManagementServiceClientSnippets + { + /// Snippet for GetLicensePool + public void GetLicensePoolRequestObject() + { + // Snippet: GetLicensePool(GetLicensePoolRequest, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + GetLicensePoolRequest request = new GetLicensePoolRequest { Name = "", }; + // Make the request + LicensePool response = licenseManagementServiceClient.GetLicensePool(request); + // End snippet + } + + /// Snippet for GetLicensePoolAsync + public async Task GetLicensePoolRequestObjectAsync() + { + // Snippet: GetLicensePoolAsync(GetLicensePoolRequest, CallSettings) + // Additional: GetLicensePoolAsync(GetLicensePoolRequest, CancellationToken) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + GetLicensePoolRequest request = new GetLicensePoolRequest { Name = "", }; + // Make the request + LicensePool response = await licenseManagementServiceClient.GetLicensePoolAsync(request); + // End snippet + } + + /// Snippet for GetLicensePool + public void GetLicensePool() + { + // Snippet: GetLicensePool(string, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + string name = ""; + // Make the request + LicensePool response = licenseManagementServiceClient.GetLicensePool(name); + // End snippet + } + + /// Snippet for GetLicensePoolAsync + public async Task GetLicensePoolAsync() + { + // Snippet: GetLicensePoolAsync(string, CallSettings) + // Additional: GetLicensePoolAsync(string, CancellationToken) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = ""; + // Make the request + LicensePool response = await licenseManagementServiceClient.GetLicensePoolAsync(name); + // End snippet + } + + /// Snippet for UpdateLicensePool + public void UpdateLicensePoolRequestObject() + { + // Snippet: UpdateLicensePool(UpdateLicensePoolRequest, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + UpdateLicensePoolRequest request = new UpdateLicensePoolRequest + { + LicensePool = new LicensePool(), + UpdateMask = new FieldMask(), + }; + // Make the request + LicensePool response = licenseManagementServiceClient.UpdateLicensePool(request); + // End snippet + } + + /// Snippet for UpdateLicensePoolAsync + public async Task UpdateLicensePoolRequestObjectAsync() + { + // Snippet: UpdateLicensePoolAsync(UpdateLicensePoolRequest, CallSettings) + // Additional: UpdateLicensePoolAsync(UpdateLicensePoolRequest, CancellationToken) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + UpdateLicensePoolRequest request = new UpdateLicensePoolRequest + { + LicensePool = new LicensePool(), + UpdateMask = new FieldMask(), + }; + // Make the request + LicensePool response = await licenseManagementServiceClient.UpdateLicensePoolAsync(request); + // End snippet + } + + /// Snippet for UpdateLicensePool + public void UpdateLicensePool() + { + // Snippet: UpdateLicensePool(LicensePool, FieldMask, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + LicensePool licensePool = new LicensePool(); + FieldMask updateMask = new FieldMask(); + // Make the request + LicensePool response = licenseManagementServiceClient.UpdateLicensePool(licensePool, updateMask); + // End snippet + } + + /// Snippet for UpdateLicensePoolAsync + public async Task UpdateLicensePoolAsync() + { + // Snippet: UpdateLicensePoolAsync(LicensePool, FieldMask, CallSettings) + // Additional: UpdateLicensePoolAsync(LicensePool, FieldMask, CancellationToken) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + LicensePool licensePool = new LicensePool(); + FieldMask updateMask = new FieldMask(); + // Make the request + LicensePool response = await licenseManagementServiceClient.UpdateLicensePoolAsync(licensePool, updateMask); + // End snippet + } + + /// Snippet for Assign + public void AssignRequestObject() + { + // Snippet: Assign(AssignRequest, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + AssignRequest request = new AssignRequest + { + Parent = "", + Usernames = { "", }, + }; + // Make the request + AssignResponse response = licenseManagementServiceClient.Assign(request); + // End snippet + } + + /// Snippet for AssignAsync + public async Task AssignRequestObjectAsync() + { + // Snippet: AssignAsync(AssignRequest, CallSettings) + // Additional: AssignAsync(AssignRequest, CancellationToken) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + AssignRequest request = new AssignRequest + { + Parent = "", + Usernames = { "", }, + }; + // Make the request + AssignResponse response = await licenseManagementServiceClient.AssignAsync(request); + // End snippet + } + + /// Snippet for Assign + public void Assign() + { + // Snippet: Assign(string, IEnumerable, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + string parent = ""; + IEnumerable usernames = new string[] { "", }; + // Make the request + AssignResponse response = licenseManagementServiceClient.Assign(parent, usernames); + // End snippet + } + + /// Snippet for AssignAsync + public async Task AssignAsync() + { + // Snippet: AssignAsync(string, IEnumerable, CallSettings) + // Additional: AssignAsync(string, IEnumerable, CancellationToken) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = ""; + IEnumerable usernames = new string[] { "", }; + // Make the request + AssignResponse response = await licenseManagementServiceClient.AssignAsync(parent, usernames); + // End snippet + } + + /// Snippet for Unassign + public void UnassignRequestObject() + { + // Snippet: Unassign(UnassignRequest, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + UnassignRequest request = new UnassignRequest + { + Parent = "", + Usernames = { "", }, + }; + // Make the request + UnassignResponse response = licenseManagementServiceClient.Unassign(request); + // End snippet + } + + /// Snippet for UnassignAsync + public async Task UnassignRequestObjectAsync() + { + // Snippet: UnassignAsync(UnassignRequest, CallSettings) + // Additional: UnassignAsync(UnassignRequest, CancellationToken) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + UnassignRequest request = new UnassignRequest + { + Parent = "", + Usernames = { "", }, + }; + // Make the request + UnassignResponse response = await licenseManagementServiceClient.UnassignAsync(request); + // End snippet + } + + /// Snippet for Unassign + public void Unassign() + { + // Snippet: Unassign(string, IEnumerable, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + string parent = ""; + IEnumerable usernames = new string[] { "", }; + // Make the request + UnassignResponse response = licenseManagementServiceClient.Unassign(parent, usernames); + // End snippet + } + + /// Snippet for UnassignAsync + public async Task UnassignAsync() + { + // Snippet: UnassignAsync(string, IEnumerable, CallSettings) + // Additional: UnassignAsync(string, IEnumerable, CancellationToken) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = ""; + IEnumerable usernames = new string[] { "", }; + // Make the request + UnassignResponse response = await licenseManagementServiceClient.UnassignAsync(parent, usernames); + // End snippet + } + + /// Snippet for EnumerateLicensedUsers + public void EnumerateLicensedUsersRequestObject() + { + // Snippet: EnumerateLicensedUsers(EnumerateLicensedUsersRequest, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + EnumerateLicensedUsersRequest request = new EnumerateLicensedUsersRequest { Parent = "", }; + // Make the request + PagedEnumerable response = licenseManagementServiceClient.EnumerateLicensedUsers(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (LicensedUser item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (EnumerateLicensedUsersResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (LicensedUser item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (LicensedUser item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for EnumerateLicensedUsersAsync + public async Task EnumerateLicensedUsersRequestObjectAsync() + { + // Snippet: EnumerateLicensedUsersAsync(EnumerateLicensedUsersRequest, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + EnumerateLicensedUsersRequest request = new EnumerateLicensedUsersRequest { Parent = "", }; + // Make the request + PagedAsyncEnumerable response = licenseManagementServiceClient.EnumerateLicensedUsersAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((LicensedUser item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((EnumerateLicensedUsersResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (LicensedUser item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (LicensedUser item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for EnumerateLicensedUsers + public void EnumerateLicensedUsers() + { + // Snippet: EnumerateLicensedUsers(string, string, int?, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = LicenseManagementServiceClient.Create(); + // Initialize request argument(s) + string parent = ""; + // Make the request + PagedEnumerable response = licenseManagementServiceClient.EnumerateLicensedUsers(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (LicensedUser item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (EnumerateLicensedUsersResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (LicensedUser item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (LicensedUser item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for EnumerateLicensedUsersAsync + public async Task EnumerateLicensedUsersAsync() + { + // Snippet: EnumerateLicensedUsersAsync(string, string, int?, CallSettings) + // Create client + LicenseManagementServiceClient licenseManagementServiceClient = await LicenseManagementServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = ""; + // Make the request + PagedAsyncEnumerable response = licenseManagementServiceClient.EnumerateLicensedUsersAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((LicensedUser item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((EnumerateLicensedUsersResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (LicensedUser item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (LicensedUser item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + } +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ConsumerProcurementServiceClient.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ConsumerProcurementServiceClient.g.cs index b432289d90df..af4afcb02732 100644 --- a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ConsumerProcurementServiceClient.g.cs +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ConsumerProcurementServiceClient.g.cs @@ -52,6 +52,10 @@ private ConsumerProcurementServiceSettings(ConsumerProcurementServiceSettings ex PlaceOrderOperationsSettings = existing.PlaceOrderOperationsSettings.Clone(); GetOrderSettings = existing.GetOrderSettings; ListOrdersSettings = existing.ListOrdersSettings; + ModifyOrderSettings = existing.ModifyOrderSettings; + ModifyOrderOperationsSettings = existing.ModifyOrderOperationsSettings.Clone(); + CancelOrderSettings = existing.CancelOrderSettings; + CancelOrderOperationsSettings = existing.CancelOrderOperationsSettings.Clone(); OnCopy(existing); } @@ -125,6 +129,68 @@ private ConsumerProcurementServiceSettings(ConsumerProcurementServiceSettings ex /// public gaxgrpc::CallSettings ListOrdersSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + /// + /// for synchronous and asynchronous calls to + /// ConsumerProcurementServiceClient.ModifyOrder and ConsumerProcurementServiceClient.ModifyOrderAsync + /// . + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings ModifyOrderSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// + /// Long Running Operation settings for calls to ConsumerProcurementServiceClient.ModifyOrder and + /// ConsumerProcurementServiceClient.ModifyOrderAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings ModifyOrderOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// for synchronous and asynchronous calls to + /// ConsumerProcurementServiceClient.CancelOrder and ConsumerProcurementServiceClient.CancelOrderAsync + /// . + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings CancelOrderSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// + /// Long Running Operation settings for calls to ConsumerProcurementServiceClient.CancelOrder and + /// ConsumerProcurementServiceClient.CancelOrderAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings CancelOrderOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + /// Creates a deep clone of this object, with all the same property values. /// A deep clone of this object. public ConsumerProcurementServiceSettings Clone() => new ConsumerProcurementServiceSettings(this); @@ -215,7 +281,7 @@ public abstract partial class ConsumerProcurementServiceClient }); /// The service metadata associated with this client type. - public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(ConsumerProcurementService.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Grpc, PackageApiMetadata.ApiMetadata); + public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(ConsumerProcurementService.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Grpc | gax::ApiTransports.Rest, PackageApiMetadata.ApiMetadata); internal static gaxgrpc::ChannelPool ChannelPool { get; } = new gaxgrpc::ChannelPool(ServiceMetadata); @@ -522,6 +588,121 @@ public virtual Order GetOrder(string name, gaxgrpc::CallSettings callSettings = } return ListOrdersAsync(request, callSettings); } + + /// + /// Modifies an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation ModifyOrder(ModifyOrderRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Modifies an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> ModifyOrderAsync(ModifyOrderRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Modifies an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> ModifyOrderAsync(ModifyOrderRequest request, st::CancellationToken cancellationToken) => + ModifyOrderAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for ModifyOrder. + public virtual lro::OperationsClient ModifyOrderOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of ModifyOrder. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceModifyOrder(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), ModifyOrderOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// ModifyOrder. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceModifyOrderAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), ModifyOrderOperationsClient, callSettings); + + /// + /// Cancels an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product + /// procured in the Order will be cancelled. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation CancelOrder(CancelOrderRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Cancels an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product + /// procured in the Order will be cancelled. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> CancelOrderAsync(CancelOrderRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Cancels an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product + /// procured in the Order will be cancelled. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> CancelOrderAsync(CancelOrderRequest request, st::CancellationToken cancellationToken) => + CancelOrderAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for CancelOrder. + public virtual lro::OperationsClient CancelOrderOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of CancelOrder. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceCancelOrder(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), CancelOrderOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// CancelOrder. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceCancelOrderAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), CancelOrderOperationsClient, callSettings); } /// ConsumerProcurementService client wrapper implementation, for convenient use. @@ -544,6 +725,10 @@ public sealed partial class ConsumerProcurementServiceClientImpl : ConsumerProcu private readonly gaxgrpc::ApiCall _callListOrders; + private readonly gaxgrpc::ApiCall _callModifyOrder; + + private readonly gaxgrpc::ApiCall _callCancelOrder; + /// /// Constructs a client wrapper for the ConsumerProcurementService service, with the specified gRPC client and /// settings. @@ -563,6 +748,8 @@ public ConsumerProcurementServiceClientImpl(ConsumerProcurementService.ConsumerP Logger = logger, }); PlaceOrderOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.PlaceOrderOperationsSettings, logger); + ModifyOrderOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.ModifyOrderOperationsSettings, logger); + CancelOrderOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.CancelOrderOperationsSettings, logger); _callPlaceOrder = clientHelper.BuildApiCall("PlaceOrder", grpcClient.PlaceOrderAsync, grpcClient.PlaceOrder, effectiveSettings.PlaceOrderSettings).WithGoogleRequestParam("parent", request => request.Parent); Modify_ApiCall(ref _callPlaceOrder); Modify_PlaceOrderApiCall(ref _callPlaceOrder); @@ -572,6 +759,12 @@ public ConsumerProcurementServiceClientImpl(ConsumerProcurementService.ConsumerP _callListOrders = clientHelper.BuildApiCall("ListOrders", grpcClient.ListOrdersAsync, grpcClient.ListOrders, effectiveSettings.ListOrdersSettings).WithGoogleRequestParam("parent", request => request.Parent); Modify_ApiCall(ref _callListOrders); Modify_ListOrdersApiCall(ref _callListOrders); + _callModifyOrder = clientHelper.BuildApiCall("ModifyOrder", grpcClient.ModifyOrderAsync, grpcClient.ModifyOrder, effectiveSettings.ModifyOrderSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callModifyOrder); + Modify_ModifyOrderApiCall(ref _callModifyOrder); + _callCancelOrder = clientHelper.BuildApiCall("CancelOrder", grpcClient.CancelOrderAsync, grpcClient.CancelOrder, effectiveSettings.CancelOrderSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callCancelOrder); + Modify_CancelOrderApiCall(ref _callCancelOrder); OnConstruction(grpcClient, effectiveSettings, clientHelper); } @@ -583,6 +776,10 @@ public ConsumerProcurementServiceClientImpl(ConsumerProcurementService.ConsumerP partial void Modify_ListOrdersApiCall(ref gaxgrpc::ApiCall call); + partial void Modify_ModifyOrderApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_CancelOrderApiCall(ref gaxgrpc::ApiCall call); + partial void OnConstruction(ConsumerProcurementService.ConsumerProcurementServiceClient grpcClient, ConsumerProcurementServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper); /// The underlying gRPC ConsumerProcurementService client @@ -594,6 +791,10 @@ public ConsumerProcurementServiceClientImpl(ConsumerProcurementService.ConsumerP partial void Modify_ListOrdersRequest(ref ListOrdersRequest request, ref gaxgrpc::CallSettings settings); + partial void Modify_ModifyOrderRequest(ref ModifyOrderRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_CancelOrderRequest(ref CancelOrderRequest request, ref gaxgrpc::CallSettings settings); + /// The long-running operations client for PlaceOrder. public override lro::OperationsClient PlaceOrderOperationsClient { get; } @@ -692,6 +893,66 @@ public override Order GetOrder(GetOrderRequest request, gaxgrpc::CallSettings ca Modify_ListOrdersRequest(ref request, ref callSettings); return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListOrders, request, callSettings); } + + /// The long-running operations client for ModifyOrder. + public override lro::OperationsClient ModifyOrderOperationsClient { get; } + + /// + /// Modifies an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override lro::Operation ModifyOrder(ModifyOrderRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ModifyOrderRequest(ref request, ref callSettings); + return new lro::Operation(_callModifyOrder.Sync(request, callSettings), ModifyOrderOperationsClient); + } + + /// + /// Modifies an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override async stt::Task> ModifyOrderAsync(ModifyOrderRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ModifyOrderRequest(ref request, ref callSettings); + return new lro::Operation(await _callModifyOrder.Async(request, callSettings).ConfigureAwait(false), ModifyOrderOperationsClient); + } + + /// The long-running operations client for CancelOrder. + public override lro::OperationsClient CancelOrderOperationsClient { get; } + + /// + /// Cancels an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product + /// procured in the Order will be cancelled. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override lro::Operation CancelOrder(CancelOrderRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CancelOrderRequest(ref request, ref callSettings); + return new lro::Operation(_callCancelOrder.Sync(request, callSettings), CancelOrderOperationsClient); + } + + /// + /// Cancels an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product + /// procured in the Order will be cancelled. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override async stt::Task> CancelOrderAsync(CancelOrderRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CancelOrderRequest(ref request, ref callSettings); + return new lro::Operation(await _callCancelOrder.Async(request, callSettings).ConfigureAwait(false), CancelOrderOperationsClient); + } } public partial class ListOrdersRequest : gaxgrpc::IPageRequest diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementService.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementService.g.cs new file mode 100644 index 000000000000..6846bf1856e5 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementService.g.cs @@ -0,0 +1,3150 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/commerce/consumer/procurement/v1/license_management_service.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Commerce.Consumer.Procurement.V1 { + + /// Holder for reflection information generated from google/cloud/commerce/consumer/procurement/v1/license_management_service.proto + public static partial class LicenseManagementServiceReflection { + + #region Descriptor + /// File descriptor for google/cloud/commerce/consumer/procurement/v1/license_management_service.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static LicenseManagementServiceReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ck5nb29nbGUvY2xvdWQvY29tbWVyY2UvY29uc3VtZXIvcHJvY3VyZW1lbnQv", + "djEvbGljZW5zZV9tYW5hZ2VtZW50X3NlcnZpY2UucHJvdG8SLWdvb2dsZS5j", + "bG91ZC5jb21tZXJjZS5jb25zdW1lci5wcm9jdXJlbWVudC52MRocZ29vZ2xl", + "L2FwaS9hbm5vdGF0aW9ucy5wcm90bxoXZ29vZ2xlL2FwaS9jbGllbnQucHJv", + "dG8aH2dvb2dsZS9hcGkvZmllbGRfYmVoYXZpb3IucHJvdG8aGWdvb2dsZS9h", + "cGkvcmVzb3VyY2UucHJvdG8aHmdvb2dsZS9wcm90b2J1Zi9kdXJhdGlvbi5w", + "cm90bxogZ29vZ2xlL3Byb3RvYnVmL2ZpZWxkX21hc2sucHJvdG8aH2dvb2ds", + "ZS9wcm90b2J1Zi90aW1lc3RhbXAucHJvdG8igwMKEkFzc2lnbm1lbnRQcm90", + "b2NvbBJ4ChZtYW51YWxfYXNzaWdubWVudF90eXBlGAIgASgLMlYuZ29vZ2xl", + "LmNsb3VkLmNvbW1lcmNlLmNvbnN1bWVyLnByb2N1cmVtZW50LnYxLkFzc2ln", + "bm1lbnRQcm90b2NvbC5NYW51YWxBc3NpZ25tZW50VHlwZUgAEnQKFGF1dG9f", + "YXNzaWdubWVudF90eXBlGAMgASgLMlQuZ29vZ2xlLmNsb3VkLmNvbW1lcmNl", + "LmNvbnN1bWVyLnByb2N1cmVtZW50LnYxLkFzc2lnbm1lbnRQcm90b2NvbC5B", + "dXRvQXNzaWdubWVudFR5cGVIABoWChRNYW51YWxBc3NpZ25tZW50VHlwZRpS", + "ChJBdXRvQXNzaWdubWVudFR5cGUSPAoUaW5hY3RpdmVfbGljZW5zZV90dGwY", + "ASABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25CA+BBAUIRCg9hc3Np", + "Z25tZW50X3R5cGUi8gIKC0xpY2Vuc2VQb29sEhEKBG5hbWUYASABKAlCA+BB", + "CBJrChtsaWNlbnNlX2Fzc2lnbm1lbnRfcHJvdG9jb2wYAiABKAsyQS5nb29n", + "bGUuY2xvdWQuY29tbWVyY2UuY29uc3VtZXIucHJvY3VyZW1lbnQudjEuQXNz", + "aWdubWVudFByb3RvY29sQgPgQQISJAoXYXZhaWxhYmxlX2xpY2Vuc2VfY291", + "bnQYAyABKAVCA+BBAxIgChN0b3RhbF9saWNlbnNlX2NvdW50GAQgASgFQgPg", + "QQM6mgHqQZYBCjtjbG91ZGNvbW1lcmNlY29uc3VtZXJwcm9jdXJlbWVudC5n", + "b29nbGVhcGlzLmNvbS9MaWNlbnNlUG9vbBI8YmlsbGluZ0FjY291bnRzL3ti", + "aWxsaW5nX2FjY291bnR9L29yZGVycy97b3JkZXJ9L2xpY2Vuc2VQb29sKgxs", + "aWNlbnNlUG9vbHMyC2xpY2Vuc2VQb29sIioKFUdldExpY2Vuc2VQb29sUmVx", + "dWVzdBIRCgRuYW1lGAEgASgJQgPgQQIipwEKGFVwZGF0ZUxpY2Vuc2VQb29s", + "UmVxdWVzdBJVCgxsaWNlbnNlX3Bvb2wYASABKAsyOi5nb29nbGUuY2xvdWQu", + "Y29tbWVyY2UuY29uc3VtZXIucHJvY3VyZW1lbnQudjEuTGljZW5zZVBvb2xC", + "A+BBAhI0Cgt1cGRhdGVfbWFzaxgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5G", + "aWVsZE1hc2tCA+BBAiI8Cg1Bc3NpZ25SZXF1ZXN0EhMKBnBhcmVudBgBIAEo", + "CUID4EECEhYKCXVzZXJuYW1lcxgCIAMoCUID4EECIhAKDkFzc2lnblJlc3Bv", + "bnNlIj4KD1VuYXNzaWduUmVxdWVzdBITCgZwYXJlbnQYASABKAlCA+BBAhIW", + "Cgl1c2VybmFtZXMYAiADKAlCA+BBAiISChBVbmFzc2lnblJlc3BvbnNlImUK", + "HUVudW1lcmF0ZUxpY2Vuc2VkVXNlcnNSZXF1ZXN0EhMKBnBhcmVudBgBIAEo", + "CUID4EECEhYKCXBhZ2Vfc2l6ZRgCIAEoBUID4EEBEhcKCnBhZ2VfdG9rZW4Y", + "AyABKAlCA+BBASKSAQoMTGljZW5zZWRVc2VyEhAKCHVzZXJuYW1lGAEgASgJ", + "EjQKC2Fzc2lnbl90aW1lGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVz", + "dGFtcEID4EEDEjoKEXJlY2VudF91c2FnZV90aW1lGAMgASgLMhouZ29vZ2xl", + "LnByb3RvYnVmLlRpbWVzdGFtcEID4EEDIo4BCh5FbnVtZXJhdGVMaWNlbnNl", + "ZFVzZXJzUmVzcG9uc2USUwoObGljZW5zZWRfdXNlcnMYASADKAsyOy5nb29n", + "bGUuY2xvdWQuY29tbWVyY2UuY29uc3VtZXIucHJvY3VyZW1lbnQudjEuTGlj", + "ZW5zZWRVc2VyEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCTLFCgoYTGljZW5z", + "ZU1hbmFnZW1lbnRTZXJ2aWNlEtQBCg5HZXRMaWNlbnNlUG9vbBJELmdvb2ds", + "ZS5jbG91ZC5jb21tZXJjZS5jb25zdW1lci5wcm9jdXJlbWVudC52MS5HZXRM", + "aWNlbnNlUG9vbFJlcXVlc3QaOi5nb29nbGUuY2xvdWQuY29tbWVyY2UuY29u", + "c3VtZXIucHJvY3VyZW1lbnQudjEuTGljZW5zZVBvb2wiQNpBBG5hbWWC0+ST", + "AjMSMS92MS97bmFtZT1iaWxsaW5nQWNjb3VudHMvKi9vcmRlcnMvKi9saWNl", + "bnNlUG9vbH0SiwIKEVVwZGF0ZUxpY2Vuc2VQb29sEkcuZ29vZ2xlLmNsb3Vk", + "LmNvbW1lcmNlLmNvbnN1bWVyLnByb2N1cmVtZW50LnYxLlVwZGF0ZUxpY2Vu", + "c2VQb29sUmVxdWVzdBo6Lmdvb2dsZS5jbG91ZC5jb21tZXJjZS5jb25zdW1l", + "ci5wcm9jdXJlbWVudC52MS5MaWNlbnNlUG9vbCJx2kEYbGljZW5zZV9wb29s", + "LHVwZGF0ZV9tYXNrgtPkkwJQMkAvdjEve2xpY2Vuc2VfcG9vbC5uYW1lPWJp", + "bGxpbmdBY2NvdW50cy8qL29yZGVycy8qL2xpY2Vuc2VQb29sLyp9OgxsaWNl", + "bnNlX3Bvb2wS3wEKBkFzc2lnbhI8Lmdvb2dsZS5jbG91ZC5jb21tZXJjZS5j", + "b25zdW1lci5wcm9jdXJlbWVudC52MS5Bc3NpZ25SZXF1ZXN0Gj0uZ29vZ2xl", + "LmNsb3VkLmNvbW1lcmNlLmNvbnN1bWVyLnByb2N1cmVtZW50LnYxLkFzc2ln", + "blJlc3BvbnNlIljaQRBwYXJlbnQsdXNlcm5hbWVzgtPkkwI/IjovdjEve3Bh", + "cmVudD1iaWxsaW5nQWNjb3VudHMvKi9vcmRlcnMvKi9saWNlbnNlUG9vbH06", + "YXNzaWduOgEqEucBCghVbmFzc2lnbhI+Lmdvb2dsZS5jbG91ZC5jb21tZXJj", + "ZS5jb25zdW1lci5wcm9jdXJlbWVudC52MS5VbmFzc2lnblJlcXVlc3QaPy5n", + "b29nbGUuY2xvdWQuY29tbWVyY2UuY29uc3VtZXIucHJvY3VyZW1lbnQudjEu", + "VW5hc3NpZ25SZXNwb25zZSJa2kEQcGFyZW50LHVzZXJuYW1lc4LT5JMCQSI8", + "L3YxL3twYXJlbnQ9YmlsbGluZ0FjY291bnRzLyovb3JkZXJzLyovbGljZW5z", + "ZVBvb2x9OnVuYXNzaWduOgEqEpICChZFbnVtZXJhdGVMaWNlbnNlZFVzZXJz", + "EkwuZ29vZ2xlLmNsb3VkLmNvbW1lcmNlLmNvbnN1bWVyLnByb2N1cmVtZW50", + "LnYxLkVudW1lcmF0ZUxpY2Vuc2VkVXNlcnNSZXF1ZXN0Gk0uZ29vZ2xlLmNs", + "b3VkLmNvbW1lcmNlLmNvbnN1bWVyLnByb2N1cmVtZW50LnYxLkVudW1lcmF0", + "ZUxpY2Vuc2VkVXNlcnNSZXNwb25zZSJb2kEGcGFyZW50gtPkkwJMEkovdjEv", + "e3BhcmVudD1iaWxsaW5nQWNjb3VudHMvKi9vcmRlcnMvKi9saWNlbnNlUG9v", + "bH06ZW51bWVyYXRlTGljZW5zZWRVc2VycxpjykEvY2xvdWRjb21tZXJjZWNv", + "bnN1bWVycHJvY3VyZW1lbnQuZ29vZ2xlYXBpcy5jb23SQS5odHRwczovL3d3", + "dy5nb29nbGVhcGlzLmNvbS9hdXRoL2Nsb3VkLXBsYXRmb3JtQr4CCjFjb20u", + "Z29vZ2xlLmNsb3VkLmNvbW1lcmNlLmNvbnN1bWVyLnByb2N1cmVtZW50LnYx", + "Qh1MaWNlbnNlTWFuYWdlbWVudFNlcnZpY2VQcm90b1ABWlNjbG91ZC5nb29n", + "bGUuY29tL2dvL2NvbW1lcmNlL2NvbnN1bWVyL3Byb2N1cmVtZW50L2FwaXYx", + "L3Byb2N1cmVtZW50cGI7cHJvY3VyZW1lbnRwYqoCLUdvb2dsZS5DbG91ZC5D", + "b21tZXJjZS5Db25zdW1lci5Qcm9jdXJlbWVudC5WMcoCLUdvb2dsZVxDbG91", + "ZFxDb21tZXJjZVxDb25zdW1lclxQcm9jdXJlbWVudFxWMeoCMkdvb2dsZTo6", + "Q2xvdWQ6OkNvbW1lcmNlOjpDb25zdW1lcjo6UHJvY3VyZW1lbnQ6OlYxYgZw", + "cm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol), global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Parser, new[]{ "ManualAssignmentType", "AutoAssignmentType" }, new[]{ "AssignmentType" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.ManualAssignmentType), global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.ManualAssignmentType.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.AutoAssignmentType), global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.AutoAssignmentType.Parser, new[]{ "InactiveLicenseTtl" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool), global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool.Parser, new[]{ "Name", "LicenseAssignmentProtocol", "AvailableLicenseCount", "TotalLicenseCount" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.GetLicensePoolRequest), global::Google.Cloud.Commerce.Consumer.Procurement.V1.GetLicensePoolRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UpdateLicensePoolRequest), global::Google.Cloud.Commerce.Consumer.Procurement.V1.UpdateLicensePoolRequest.Parser, new[]{ "LicensePool", "UpdateMask" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignRequest), global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignRequest.Parser, new[]{ "Parent", "Usernames" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignResponse), global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignResponse.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignRequest), global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignRequest.Parser, new[]{ "Parent", "Usernames" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignResponse), global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignResponse.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersRequest), global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersRequest.Parser, new[]{ "Parent", "PageSize", "PageToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensedUser), global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensedUser.Parser, new[]{ "Username", "AssignTime", "RecentUsageTime" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersResponse), global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersResponse.Parser, new[]{ "LicensedUsers", "NextPageToken" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Assignment protocol for a license pool. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AssignmentProtocol : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AssignmentProtocol()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AssignmentProtocol() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AssignmentProtocol(AssignmentProtocol other) : this() { + switch (other.AssignmentTypeCase) { + case AssignmentTypeOneofCase.ManualAssignmentType: + ManualAssignmentType = other.ManualAssignmentType.Clone(); + break; + case AssignmentTypeOneofCase.AutoAssignmentType: + AutoAssignmentType = other.AutoAssignmentType.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AssignmentProtocol Clone() { + return new AssignmentProtocol(this); + } + + /// Field number for the "manual_assignment_type" field. + public const int ManualAssignmentTypeFieldNumber = 2; + /// + /// Allow manual assignments triggered by administrative operations only. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.ManualAssignmentType ManualAssignmentType { + get { return assignmentTypeCase_ == AssignmentTypeOneofCase.ManualAssignmentType ? (global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.ManualAssignmentType) assignmentType_ : null; } + set { + assignmentType_ = value; + assignmentTypeCase_ = value == null ? AssignmentTypeOneofCase.None : AssignmentTypeOneofCase.ManualAssignmentType; + } + } + + /// Field number for the "auto_assignment_type" field. + public const int AutoAssignmentTypeFieldNumber = 3; + /// + /// Allow automatic assignments triggered by data plane operations. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.AutoAssignmentType AutoAssignmentType { + get { return assignmentTypeCase_ == AssignmentTypeOneofCase.AutoAssignmentType ? (global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.AutoAssignmentType) assignmentType_ : null; } + set { + assignmentType_ = value; + assignmentTypeCase_ = value == null ? AssignmentTypeOneofCase.None : AssignmentTypeOneofCase.AutoAssignmentType; + } + } + + private object assignmentType_; + /// Enum of possible cases for the "assignment_type" oneof. + public enum AssignmentTypeOneofCase { + None = 0, + ManualAssignmentType = 2, + AutoAssignmentType = 3, + } + private AssignmentTypeOneofCase assignmentTypeCase_ = AssignmentTypeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AssignmentTypeOneofCase AssignmentTypeCase { + get { return assignmentTypeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearAssignmentType() { + assignmentTypeCase_ = AssignmentTypeOneofCase.None; + assignmentType_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AssignmentProtocol); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AssignmentProtocol other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ManualAssignmentType, other.ManualAssignmentType)) return false; + if (!object.Equals(AutoAssignmentType, other.AutoAssignmentType)) return false; + if (AssignmentTypeCase != other.AssignmentTypeCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (assignmentTypeCase_ == AssignmentTypeOneofCase.ManualAssignmentType) hash ^= ManualAssignmentType.GetHashCode(); + if (assignmentTypeCase_ == AssignmentTypeOneofCase.AutoAssignmentType) hash ^= AutoAssignmentType.GetHashCode(); + hash ^= (int) assignmentTypeCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (assignmentTypeCase_ == AssignmentTypeOneofCase.ManualAssignmentType) { + output.WriteRawTag(18); + output.WriteMessage(ManualAssignmentType); + } + if (assignmentTypeCase_ == AssignmentTypeOneofCase.AutoAssignmentType) { + output.WriteRawTag(26); + output.WriteMessage(AutoAssignmentType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (assignmentTypeCase_ == AssignmentTypeOneofCase.ManualAssignmentType) { + output.WriteRawTag(18); + output.WriteMessage(ManualAssignmentType); + } + if (assignmentTypeCase_ == AssignmentTypeOneofCase.AutoAssignmentType) { + output.WriteRawTag(26); + output.WriteMessage(AutoAssignmentType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (assignmentTypeCase_ == AssignmentTypeOneofCase.ManualAssignmentType) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ManualAssignmentType); + } + if (assignmentTypeCase_ == AssignmentTypeOneofCase.AutoAssignmentType) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AutoAssignmentType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AssignmentProtocol other) { + if (other == null) { + return; + } + switch (other.AssignmentTypeCase) { + case AssignmentTypeOneofCase.ManualAssignmentType: + if (ManualAssignmentType == null) { + ManualAssignmentType = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.ManualAssignmentType(); + } + ManualAssignmentType.MergeFrom(other.ManualAssignmentType); + break; + case AssignmentTypeOneofCase.AutoAssignmentType: + if (AutoAssignmentType == null) { + AutoAssignmentType = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.AutoAssignmentType(); + } + AutoAssignmentType.MergeFrom(other.AutoAssignmentType); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 18: { + global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.ManualAssignmentType subBuilder = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.ManualAssignmentType(); + if (assignmentTypeCase_ == AssignmentTypeOneofCase.ManualAssignmentType) { + subBuilder.MergeFrom(ManualAssignmentType); + } + input.ReadMessage(subBuilder); + ManualAssignmentType = subBuilder; + break; + } + case 26: { + global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.AutoAssignmentType subBuilder = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.AutoAssignmentType(); + if (assignmentTypeCase_ == AssignmentTypeOneofCase.AutoAssignmentType) { + subBuilder.MergeFrom(AutoAssignmentType); + } + input.ReadMessage(subBuilder); + AutoAssignmentType = subBuilder; + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 18: { + global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.ManualAssignmentType subBuilder = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.ManualAssignmentType(); + if (assignmentTypeCase_ == AssignmentTypeOneofCase.ManualAssignmentType) { + subBuilder.MergeFrom(ManualAssignmentType); + } + input.ReadMessage(subBuilder); + ManualAssignmentType = subBuilder; + break; + } + case 26: { + global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.AutoAssignmentType subBuilder = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Types.AutoAssignmentType(); + if (assignmentTypeCase_ == AssignmentTypeOneofCase.AutoAssignmentType) { + subBuilder.MergeFrom(AutoAssignmentType); + } + input.ReadMessage(subBuilder); + AutoAssignmentType = subBuilder; + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the AssignmentProtocol message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Allow manual assignments triggered by administrative operations only. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ManualAssignmentType : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ManualAssignmentType()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManualAssignmentType() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManualAssignmentType(ManualAssignmentType other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManualAssignmentType Clone() { + return new ManualAssignmentType(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ManualAssignmentType); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ManualAssignmentType other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ManualAssignmentType other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + /// + /// Configuration for automatic assignments handled by data plane operations. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AutoAssignmentType : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AutoAssignmentType()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AutoAssignmentType() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AutoAssignmentType(AutoAssignmentType other) : this() { + inactiveLicenseTtl_ = other.inactiveLicenseTtl_ != null ? other.inactiveLicenseTtl_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AutoAssignmentType Clone() { + return new AutoAssignmentType(this); + } + + /// Field number for the "inactive_license_ttl" field. + public const int InactiveLicenseTtlFieldNumber = 1; + private global::Google.Protobuf.WellKnownTypes.Duration inactiveLicenseTtl_; + /// + /// Optional. The time to live for an inactive license. After this time has + /// passed, the license will be automatically unassigned from the user. Must + /// be at least 7 days, if set. If unset, the license will never expire. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Duration InactiveLicenseTtl { + get { return inactiveLicenseTtl_; } + set { + inactiveLicenseTtl_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AutoAssignmentType); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AutoAssignmentType other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(InactiveLicenseTtl, other.InactiveLicenseTtl)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (inactiveLicenseTtl_ != null) hash ^= InactiveLicenseTtl.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (inactiveLicenseTtl_ != null) { + output.WriteRawTag(10); + output.WriteMessage(InactiveLicenseTtl); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (inactiveLicenseTtl_ != null) { + output.WriteRawTag(10); + output.WriteMessage(InactiveLicenseTtl); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (inactiveLicenseTtl_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(InactiveLicenseTtl); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AutoAssignmentType other) { + if (other == null) { + return; + } + if (other.inactiveLicenseTtl_ != null) { + if (inactiveLicenseTtl_ == null) { + InactiveLicenseTtl = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + InactiveLicenseTtl.MergeFrom(other.InactiveLicenseTtl); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (inactiveLicenseTtl_ == null) { + InactiveLicenseTtl = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + input.ReadMessage(InactiveLicenseTtl); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (inactiveLicenseTtl_ == null) { + InactiveLicenseTtl = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + input.ReadMessage(InactiveLicenseTtl); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// A license pool represents a pool of licenses that can be assigned to users. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LicensePool : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LicensePool()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicensePool() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicensePool(LicensePool other) : this() { + name_ = other.name_; + licenseAssignmentProtocol_ = other.licenseAssignmentProtocol_ != null ? other.licenseAssignmentProtocol_.Clone() : null; + availableLicenseCount_ = other.availableLicenseCount_; + totalLicenseCount_ = other.totalLicenseCount_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicensePool Clone() { + return new LicensePool(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Identifier. Format: + /// `billingAccounts/{billing_account}/orders/{order}/licensePool` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "license_assignment_protocol" field. + public const int LicenseAssignmentProtocolFieldNumber = 2; + private global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol licenseAssignmentProtocol_; + /// + /// Required. Assignment protocol for the license pool. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol LicenseAssignmentProtocol { + get { return licenseAssignmentProtocol_; } + set { + licenseAssignmentProtocol_ = value; + } + } + + /// Field number for the "available_license_count" field. + public const int AvailableLicenseCountFieldNumber = 3; + private int availableLicenseCount_; + /// + /// Output only. Licenses count that are available to be assigned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int AvailableLicenseCount { + get { return availableLicenseCount_; } + set { + availableLicenseCount_ = value; + } + } + + /// Field number for the "total_license_count" field. + public const int TotalLicenseCountFieldNumber = 4; + private int totalLicenseCount_; + /// + /// Output only. Total number of licenses in the pool. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TotalLicenseCount { + get { return totalLicenseCount_; } + set { + totalLicenseCount_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as LicensePool); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LicensePool other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (!object.Equals(LicenseAssignmentProtocol, other.LicenseAssignmentProtocol)) return false; + if (AvailableLicenseCount != other.AvailableLicenseCount) return false; + if (TotalLicenseCount != other.TotalLicenseCount) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (licenseAssignmentProtocol_ != null) hash ^= LicenseAssignmentProtocol.GetHashCode(); + if (AvailableLicenseCount != 0) hash ^= AvailableLicenseCount.GetHashCode(); + if (TotalLicenseCount != 0) hash ^= TotalLicenseCount.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (licenseAssignmentProtocol_ != null) { + output.WriteRawTag(18); + output.WriteMessage(LicenseAssignmentProtocol); + } + if (AvailableLicenseCount != 0) { + output.WriteRawTag(24); + output.WriteInt32(AvailableLicenseCount); + } + if (TotalLicenseCount != 0) { + output.WriteRawTag(32); + output.WriteInt32(TotalLicenseCount); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (licenseAssignmentProtocol_ != null) { + output.WriteRawTag(18); + output.WriteMessage(LicenseAssignmentProtocol); + } + if (AvailableLicenseCount != 0) { + output.WriteRawTag(24); + output.WriteInt32(AvailableLicenseCount); + } + if (TotalLicenseCount != 0) { + output.WriteRawTag(32); + output.WriteInt32(TotalLicenseCount); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (licenseAssignmentProtocol_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(LicenseAssignmentProtocol); + } + if (AvailableLicenseCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(AvailableLicenseCount); + } + if (TotalLicenseCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TotalLicenseCount); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LicensePool other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.licenseAssignmentProtocol_ != null) { + if (licenseAssignmentProtocol_ == null) { + LicenseAssignmentProtocol = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol(); + } + LicenseAssignmentProtocol.MergeFrom(other.LicenseAssignmentProtocol); + } + if (other.AvailableLicenseCount != 0) { + AvailableLicenseCount = other.AvailableLicenseCount; + } + if (other.TotalLicenseCount != 0) { + TotalLicenseCount = other.TotalLicenseCount; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + if (licenseAssignmentProtocol_ == null) { + LicenseAssignmentProtocol = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol(); + } + input.ReadMessage(LicenseAssignmentProtocol); + break; + } + case 24: { + AvailableLicenseCount = input.ReadInt32(); + break; + } + case 32: { + TotalLicenseCount = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + if (licenseAssignmentProtocol_ == null) { + LicenseAssignmentProtocol = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignmentProtocol(); + } + input.ReadMessage(LicenseAssignmentProtocol); + break; + } + case 24: { + AvailableLicenseCount = input.ReadInt32(); + break; + } + case 32: { + TotalLicenseCount = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for getting a license pool. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetLicensePoolRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetLicensePoolRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetLicensePoolRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetLicensePoolRequest(GetLicensePoolRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetLicensePoolRequest Clone() { + return new GetLicensePoolRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The name of the license pool to get. + /// Format: `billingAccounts/{billing_account}/orders/{order}/licensePool` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetLicensePoolRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetLicensePoolRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetLicensePoolRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for updating a license pool. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UpdateLicensePoolRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateLicensePoolRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateLicensePoolRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateLicensePoolRequest(UpdateLicensePoolRequest other) : this() { + licensePool_ = other.licensePool_ != null ? other.licensePool_.Clone() : null; + updateMask_ = other.updateMask_ != null ? other.updateMask_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateLicensePoolRequest Clone() { + return new UpdateLicensePoolRequest(this); + } + + /// Field number for the "license_pool" field. + public const int LicensePoolFieldNumber = 1; + private global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool licensePool_; + /// + /// Required. The license pool to update. + /// + /// The license pool's name field is used to identify the license pool to + /// update. Format: + /// `billingAccounts/{billing_account}/orders/{order}/licensePool`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool LicensePool { + get { return licensePool_; } + set { + licensePool_ = value; + } + } + + /// Field number for the "update_mask" field. + public const int UpdateMaskFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_; + /// + /// Required. The list of fields to update. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.FieldMask UpdateMask { + get { return updateMask_; } + set { + updateMask_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UpdateLicensePoolRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UpdateLicensePoolRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(LicensePool, other.LicensePool)) return false; + if (!object.Equals(UpdateMask, other.UpdateMask)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (licensePool_ != null) hash ^= LicensePool.GetHashCode(); + if (updateMask_ != null) hash ^= UpdateMask.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (licensePool_ != null) { + output.WriteRawTag(10); + output.WriteMessage(LicensePool); + } + if (updateMask_ != null) { + output.WriteRawTag(18); + output.WriteMessage(UpdateMask); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (licensePool_ != null) { + output.WriteRawTag(10); + output.WriteMessage(LicensePool); + } + if (updateMask_ != null) { + output.WriteRawTag(18); + output.WriteMessage(UpdateMask); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (licensePool_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(LicensePool); + } + if (updateMask_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateMask); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UpdateLicensePoolRequest other) { + if (other == null) { + return; + } + if (other.licensePool_ != null) { + if (licensePool_ == null) { + LicensePool = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool(); + } + LicensePool.MergeFrom(other.LicensePool); + } + if (other.updateMask_ != null) { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + UpdateMask.MergeFrom(other.UpdateMask); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (licensePool_ == null) { + LicensePool = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool(); + } + input.ReadMessage(LicensePool); + break; + } + case 18: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (licensePool_ == null) { + LicensePool = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool(); + } + input.ReadMessage(LicensePool); + break; + } + case 18: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for + /// [LicenseManagementService.Assign][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Assign]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AssignRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AssignRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AssignRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AssignRequest(AssignRequest other) : this() { + parent_ = other.parent_; + usernames_ = other.usernames_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AssignRequest Clone() { + return new AssignRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. License pool name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "usernames" field. + public const int UsernamesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_usernames_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField usernames_ = new pbc::RepeatedField(); + /// + /// Required. Username. + /// Format: `name@domain.com`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Usernames { + get { return usernames_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AssignRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AssignRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if(!usernames_.Equals(other.usernames_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + hash ^= usernames_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + usernames_.WriteTo(output, _repeated_usernames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + usernames_.WriteTo(ref output, _repeated_usernames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + size += usernames_.CalculateSize(_repeated_usernames_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AssignRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + usernames_.Add(other.usernames_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + usernames_.AddEntriesFrom(input, _repeated_usernames_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + usernames_.AddEntriesFrom(ref input, _repeated_usernames_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Response message for + /// [LicenseManagementService.Assign][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Assign]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AssignResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AssignResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AssignResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AssignResponse(AssignResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AssignResponse Clone() { + return new AssignResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AssignResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AssignResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AssignResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + /// + /// Request message for + /// [LicenseManagementService.Unassign][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Unassign]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UnassignRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UnassignRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UnassignRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UnassignRequest(UnassignRequest other) : this() { + parent_ = other.parent_; + usernames_ = other.usernames_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UnassignRequest Clone() { + return new UnassignRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. License pool name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "usernames" field. + public const int UsernamesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_usernames_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField usernames_ = new pbc::RepeatedField(); + /// + /// Required. Username. + /// Format: `name@domain.com`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Usernames { + get { return usernames_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UnassignRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UnassignRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if(!usernames_.Equals(other.usernames_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + hash ^= usernames_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + usernames_.WriteTo(output, _repeated_usernames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + usernames_.WriteTo(ref output, _repeated_usernames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + size += usernames_.CalculateSize(_repeated_usernames_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UnassignRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + usernames_.Add(other.usernames_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + usernames_.AddEntriesFrom(input, _repeated_usernames_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + usernames_.AddEntriesFrom(ref input, _repeated_usernames_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Response message for + /// [LicenseManagementService.Unassign][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Unassign]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UnassignResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UnassignResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UnassignResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UnassignResponse(UnassignResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UnassignResponse Clone() { + return new UnassignResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UnassignResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UnassignResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UnassignResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + /// + /// Request message for + /// [LicenseManagementService.EnumerateLicensedUsers][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsers]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnumerateLicensedUsersRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumerateLicensedUsersRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumerateLicensedUsersRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumerateLicensedUsersRequest(EnumerateLicensedUsersRequest other) : this() { + parent_ = other.parent_; + pageSize_ = other.pageSize_; + pageToken_ = other.pageToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumerateLicensedUsersRequest Clone() { + return new EnumerateLicensedUsersRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. License pool name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "page_size" field. + public const int PageSizeFieldNumber = 2; + private int pageSize_; + /// + /// Optional. The maximum number of users to return. The service may return + /// fewer than this value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PageSize { + get { return pageSize_; } + set { + pageSize_ = value; + } + } + + /// Field number for the "page_token" field. + public const int PageTokenFieldNumber = 3; + private string pageToken_ = ""; + /// + /// Optional. A page token, received from a previous `EnumerateLicensedUsers` + /// call. Provide this to retrieve the subsequent page. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PageToken { + get { return pageToken_; } + set { + pageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnumerateLicensedUsersRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnumerateLicensedUsersRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (PageSize != other.PageSize) return false; + if (PageToken != other.PageToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (PageSize != 0) hash ^= PageSize.GetHashCode(); + if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (PageSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize); + } + if (PageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PageToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnumerateLicensedUsersRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.PageSize != 0) { + PageSize = other.PageSize; + } + if (other.PageToken.Length != 0) { + PageToken = other.PageToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// A licensed user. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LicensedUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LicensedUser()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicensedUser() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicensedUser(LicensedUser other) : this() { + username_ = other.username_; + assignTime_ = other.assignTime_ != null ? other.assignTime_.Clone() : null; + recentUsageTime_ = other.recentUsageTime_ != null ? other.recentUsageTime_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicensedUser Clone() { + return new LicensedUser(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + /// + /// Username. + /// Format: `name@domain.com`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "assign_time" field. + public const int AssignTimeFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp assignTime_; + /// + /// Output only. Timestamp when the license was assigned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp AssignTime { + get { return assignTime_; } + set { + assignTime_ = value; + } + } + + /// Field number for the "recent_usage_time" field. + public const int RecentUsageTimeFieldNumber = 3; + private global::Google.Protobuf.WellKnownTypes.Timestamp recentUsageTime_; + /// + /// Output only. Timestamp when the license was recently used. This may not be + /// the most recent usage time, and will be updated regularly (within 24 + /// hours). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp RecentUsageTime { + get { return recentUsageTime_; } + set { + recentUsageTime_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as LicensedUser); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LicensedUser other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (!object.Equals(AssignTime, other.AssignTime)) return false; + if (!object.Equals(RecentUsageTime, other.RecentUsageTime)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (assignTime_ != null) hash ^= AssignTime.GetHashCode(); + if (recentUsageTime_ != null) hash ^= RecentUsageTime.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (assignTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(AssignTime); + } + if (recentUsageTime_ != null) { + output.WriteRawTag(26); + output.WriteMessage(RecentUsageTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (assignTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(AssignTime); + } + if (recentUsageTime_ != null) { + output.WriteRawTag(26); + output.WriteMessage(RecentUsageTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (assignTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AssignTime); + } + if (recentUsageTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RecentUsageTime); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LicensedUser other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.assignTime_ != null) { + if (assignTime_ == null) { + AssignTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + AssignTime.MergeFrom(other.AssignTime); + } + if (other.recentUsageTime_ != null) { + if (recentUsageTime_ == null) { + RecentUsageTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + RecentUsageTime.MergeFrom(other.RecentUsageTime); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + if (assignTime_ == null) { + AssignTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(AssignTime); + break; + } + case 26: { + if (recentUsageTime_ == null) { + RecentUsageTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(RecentUsageTime); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + if (assignTime_ == null) { + AssignTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(AssignTime); + break; + } + case 26: { + if (recentUsageTime_ == null) { + RecentUsageTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(RecentUsageTime); + break; + } + } + } + } + #endif + + } + + /// + /// Response message for + /// [LicenseManagementService.EnumerateLicensedUsers][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsers]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnumerateLicensedUsersResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumerateLicensedUsersResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumerateLicensedUsersResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumerateLicensedUsersResponse(EnumerateLicensedUsersResponse other) : this() { + licensedUsers_ = other.licensedUsers_.Clone(); + nextPageToken_ = other.nextPageToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumerateLicensedUsersResponse Clone() { + return new EnumerateLicensedUsersResponse(this); + } + + /// Field number for the "licensed_users" field. + public const int LicensedUsersFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_licensedUsers_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensedUser.Parser); + private readonly pbc::RepeatedField licensedUsers_ = new pbc::RepeatedField(); + /// + /// The list of licensed users. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField LicensedUsers { + get { return licensedUsers_; } + } + + /// Field number for the "next_page_token" field. + public const int NextPageTokenFieldNumber = 2; + private string nextPageToken_ = ""; + /// + /// A token that can be sent as `page_token` to retrieve the next page. + /// If this field is omitted, there are no subsequent pages. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextPageToken { + get { return nextPageToken_; } + set { + nextPageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnumerateLicensedUsersResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnumerateLicensedUsersResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!licensedUsers_.Equals(other.licensedUsers_)) return false; + if (NextPageToken != other.NextPageToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= licensedUsers_.GetHashCode(); + if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + licensedUsers_.WriteTo(output, _repeated_licensedUsers_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + licensedUsers_.WriteTo(ref output, _repeated_licensedUsers_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += licensedUsers_.CalculateSize(_repeated_licensedUsers_codec); + if (NextPageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnumerateLicensedUsersResponse other) { + if (other == null) { + return; + } + licensedUsers_.Add(other.licensedUsers_); + if (other.NextPageToken.Length != 0) { + NextPageToken = other.NextPageToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + licensedUsers_.AddEntriesFrom(input, _repeated_licensedUsers_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + licensedUsers_.AddEntriesFrom(ref input, _repeated_licensedUsers_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceClient.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceClient.g.cs new file mode 100644 index 000000000000..76ef7b0cd9ec --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceClient.g.cs @@ -0,0 +1,894 @@ +// 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! + +#pragma warning disable CS8981 +using gax = Google.Api.Gax; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using grpcinter = Grpc.Core.Interceptors; +using mel = Microsoft.Extensions.Logging; +using proto = Google.Protobuf; +using sc = System.Collections; +using scg = System.Collections.Generic; +using sco = System.Collections.ObjectModel; +using st = System.Threading; +using stt = System.Threading.Tasks; +using sys = System; +using wkt = Google.Protobuf.WellKnownTypes; + +namespace Google.Cloud.Commerce.Consumer.Procurement.V1 +{ + /// Settings for instances. + public sealed partial class LicenseManagementServiceSettings : gaxgrpc::ServiceSettingsBase + { + /// Get a new instance of the default . + /// A new instance of the default . + public static LicenseManagementServiceSettings GetDefault() => new LicenseManagementServiceSettings(); + + /// + /// Constructs a new object with default settings. + /// + public LicenseManagementServiceSettings() + { + } + + private LicenseManagementServiceSettings(LicenseManagementServiceSettings existing) : base(existing) + { + gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); + GetLicensePoolSettings = existing.GetLicensePoolSettings; + UpdateLicensePoolSettings = existing.UpdateLicensePoolSettings; + AssignSettings = existing.AssignSettings; + UnassignSettings = existing.UnassignSettings; + EnumerateLicensedUsersSettings = existing.EnumerateLicensedUsersSettings; + OnCopy(existing); + } + + partial void OnCopy(LicenseManagementServiceSettings existing); + + /// + /// for synchronous and asynchronous calls to + /// LicenseManagementServiceClient.GetLicensePool and + /// LicenseManagementServiceClient.GetLicensePoolAsync. + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings GetLicensePoolSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// + /// for synchronous and asynchronous calls to + /// LicenseManagementServiceClient.UpdateLicensePool and + /// LicenseManagementServiceClient.UpdateLicensePoolAsync. + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings UpdateLicensePoolSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// + /// for synchronous and asynchronous calls to + /// LicenseManagementServiceClient.Assign and LicenseManagementServiceClient.AssignAsync. + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings AssignSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// + /// for synchronous and asynchronous calls to + /// LicenseManagementServiceClient.Unassign and LicenseManagementServiceClient.UnassignAsync. + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings UnassignSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// + /// for synchronous and asynchronous calls to + /// LicenseManagementServiceClient.EnumerateLicensedUsers and + /// LicenseManagementServiceClient.EnumerateLicensedUsersAsync. + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings EnumerateLicensedUsersSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// Creates a deep clone of this object, with all the same property values. + /// A deep clone of this object. + public LicenseManagementServiceSettings Clone() => new LicenseManagementServiceSettings(this); + } + + /// + /// Builder class for to provide simple configuration of credentials, + /// endpoint etc. + /// + public sealed partial class LicenseManagementServiceClientBuilder : gaxgrpc::ClientBuilderBase + { + /// The settings to use for RPCs, or null for the default settings. + public LicenseManagementServiceSettings Settings { get; set; } + + /// Creates a new builder with default settings. + public LicenseManagementServiceClientBuilder() : base(LicenseManagementServiceClient.ServiceMetadata) + { + } + + partial void InterceptBuild(ref LicenseManagementServiceClient client); + + partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task task); + + /// Builds the resulting client. + public override LicenseManagementServiceClient Build() + { + LicenseManagementServiceClient client = null; + InterceptBuild(ref client); + return client ?? BuildImpl(); + } + + /// Builds the resulting client asynchronously. + public override stt::Task BuildAsync(st::CancellationToken cancellationToken = default) + { + stt::Task task = null; + InterceptBuildAsync(cancellationToken, ref task); + return task ?? BuildAsyncImpl(cancellationToken); + } + + private LicenseManagementServiceClient BuildImpl() + { + Validate(); + grpccore::CallInvoker callInvoker = CreateCallInvoker(); + return LicenseManagementServiceClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + private async stt::Task BuildAsyncImpl(st::CancellationToken cancellationToken) + { + Validate(); + grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false); + return LicenseManagementServiceClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + /// Returns the channel pool to use when no other options are specified. + protected override gaxgrpc::ChannelPool GetChannelPool() => LicenseManagementServiceClient.ChannelPool; + } + + /// LicenseManagementService client wrapper, for convenient use. + /// + /// Service for managing licenses. + /// + public abstract partial class LicenseManagementServiceClient + { + /// + /// The default endpoint for the LicenseManagementService service, which is a host of + /// "cloudcommerceconsumerprocurement.googleapis.com" and a port of 443. + /// + public static string DefaultEndpoint { get; } = "cloudcommerceconsumerprocurement.googleapis.com:443"; + + /// The default LicenseManagementService scopes. + /// + /// The default LicenseManagementService scopes are: + /// + /// https://www.googleapis.com/auth/cloud-platform + /// + /// + public static scg::IReadOnlyList DefaultScopes { get; } = new sco::ReadOnlyCollection(new string[] + { + "https://www.googleapis.com/auth/cloud-platform", + }); + + /// The service metadata associated with this client type. + public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(LicenseManagementService.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Grpc | gax::ApiTransports.Rest, PackageApiMetadata.ApiMetadata); + + internal static gaxgrpc::ChannelPool ChannelPool { get; } = new gaxgrpc::ChannelPool(ServiceMetadata); + + /// + /// Asynchronously creates a using the default credentials, + /// endpoint and settings. To specify custom credentials or other settings, use + /// . + /// + /// + /// The to use while creating the client. + /// + /// The task representing the created . + public static stt::Task CreateAsync(st::CancellationToken cancellationToken = default) => + new LicenseManagementServiceClientBuilder().BuildAsync(cancellationToken); + + /// + /// Synchronously creates a using the default credentials, endpoint + /// and settings. To specify custom credentials or other settings, use + /// . + /// + /// The created . + public static LicenseManagementServiceClient Create() => new LicenseManagementServiceClientBuilder().Build(); + + /// + /// Creates a which uses the specified call invoker for remote + /// operations. + /// + /// + /// The for remote operations. Must not be null. + /// + /// Optional . + /// Optional . + /// The created . + internal static LicenseManagementServiceClient Create(grpccore::CallInvoker callInvoker, LicenseManagementServiceSettings settings = null, mel::ILogger logger = null) + { + gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); + grpcinter::Interceptor interceptor = settings?.Interceptor; + if (interceptor != null) + { + callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); + } + LicenseManagementService.LicenseManagementServiceClient grpcClient = new LicenseManagementService.LicenseManagementServiceClient(callInvoker); + return new LicenseManagementServiceClientImpl(grpcClient, settings, logger); + } + + /// + /// Shuts down any channels automatically created by and + /// . Channels which weren't automatically created are not + /// affected. + /// + /// + /// After calling this method, further calls to and + /// will create new channels, which could in turn be shut down + /// by another call to this method. + /// + /// A task representing the asynchronous shutdown operation. + public static stt::Task ShutdownDefaultChannelsAsync() => ChannelPool.ShutdownChannelsAsync(); + + /// The underlying gRPC LicenseManagementService client + public virtual LicenseManagementService.LicenseManagementServiceClient GrpcClient => throw new sys::NotImplementedException(); + + /// + /// Gets the license pool. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual LicensePool GetLicensePool(GetLicensePoolRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets the license pool. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetLicensePoolAsync(GetLicensePoolRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets the license pool. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetLicensePoolAsync(GetLicensePoolRequest request, st::CancellationToken cancellationToken) => + GetLicensePoolAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets the license pool. + /// + /// + /// Required. The name of the license pool to get. + /// Format: `billingAccounts/{billing_account}/orders/{order}/licensePool` + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual LicensePool GetLicensePool(string name, gaxgrpc::CallSettings callSettings = null) => + GetLicensePool(new GetLicensePoolRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets the license pool. + /// + /// + /// Required. The name of the license pool to get. + /// Format: `billingAccounts/{billing_account}/orders/{order}/licensePool` + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetLicensePoolAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetLicensePoolAsync(new GetLicensePoolRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets the license pool. + /// + /// + /// Required. The name of the license pool to get. + /// Format: `billingAccounts/{billing_account}/orders/{order}/licensePool` + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetLicensePoolAsync(string name, st::CancellationToken cancellationToken) => + GetLicensePoolAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Updates the license pool if one exists for this Order. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual LicensePool UpdateLicensePool(UpdateLicensePoolRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Updates the license pool if one exists for this Order. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UpdateLicensePoolAsync(UpdateLicensePoolRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Updates the license pool if one exists for this Order. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UpdateLicensePoolAsync(UpdateLicensePoolRequest request, st::CancellationToken cancellationToken) => + UpdateLicensePoolAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Updates the license pool if one exists for this Order. + /// + /// + /// Required. The license pool to update. + /// + /// The license pool's name field is used to identify the license pool to + /// update. Format: + /// `billingAccounts/{billing_account}/orders/{order}/licensePool`. + /// + /// + /// Required. The list of fields to update. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual LicensePool UpdateLicensePool(LicensePool licensePool, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateLicensePool(new UpdateLicensePoolRequest + { + LicensePool = gax::GaxPreconditions.CheckNotNull(licensePool, nameof(licensePool)), + UpdateMask = gax::GaxPreconditions.CheckNotNull(updateMask, nameof(updateMask)), + }, callSettings); + + /// + /// Updates the license pool if one exists for this Order. + /// + /// + /// Required. The license pool to update. + /// + /// The license pool's name field is used to identify the license pool to + /// update. Format: + /// `billingAccounts/{billing_account}/orders/{order}/licensePool`. + /// + /// + /// Required. The list of fields to update. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UpdateLicensePoolAsync(LicensePool licensePool, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateLicensePoolAsync(new UpdateLicensePoolRequest + { + LicensePool = gax::GaxPreconditions.CheckNotNull(licensePool, nameof(licensePool)), + UpdateMask = gax::GaxPreconditions.CheckNotNull(updateMask, nameof(updateMask)), + }, callSettings); + + /// + /// Updates the license pool if one exists for this Order. + /// + /// + /// Required. The license pool to update. + /// + /// The license pool's name field is used to identify the license pool to + /// update. Format: + /// `billingAccounts/{billing_account}/orders/{order}/licensePool`. + /// + /// + /// Required. The list of fields to update. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UpdateLicensePoolAsync(LicensePool licensePool, wkt::FieldMask updateMask, st::CancellationToken cancellationToken) => + UpdateLicensePoolAsync(licensePool, updateMask, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Assigns a license to a user. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual AssignResponse Assign(AssignRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Assigns a license to a user. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task AssignAsync(AssignRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Assigns a license to a user. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task AssignAsync(AssignRequest request, st::CancellationToken cancellationToken) => + AssignAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Assigns a license to a user. + /// + /// + /// Required. License pool name. + /// + /// + /// Required. Username. + /// Format: `name@domain.com`. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual AssignResponse Assign(string parent, scg::IEnumerable usernames, gaxgrpc::CallSettings callSettings = null) => + Assign(new AssignRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + Usernames = + { + gax::GaxPreconditions.CheckNotNull(usernames, nameof(usernames)), + }, + }, callSettings); + + /// + /// Assigns a license to a user. + /// + /// + /// Required. License pool name. + /// + /// + /// Required. Username. + /// Format: `name@domain.com`. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task AssignAsync(string parent, scg::IEnumerable usernames, gaxgrpc::CallSettings callSettings = null) => + AssignAsync(new AssignRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + Usernames = + { + gax::GaxPreconditions.CheckNotNull(usernames, nameof(usernames)), + }, + }, callSettings); + + /// + /// Assigns a license to a user. + /// + /// + /// Required. License pool name. + /// + /// + /// Required. Username. + /// Format: `name@domain.com`. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task AssignAsync(string parent, scg::IEnumerable usernames, st::CancellationToken cancellationToken) => + AssignAsync(parent, usernames, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Unassigns a license from a user. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual UnassignResponse Unassign(UnassignRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Unassigns a license from a user. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UnassignAsync(UnassignRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Unassigns a license from a user. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UnassignAsync(UnassignRequest request, st::CancellationToken cancellationToken) => + UnassignAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Unassigns a license from a user. + /// + /// + /// Required. License pool name. + /// + /// + /// Required. Username. + /// Format: `name@domain.com`. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual UnassignResponse Unassign(string parent, scg::IEnumerable usernames, gaxgrpc::CallSettings callSettings = null) => + Unassign(new UnassignRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + Usernames = + { + gax::GaxPreconditions.CheckNotNull(usernames, nameof(usernames)), + }, + }, callSettings); + + /// + /// Unassigns a license from a user. + /// + /// + /// Required. License pool name. + /// + /// + /// Required. Username. + /// Format: `name@domain.com`. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UnassignAsync(string parent, scg::IEnumerable usernames, gaxgrpc::CallSettings callSettings = null) => + UnassignAsync(new UnassignRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + Usernames = + { + gax::GaxPreconditions.CheckNotNull(usernames, nameof(usernames)), + }, + }, callSettings); + + /// + /// Unassigns a license from a user. + /// + /// + /// Required. License pool name. + /// + /// + /// Required. Username. + /// Format: `name@domain.com`. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UnassignAsync(string parent, scg::IEnumerable usernames, st::CancellationToken cancellationToken) => + UnassignAsync(parent, usernames, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Enumerates all users assigned a license. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable EnumerateLicensedUsers(EnumerateLicensedUsersRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Enumerates all users assigned a license. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable EnumerateLicensedUsersAsync(EnumerateLicensedUsersRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Enumerates all users assigned a license. + /// + /// + /// Required. License pool name. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable EnumerateLicensedUsers(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + EnumerateLicensedUsersRequest request = new EnumerateLicensedUsersRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return EnumerateLicensedUsers(request, callSettings); + } + + /// + /// Enumerates all users assigned a license. + /// + /// + /// Required. License pool name. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable EnumerateLicensedUsersAsync(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + EnumerateLicensedUsersRequest request = new EnumerateLicensedUsersRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return EnumerateLicensedUsersAsync(request, callSettings); + } + } + + /// LicenseManagementService client wrapper implementation, for convenient use. + /// + /// Service for managing licenses. + /// + public sealed partial class LicenseManagementServiceClientImpl : LicenseManagementServiceClient + { + private readonly gaxgrpc::ApiCall _callGetLicensePool; + + private readonly gaxgrpc::ApiCall _callUpdateLicensePool; + + private readonly gaxgrpc::ApiCall _callAssign; + + private readonly gaxgrpc::ApiCall _callUnassign; + + private readonly gaxgrpc::ApiCall _callEnumerateLicensedUsers; + + /// + /// Constructs a client wrapper for the LicenseManagementService service, with the specified gRPC client and + /// settings. + /// + /// The underlying gRPC client. + /// + /// The base used within this client. + /// + /// Optional to use within this client. + public LicenseManagementServiceClientImpl(LicenseManagementService.LicenseManagementServiceClient grpcClient, LicenseManagementServiceSettings settings, mel::ILogger logger) + { + GrpcClient = grpcClient; + LicenseManagementServiceSettings effectiveSettings = settings ?? LicenseManagementServiceSettings.GetDefault(); + gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(new gaxgrpc::ClientHelper.Options + { + Settings = effectiveSettings, + Logger = logger, + }); + _callGetLicensePool = clientHelper.BuildApiCall("GetLicensePool", grpcClient.GetLicensePoolAsync, grpcClient.GetLicensePool, effectiveSettings.GetLicensePoolSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetLicensePool); + Modify_GetLicensePoolApiCall(ref _callGetLicensePool); + _callUpdateLicensePool = clientHelper.BuildApiCall("UpdateLicensePool", grpcClient.UpdateLicensePoolAsync, grpcClient.UpdateLicensePool, effectiveSettings.UpdateLicensePoolSettings).WithGoogleRequestParam("license_pool.name", request => request.LicensePool?.Name); + Modify_ApiCall(ref _callUpdateLicensePool); + Modify_UpdateLicensePoolApiCall(ref _callUpdateLicensePool); + _callAssign = clientHelper.BuildApiCall("Assign", grpcClient.AssignAsync, grpcClient.Assign, effectiveSettings.AssignSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callAssign); + Modify_AssignApiCall(ref _callAssign); + _callUnassign = clientHelper.BuildApiCall("Unassign", grpcClient.UnassignAsync, grpcClient.Unassign, effectiveSettings.UnassignSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callUnassign); + Modify_UnassignApiCall(ref _callUnassign); + _callEnumerateLicensedUsers = clientHelper.BuildApiCall("EnumerateLicensedUsers", grpcClient.EnumerateLicensedUsersAsync, grpcClient.EnumerateLicensedUsers, effectiveSettings.EnumerateLicensedUsersSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callEnumerateLicensedUsers); + Modify_EnumerateLicensedUsersApiCall(ref _callEnumerateLicensedUsers); + OnConstruction(grpcClient, effectiveSettings, clientHelper); + } + + partial void Modify_ApiCall(ref gaxgrpc::ApiCall call) where TRequest : class, proto::IMessage where TResponse : class, proto::IMessage; + + partial void Modify_GetLicensePoolApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_UpdateLicensePoolApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_AssignApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_UnassignApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_EnumerateLicensedUsersApiCall(ref gaxgrpc::ApiCall call); + + partial void OnConstruction(LicenseManagementService.LicenseManagementServiceClient grpcClient, LicenseManagementServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper); + + /// The underlying gRPC LicenseManagementService client + public override LicenseManagementService.LicenseManagementServiceClient GrpcClient { get; } + + partial void Modify_GetLicensePoolRequest(ref GetLicensePoolRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_UpdateLicensePoolRequest(ref UpdateLicensePoolRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_AssignRequest(ref AssignRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_UnassignRequest(ref UnassignRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_EnumerateLicensedUsersRequest(ref EnumerateLicensedUsersRequest request, ref gaxgrpc::CallSettings settings); + + /// + /// Gets the license pool. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override LicensePool GetLicensePool(GetLicensePoolRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetLicensePoolRequest(ref request, ref callSettings); + return _callGetLicensePool.Sync(request, callSettings); + } + + /// + /// Gets the license pool. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task GetLicensePoolAsync(GetLicensePoolRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetLicensePoolRequest(ref request, ref callSettings); + return _callGetLicensePool.Async(request, callSettings); + } + + /// + /// Updates the license pool if one exists for this Order. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override LicensePool UpdateLicensePool(UpdateLicensePoolRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateLicensePoolRequest(ref request, ref callSettings); + return _callUpdateLicensePool.Sync(request, callSettings); + } + + /// + /// Updates the license pool if one exists for this Order. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task UpdateLicensePoolAsync(UpdateLicensePoolRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateLicensePoolRequest(ref request, ref callSettings); + return _callUpdateLicensePool.Async(request, callSettings); + } + + /// + /// Assigns a license to a user. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override AssignResponse Assign(AssignRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_AssignRequest(ref request, ref callSettings); + return _callAssign.Sync(request, callSettings); + } + + /// + /// Assigns a license to a user. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task AssignAsync(AssignRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_AssignRequest(ref request, ref callSettings); + return _callAssign.Async(request, callSettings); + } + + /// + /// Unassigns a license from a user. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override UnassignResponse Unassign(UnassignRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UnassignRequest(ref request, ref callSettings); + return _callUnassign.Sync(request, callSettings); + } + + /// + /// Unassigns a license from a user. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task UnassignAsync(UnassignRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UnassignRequest(ref request, ref callSettings); + return _callUnassign.Async(request, callSettings); + } + + /// + /// Enumerates all users assigned a license. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public override gax::PagedEnumerable EnumerateLicensedUsers(EnumerateLicensedUsersRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_EnumerateLicensedUsersRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedEnumerable(_callEnumerateLicensedUsers, request, callSettings); + } + + /// + /// Enumerates all users assigned a license. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public override gax::PagedAsyncEnumerable EnumerateLicensedUsersAsync(EnumerateLicensedUsersRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_EnumerateLicensedUsersRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedAsyncEnumerable(_callEnumerateLicensedUsers, request, callSettings); + } + } + + public partial class EnumerateLicensedUsersRequest : gaxgrpc::IPageRequest + { + } + + public partial class EnumerateLicensedUsersResponse : gaxgrpc::IPageResponse + { + /// Returns an enumerator that iterates through the resources in this response. + public scg::IEnumerator GetEnumerator() => LicensedUsers.GetEnumerator(); + + sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator(); + } +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceGrpc.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceGrpc.g.cs new file mode 100644 index 000000000000..09377d2111a5 --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceGrpc.g.cs @@ -0,0 +1,501 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/commerce/consumer/procurement/v1/license_management_service.proto +// +// Original file comments: +// 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 +// +// http://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. +// +#pragma warning disable 0414, 1591, 8981, 0612 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Google.Cloud.Commerce.Consumer.Procurement.V1 { + /// + /// Service for managing licenses. + /// + public static partial class LicenseManagementService + { + static readonly string __ServiceName = "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService"; + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (message is global::Google.Protobuf.IBufferMessage) + { + context.SetPayloadLength(message.CalculateSize()); + global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter()); + context.Complete(); + return; + } + #endif + context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static class __Helper_MessageCache + { + public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (__Helper_MessageCache.IsBufferMessage) + { + return parser.ParseFrom(context.PayloadAsReadOnlySequence()); + } + #endif + return parser.ParseFrom(context.PayloadAsNewBuffer()); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_GetLicensePoolRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.GetLicensePoolRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_LicensePool = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_UpdateLicensePoolRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.UpdateLicensePoolRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_AssignRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_AssignResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_UnassignRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_UnassignResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_EnumerateLicensedUsersRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_EnumerateLicensedUsersResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersResponse.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetLicensePool = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetLicensePool", + __Marshaller_google_cloud_commerce_consumer_procurement_v1_GetLicensePoolRequest, + __Marshaller_google_cloud_commerce_consumer_procurement_v1_LicensePool); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_UpdateLicensePool = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "UpdateLicensePool", + __Marshaller_google_cloud_commerce_consumer_procurement_v1_UpdateLicensePoolRequest, + __Marshaller_google_cloud_commerce_consumer_procurement_v1_LicensePool); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_Assign = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "Assign", + __Marshaller_google_cloud_commerce_consumer_procurement_v1_AssignRequest, + __Marshaller_google_cloud_commerce_consumer_procurement_v1_AssignResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_Unassign = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "Unassign", + __Marshaller_google_cloud_commerce_consumer_procurement_v1_UnassignRequest, + __Marshaller_google_cloud_commerce_consumer_procurement_v1_UnassignResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_EnumerateLicensedUsers = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "EnumerateLicensedUsers", + __Marshaller_google_cloud_commerce_consumer_procurement_v1_EnumerateLicensedUsersRequest, + __Marshaller_google_cloud_commerce_consumer_procurement_v1_EnumerateLicensedUsersResponse); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicenseManagementServiceReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of LicenseManagementService + [grpc::BindServiceMethod(typeof(LicenseManagementService), "BindService")] + public abstract partial class LicenseManagementServiceBase + { + /// + /// Gets the license pool. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task GetLicensePool(global::Google.Cloud.Commerce.Consumer.Procurement.V1.GetLicensePoolRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Updates the license pool if one exists for this Order. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task UpdateLicensePool(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UpdateLicensePoolRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Assigns a license to a user. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task Assign(global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Unassigns a license from a user. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task Unassign(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Enumerates all users assigned a license. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task EnumerateLicensedUsers(global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for LicenseManagementService + public partial class LicenseManagementServiceClient : grpc::ClientBase + { + /// Creates a new client for LicenseManagementService + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public LicenseManagementServiceClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for LicenseManagementService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public LicenseManagementServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected LicenseManagementServiceClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected LicenseManagementServiceClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Gets the license pool. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool GetLicensePool(global::Google.Cloud.Commerce.Consumer.Procurement.V1.GetLicensePoolRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetLicensePool(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets the license pool. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool GetLicensePool(global::Google.Cloud.Commerce.Consumer.Procurement.V1.GetLicensePoolRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetLicensePool, null, options, request); + } + /// + /// Gets the license pool. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetLicensePoolAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.GetLicensePoolRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetLicensePoolAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets the license pool. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetLicensePoolAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.GetLicensePoolRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetLicensePool, null, options, request); + } + /// + /// Updates the license pool if one exists for this Order. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool UpdateLicensePool(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UpdateLicensePoolRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateLicensePool(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Updates the license pool if one exists for this Order. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Commerce.Consumer.Procurement.V1.LicensePool UpdateLicensePool(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UpdateLicensePoolRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_UpdateLicensePool, null, options, request); + } + /// + /// Updates the license pool if one exists for this Order. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall UpdateLicensePoolAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UpdateLicensePoolRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateLicensePoolAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Updates the license pool if one exists for this Order. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall UpdateLicensePoolAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UpdateLicensePoolRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_UpdateLicensePool, null, options, request); + } + /// + /// Assigns a license to a user. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignResponse Assign(global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return Assign(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Assigns a license to a user. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignResponse Assign(global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_Assign, null, options, request); + } + /// + /// Assigns a license to a user. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall AssignAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return AssignAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Assigns a license to a user. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall AssignAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.AssignRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_Assign, null, options, request); + } + /// + /// Unassigns a license from a user. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignResponse Unassign(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return Unassign(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Unassigns a license from a user. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignResponse Unassign(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_Unassign, null, options, request); + } + /// + /// Unassigns a license from a user. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall UnassignAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UnassignAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Unassigns a license from a user. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall UnassignAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.UnassignRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_Unassign, null, options, request); + } + /// + /// Enumerates all users assigned a license. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersResponse EnumerateLicensedUsers(global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return EnumerateLicensedUsers(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Enumerates all users assigned a license. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersResponse EnumerateLicensedUsers(global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_EnumerateLicensedUsers, null, options, request); + } + /// + /// Enumerates all users assigned a license. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall EnumerateLicensedUsersAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return EnumerateLicensedUsersAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Enumerates all users assigned a license. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall EnumerateLicensedUsersAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.EnumerateLicensedUsersRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_EnumerateLicensedUsers, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override LicenseManagementServiceClient NewInstance(ClientBaseConfiguration configuration) + { + return new LicenseManagementServiceClient(configuration); + } + } + + /// Creates service definition that can be registered with a server + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static grpc::ServerServiceDefinition BindService(LicenseManagementServiceBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_GetLicensePool, serviceImpl.GetLicensePool) + .AddMethod(__Method_UpdateLicensePool, serviceImpl.UpdateLicensePool) + .AddMethod(__Method_Assign, serviceImpl.Assign) + .AddMethod(__Method_Unassign, serviceImpl.Unassign) + .AddMethod(__Method_EnumerateLicensedUsers, serviceImpl.EnumerateLicensedUsers).Build(); + } + + /// Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. + /// Note: this method is part of an experimental API that can change or be removed without any prior notice. + /// Service methods will be bound by calling AddMethod on this object. + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static void BindService(grpc::ServiceBinderBase serviceBinder, LicenseManagementServiceBase serviceImpl) + { + serviceBinder.AddMethod(__Method_GetLicensePool, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetLicensePool)); + serviceBinder.AddMethod(__Method_UpdateLicensePool, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.UpdateLicensePool)); + serviceBinder.AddMethod(__Method_Assign, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.Assign)); + serviceBinder.AddMethod(__Method_Unassign, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.Unassign)); + serviceBinder.AddMethod(__Method_EnumerateLicensedUsers, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.EnumerateLicensedUsers)); + } + + } +} +#endregion diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceResourceNames.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceResourceNames.g.cs new file mode 100644 index 000000000000..4cce6841bffd --- /dev/null +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/LicenseManagementServiceResourceNames.g.cs @@ -0,0 +1,269 @@ +// 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! + +#pragma warning disable CS8981 +using gax = Google.Api.Gax; +using gcccpv = Google.Cloud.Commerce.Consumer.Procurement.V1; +using sys = System; + +namespace Google.Cloud.Commerce.Consumer.Procurement.V1 +{ + /// Resource name for the LicensePool resource. + public sealed partial class LicensePoolName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern billingAccounts/{billing_account}/orders/{order}/licensePool. + /// + BillingAccountOrder = 1, + } + + private static gax::PathTemplate s_billingAccountOrder = new gax::PathTemplate("billingAccounts/{billing_account}/orders/{order}/licensePool"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static LicensePoolName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new LicensePoolName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// billingAccounts/{billing_account}/orders/{order}/licensePool. + /// + /// The BillingAccount ID. Must not be null or empty. + /// The Order ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static LicensePoolName FromBillingAccountOrder(string billingAccountId, string orderId) => + new LicensePoolName(ResourceNameType.BillingAccountOrder, billingAccountId: gax::GaxPreconditions.CheckNotNullOrEmpty(billingAccountId, nameof(billingAccountId)), orderId: gax::GaxPreconditions.CheckNotNullOrEmpty(orderId, nameof(orderId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// billingAccounts/{billing_account}/orders/{order}/licensePool. + /// + /// The BillingAccount ID. Must not be null or empty. + /// The Order ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// billingAccounts/{billing_account}/orders/{order}/licensePool. + /// + public static string Format(string billingAccountId, string orderId) => + FormatBillingAccountOrder(billingAccountId, orderId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// billingAccounts/{billing_account}/orders/{order}/licensePool. + /// + /// The BillingAccount ID. Must not be null or empty. + /// The Order ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// billingAccounts/{billing_account}/orders/{order}/licensePool. + /// + public static string FormatBillingAccountOrder(string billingAccountId, string orderId) => + s_billingAccountOrder.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(billingAccountId, nameof(billingAccountId)), gax::GaxPreconditions.CheckNotNullOrEmpty(orderId, nameof(orderId))); + + /// Parses the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// billingAccounts/{billing_account}/orders/{order}/licensePool + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static LicensePoolName Parse(string licensePoolName) => Parse(licensePoolName, false); + + /// + /// Parses the given resource name string into a new instance; optionally allowing + /// an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// billingAccounts/{billing_account}/orders/{order}/licensePool + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static LicensePoolName Parse(string licensePoolName, bool allowUnparsed) => + TryParse(licensePoolName, allowUnparsed, out LicensePoolName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// + /// Tries to parse the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// billingAccounts/{billing_account}/orders/{order}/licensePool + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string licensePoolName, out LicensePoolName result) => + TryParse(licensePoolName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// billingAccounts/{billing_account}/orders/{order}/licensePool + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string licensePoolName, bool allowUnparsed, out LicensePoolName result) + { + gax::GaxPreconditions.CheckNotNull(licensePoolName, nameof(licensePoolName)); + gax::TemplatedResourceName resourceName; + if (s_billingAccountOrder.TryParseName(licensePoolName, out resourceName)) + { + result = FromBillingAccountOrder(resourceName[0], resourceName[1]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(licensePoolName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private LicensePoolName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string billingAccountId = null, string orderId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + BillingAccountId = billingAccountId; + OrderId = orderId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// billingAccounts/{billing_account}/orders/{order}/licensePool + /// + /// The BillingAccount ID. Must not be null or empty. + /// The Order ID. Must not be null or empty. + public LicensePoolName(string billingAccountId, string orderId) : this(ResourceNameType.BillingAccountOrder, billingAccountId: gax::GaxPreconditions.CheckNotNullOrEmpty(billingAccountId, nameof(billingAccountId)), orderId: gax::GaxPreconditions.CheckNotNullOrEmpty(orderId, nameof(orderId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The BillingAccount ID. Will not be null, unless this instance contains an unparsed resource + /// name. + /// + public string BillingAccountId { get; } + + /// + /// The Order ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string OrderId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.BillingAccountOrder: return s_billingAccountOrder.Expand(BillingAccountId, OrderId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as LicensePoolName); + + /// + public bool Equals(LicensePoolName other) => ToString() == other?.ToString(); + + /// Determines whether two specified resource names have the same value. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is the same as the value of ; otherwise, + /// false. + /// + public static bool operator ==(LicensePoolName a, LicensePoolName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// Determines whether two specified resource names have different values. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is different from the value of ; otherwise, + /// false. + /// + public static bool operator !=(LicensePoolName a, LicensePoolName b) => !(a == b); + } + + public partial class LicensePool + { + /// + /// -typed view over the resource name property. + /// + public gcccpv::LicensePoolName LicensePoolName + { + get => string.IsNullOrEmpty(Name) ? null : gcccpv::LicensePoolName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } +} diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/Order.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/Order.g.cs index 507ed6b7123e..d63a4d8465f5 100644 --- a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/Order.g.cs +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/Order.g.cs @@ -152,33 +152,37 @@ public enum LineItemChangeState { /// [pbr::OriginalName("LINE_ITEM_CHANGE_STATE_UNSPECIFIED")] Unspecified = 0, /// - /// Change is in this state when a change is initiated and waiting for - /// partner approval. + /// Change is in this state when a change is initiated and waiting for partner + /// approval. This state is only applicable for pending change. /// [pbr::OriginalName("LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL")] PendingApproval = 1, /// /// Change is in this state after it's approved by the partner or auto-approved - /// but before it takes effect. The change can be overwritten - /// or cancelled depending on the new line item info property (pending Private - /// Offer change cannot be cancelled and can only be overwritten by another - /// Private Offer). + /// but before it takes effect. The change can be overwritten or cancelled + /// depending on the new line item info property (pending Private Offer change + /// cannot be cancelled and can only be overwritten by another Private Offer). + /// This state is only applicable for pending change. /// [pbr::OriginalName("LINE_ITEM_CHANGE_STATE_APPROVED")] Approved = 2, /// - /// Change is in this state after it's been activated. + /// Change is in this state after it's been activated. This state is only + /// applicable for change in history. /// [pbr::OriginalName("LINE_ITEM_CHANGE_STATE_COMPLETED")] Completed = 3, /// - /// Change is in this state if it was rejected by the partner. + /// Change is in this state if it was rejected by the partner. This state is + /// only applicable for change in history. /// [pbr::OriginalName("LINE_ITEM_CHANGE_STATE_REJECTED")] Rejected = 4, /// - /// Change is in this state if it was abandoned by the user. + /// Change is in this state if it was abandoned by the user. This state is only + /// applicable for change in history. /// [pbr::OriginalName("LINE_ITEM_CHANGE_STATE_ABANDONED")] Abandoned = 5, /// /// Change is in this state if it's currently being provisioned downstream. The - /// change can't be overwritten or cancelled when it's in this state. + /// change can't be overwritten or cancelled when it's in this state. This + /// state is only applicable for pending change. /// [pbr::OriginalName("LINE_ITEM_CHANGE_STATE_ACTIVATING")] Activating = 6, } diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/PackageApiMetadata.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/PackageApiMetadata.g.cs index a8c4cee2d1c3..871ed9fb0271 100644 --- a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/PackageApiMetadata.g.cs +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/PackageApiMetadata.g.cs @@ -40,6 +40,7 @@ internal static class PackageApiMetadata private static scg::IEnumerable GetFileDescriptors() { + yield return LicenseManagementServiceReflection.Descriptor; yield return OrderReflection.Descriptor; yield return ProcurementServiceReflection.Descriptor; yield return lro::OperationsReflection.Descriptor; diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ProcurementService.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ProcurementService.g.cs index b17cae4d11f3..4a640836187c 100644 --- a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ProcurementService.g.cs +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ProcurementService.g.cs @@ -42,43 +42,100 @@ static ProcurementServiceReflection() { "aXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkSDgoGZmlsdGVyGAQgASgJ", "InMKEkxpc3RPcmRlcnNSZXNwb25zZRJECgZvcmRlcnMYASADKAsyNC5nb29n", "bGUuY2xvdWQuY29tbWVyY2UuY29uc3VtZXIucHJvY3VyZW1lbnQudjEuT3Jk", - "ZXISFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJMswFChpDb25zdW1lclByb2N1", - "cmVtZW50U2VydmljZRLDAQoKUGxhY2VPcmRlchJALmdvb2dsZS5jbG91ZC5j", - "b21tZXJjZS5jb25zdW1lci5wcm9jdXJlbWVudC52MS5QbGFjZU9yZGVyUmVx", - "dWVzdBodLmdvb2dsZS5sb25ncnVubmluZy5PcGVyYXRpb24iVMpBGwoFT3Jk", - "ZXISElBsYWNlT3JkZXJNZXRhZGF0YYLT5JMCMCIrL3YxL3twYXJlbnQ9Ymls", - "bGluZ0FjY291bnRzLyp9L29yZGVyczpwbGFjZToBKhK2AQoIR2V0T3JkZXIS", - "Pi5nb29nbGUuY2xvdWQuY29tbWVyY2UuY29uc3VtZXIucHJvY3VyZW1lbnQu", - "djEuR2V0T3JkZXJSZXF1ZXN0GjQuZ29vZ2xlLmNsb3VkLmNvbW1lcmNlLmNv", - "bnN1bWVyLnByb2N1cmVtZW50LnYxLk9yZGVyIjTaQQRuYW1lgtPkkwInEiUv", - "djEve25hbWU9YmlsbGluZ0FjY291bnRzLyovb3JkZXJzLyp9EskBCgpMaXN0", - "T3JkZXJzEkAuZ29vZ2xlLmNsb3VkLmNvbW1lcmNlLmNvbnN1bWVyLnByb2N1", - "cmVtZW50LnYxLkxpc3RPcmRlcnNSZXF1ZXN0GkEuZ29vZ2xlLmNsb3VkLmNv", - "bW1lcmNlLmNvbnN1bWVyLnByb2N1cmVtZW50LnYxLkxpc3RPcmRlcnNSZXNw", - "b25zZSI22kEGcGFyZW50gtPkkwInEiUvdjEve3BhcmVudD1iaWxsaW5nQWNj", - "b3VudHMvKn0vb3JkZXJzGmPKQS9jbG91ZGNvbW1lcmNlY29uc3VtZXJwcm9j", - "dXJlbWVudC5nb29nbGVhcGlzLmNvbdJBLmh0dHBzOi8vd3d3Lmdvb2dsZWFw", - "aXMuY29tL2F1dGgvY2xvdWQtcGxhdGZvcm1CnwIKMWNvbS5nb29nbGUuY2xv", - "dWQuY29tbWVyY2UuY29uc3VtZXIucHJvY3VyZW1lbnQudjFQAVpTY2xvdWQu", - "Z29vZ2xlLmNvbS9nby9jb21tZXJjZS9jb25zdW1lci9wcm9jdXJlbWVudC9h", - "cGl2MS9wcm9jdXJlbWVudHBiO3Byb2N1cmVtZW50cGKqAi1Hb29nbGUuQ2xv", - "dWQuQ29tbWVyY2UuQ29uc3VtZXIuUHJvY3VyZW1lbnQuVjHKAi1Hb29nbGVc", - "Q2xvdWRcQ29tbWVyY2VcQ29uc3VtZXJcUHJvY3VyZW1lbnRcVjHqAjJHb29n", - "bGU6OkNsb3VkOjpDb21tZXJjZTo6Q29uc3VtZXI6OlByb2N1cmVtZW50OjpW", - "MWIGcHJvdG8z")); + "ZXISFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIpAEChJNb2RpZnlPcmRlclJl", + "cXVlc3QSEQoEbmFtZRgBIAEoCUID4EECEmoKDW1vZGlmaWNhdGlvbnMYBiAD", + "KAsyTi5nb29nbGUuY2xvdWQuY29tbWVyY2UuY29uc3VtZXIucHJvY3VyZW1l", + "bnQudjEuTW9kaWZ5T3JkZXJSZXF1ZXN0Lk1vZGlmaWNhdGlvbkID4EEBEhkK", + "DGRpc3BsYXlfbmFtZRgFIAEoCUID4EEBEhEKBGV0YWcYBCABKAlCA+BBARrM", + "AgoMTW9kaWZpY2F0aW9uEhkKDGxpbmVfaXRlbV9pZBgBIAEoCUID4EECElsK", + "C2NoYW5nZV90eXBlGAIgASgOMkEuZ29vZ2xlLmNsb3VkLmNvbW1lcmNlLmNv", + "bnN1bWVyLnByb2N1cmVtZW50LnYxLkxpbmVJdGVtQ2hhbmdlVHlwZUID4EEC", + "ElwKEm5ld19saW5lX2l0ZW1faW5mbxgDIAEoCzI7Lmdvb2dsZS5jbG91ZC5j", + "b21tZXJjZS5jb25zdW1lci5wcm9jdXJlbWVudC52MS5MaW5lSXRlbUluZm9C", + "A+BBARJmChVhdXRvX3JlbmV3YWxfYmVoYXZpb3IYBCABKA4yQi5nb29nbGUu", + "Y2xvdWQuY29tbWVyY2UuY29uc3VtZXIucHJvY3VyZW1lbnQudjEuQXV0b1Jl", + "bmV3YWxCZWhhdmlvckID4EEBIhUKE01vZGlmeU9yZGVyTWV0YWRhdGEixgIK", + "EkNhbmNlbE9yZGVyUmVxdWVzdBIRCgRuYW1lGAEgASgJQgPgQQISEQoEZXRh", + "ZxgCIAEoCUID4EEBEnYKE2NhbmNlbGxhdGlvbl9wb2xpY3kYAyABKA4yVC5n", + "b29nbGUuY2xvdWQuY29tbWVyY2UuY29uc3VtZXIucHJvY3VyZW1lbnQudjEu", + "Q2FuY2VsT3JkZXJSZXF1ZXN0LkNhbmNlbGxhdGlvblBvbGljeUID4EEBIpEB", + "ChJDYW5jZWxsYXRpb25Qb2xpY3kSIwofQ0FOQ0VMTEFUSU9OX1BPTElDWV9V", + "TlNQRUNJRklFRBAAEioKJkNBTkNFTExBVElPTl9QT0xJQ1lfQ0FOQ0VMX0lN", + "TUVESUFURUxZEAESKgomQ0FOQ0VMTEFUSU9OX1BPTElDWV9DQU5DRUxfQVRf", + "VEVSTV9FTkQQAiIVChNDYW5jZWxPcmRlck1ldGFkYXRhKoEBChNBdXRvUmVu", + "ZXdhbEJlaGF2aW9yEiUKIUFVVE9fUkVORVdBTF9CRUhBVklPUl9VTlNQRUNJ", + "RklFRBAAEiAKHEFVVE9fUkVORVdBTF9CRUhBVklPUl9FTkFCTEUQARIhCh1B", + "VVRPX1JFTkVXQUxfQkVIQVZJT1JfRElTQUJMRRACMuAIChpDb25zdW1lclBy", + "b2N1cmVtZW50U2VydmljZRLDAQoKUGxhY2VPcmRlchJALmdvb2dsZS5jbG91", + "ZC5jb21tZXJjZS5jb25zdW1lci5wcm9jdXJlbWVudC52MS5QbGFjZU9yZGVy", + "UmVxdWVzdBodLmdvb2dsZS5sb25ncnVubmluZy5PcGVyYXRpb24iVMpBGwoF", + "T3JkZXISElBsYWNlT3JkZXJNZXRhZGF0YYLT5JMCMCIrL3YxL3twYXJlbnQ9", + "YmlsbGluZ0FjY291bnRzLyp9L29yZGVyczpwbGFjZToBKhK2AQoIR2V0T3Jk", + "ZXISPi5nb29nbGUuY2xvdWQuY29tbWVyY2UuY29uc3VtZXIucHJvY3VyZW1l", + "bnQudjEuR2V0T3JkZXJSZXF1ZXN0GjQuZ29vZ2xlLmNsb3VkLmNvbW1lcmNl", + "LmNvbnN1bWVyLnByb2N1cmVtZW50LnYxLk9yZGVyIjTaQQRuYW1lgtPkkwIn", + "EiUvdjEve25hbWU9YmlsbGluZ0FjY291bnRzLyovb3JkZXJzLyp9EskBCgpM", + "aXN0T3JkZXJzEkAuZ29vZ2xlLmNsb3VkLmNvbW1lcmNlLmNvbnN1bWVyLnBy", + "b2N1cmVtZW50LnYxLkxpc3RPcmRlcnNSZXF1ZXN0GkEuZ29vZ2xlLmNsb3Vk", + "LmNvbW1lcmNlLmNvbnN1bWVyLnByb2N1cmVtZW50LnYxLkxpc3RPcmRlcnNS", + "ZXNwb25zZSI22kEGcGFyZW50gtPkkwInEiUvdjEve3BhcmVudD1iaWxsaW5n", + "QWNjb3VudHMvKn0vb3JkZXJzEscBCgtNb2RpZnlPcmRlchJBLmdvb2dsZS5j", + "bG91ZC5jb21tZXJjZS5jb25zdW1lci5wcm9jdXJlbWVudC52MS5Nb2RpZnlP", + "cmRlclJlcXVlc3QaHS5nb29nbGUubG9uZ3J1bm5pbmcuT3BlcmF0aW9uIlbK", + "QRwKBU9yZGVyEhNNb2RpZnlPcmRlck1ldGFkYXRhgtPkkwIxIiwvdjEve25h", + "bWU9YmlsbGluZ0FjY291bnRzLyovb3JkZXJzLyp9Om1vZGlmeToBKhLHAQoL", + "Q2FuY2VsT3JkZXISQS5nb29nbGUuY2xvdWQuY29tbWVyY2UuY29uc3VtZXIu", + "cHJvY3VyZW1lbnQudjEuQ2FuY2VsT3JkZXJSZXF1ZXN0Gh0uZ29vZ2xlLmxv", + "bmdydW5uaW5nLk9wZXJhdGlvbiJWykEcCgVPcmRlchITQ2FuY2VsT3JkZXJN", + "ZXRhZGF0YYLT5JMCMSIsL3YxL3tuYW1lPWJpbGxpbmdBY2NvdW50cy8qL29y", + "ZGVycy8qfTpjYW5jZWw6ASoaY8pBL2Nsb3VkY29tbWVyY2Vjb25zdW1lcnBy", + "b2N1cmVtZW50Lmdvb2dsZWFwaXMuY29t0kEuaHR0cHM6Ly93d3cuZ29vZ2xl", + "YXBpcy5jb20vYXV0aC9jbG91ZC1wbGF0Zm9ybUKfAgoxY29tLmdvb2dsZS5j", + "bG91ZC5jb21tZXJjZS5jb25zdW1lci5wcm9jdXJlbWVudC52MVABWlNjbG91", + "ZC5nb29nbGUuY29tL2dvL2NvbW1lcmNlL2NvbnN1bWVyL3Byb2N1cmVtZW50", + "L2FwaXYxL3Byb2N1cmVtZW50cGI7cHJvY3VyZW1lbnRwYqoCLUdvb2dsZS5D", + "bG91ZC5Db21tZXJjZS5Db25zdW1lci5Qcm9jdXJlbWVudC5WMcoCLUdvb2ds", + "ZVxDbG91ZFxDb21tZXJjZVxDb25zdW1lclxQcm9jdXJlbWVudFxWMeoCMkdv", + "b2dsZTo6Q2xvdWQ6OkNvbW1lcmNlOjpDb25zdW1lcjo6UHJvY3VyZW1lbnQ6", + "OlYxYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Commerce.Consumer.Procurement.V1.OrderReflection.Descriptor, global::Google.LongRunning.OperationsReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.AutoRenewalBehavior), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderRequest), global::Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderRequest.Parser, new[]{ "Parent", "DisplayName", "LineItemInfo", "RequestId" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderMetadata), global::Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderMetadata.Parser, null, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.GetOrderRequest), global::Google.Cloud.Commerce.Consumer.Procurement.V1.GetOrderRequest.Parser, new[]{ "Name" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersRequest), global::Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersRequest.Parser, new[]{ "Parent", "PageSize", "PageToken", "Filter" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersResponse), global::Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersResponse.Parser, new[]{ "Orders", "NextPageToken" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersResponse), global::Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersResponse.Parser, new[]{ "Orders", "NextPageToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest), global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest.Parser, new[]{ "Name", "Modifications", "DisplayName", "Etag" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest.Types.Modification), global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest.Types.Modification.Parser, new[]{ "LineItemId", "ChangeType", "NewLineItemInfo", "AutoRenewalBehavior" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderMetadata), global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderMetadata.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest), global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Parser, new[]{ "Name", "Etag", "CancellationPolicy" }, null, new[]{ typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Types.CancellationPolicy) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderMetadata), global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderMetadata.Parser, null, null, null, null, null) })); } #endregion } + #region Enums + /// + /// Indicates the auto renewal behavior customer specifies on subscription. + /// + public enum AutoRenewalBehavior { + /// + /// If unspecified, the auto renewal behavior will follow the default config. + /// + [pbr::OriginalName("AUTO_RENEWAL_BEHAVIOR_UNSPECIFIED")] Unspecified = 0, + /// + /// Auto Renewal will be enabled on subscription. + /// + [pbr::OriginalName("AUTO_RENEWAL_BEHAVIOR_ENABLE")] Enable = 1, + /// + /// Auto Renewal will be disabled on subscription. + /// + [pbr::OriginalName("AUTO_RENEWAL_BEHAVIOR_DISABLE")] Disable = 2, + } + + #endregion + #region Messages /// /// Request message for @@ -184,7 +241,7 @@ public string DisplayName { /// /// Optional. A unique identifier for this request. /// The server will ignore subsequent requests that provide a duplicate request - /// ID for at least 120 minutes after the first request. + /// ID for at least 24 hours after the first request. /// /// The request ID must be a valid /// [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). @@ -1307,6 +1364,1284 @@ public void MergeFrom(pb::CodedInputStream input) { } + /// + /// Request message for + /// [ConsumerProcurementService.ModifyOrder][google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ModifyOrder]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ModifyOrderRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ModifyOrderRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.ProcurementServiceReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModifyOrderRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModifyOrderRequest(ModifyOrderRequest other) : this() { + name_ = other.name_; + modifications_ = other.modifications_.Clone(); + displayName_ = other.displayName_; + etag_ = other.etag_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModifyOrderRequest Clone() { + return new ModifyOrderRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. Name of the order to update. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "modifications" field. + public const int ModificationsFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_modifications_codec + = pb::FieldCodec.ForMessage(50, global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest.Types.Modification.Parser); + private readonly pbc::RepeatedField modifications_ = new pbc::RepeatedField(); + /// + /// Optional. Modifications for an existing Order created by an Offer. + /// Required when Offer based Order is being modified, except for when going + /// from an offer to a public plan. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Modifications { + get { return modifications_; } + } + + /// Field number for the "display_name" field. + public const int DisplayNameFieldNumber = 5; + private string displayName_ = ""; + /// + /// Optional. Updated display name of the order, leave as empty if you do not + /// want to update current display name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DisplayName { + get { return displayName_; } + set { + displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "etag" field. + public const int EtagFieldNumber = 4; + private string etag_ = ""; + /// + /// Optional. The weak etag, which can be optionally populated, of the order + /// that this modify request is based on. Validation checking will only happen + /// if the invoker supplies this field. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Etag { + get { return etag_; } + set { + etag_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ModifyOrderRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ModifyOrderRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if(!modifications_.Equals(other.modifications_)) return false; + if (DisplayName != other.DisplayName) return false; + if (Etag != other.Etag) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + hash ^= modifications_.GetHashCode(); + if (DisplayName.Length != 0) hash ^= DisplayName.GetHashCode(); + if (Etag.Length != 0) hash ^= Etag.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Etag.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Etag); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(DisplayName); + } + modifications_.WriteTo(output, _repeated_modifications_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Etag.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Etag); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(DisplayName); + } + modifications_.WriteTo(ref output, _repeated_modifications_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += modifications_.CalculateSize(_repeated_modifications_codec); + if (DisplayName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName); + } + if (Etag.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Etag); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ModifyOrderRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + modifications_.Add(other.modifications_); + if (other.DisplayName.Length != 0) { + DisplayName = other.DisplayName; + } + if (other.Etag.Length != 0) { + Etag = other.Etag; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 34: { + Etag = input.ReadString(); + break; + } + case 42: { + DisplayName = input.ReadString(); + break; + } + case 50: { + modifications_.AddEntriesFrom(input, _repeated_modifications_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 34: { + Etag = input.ReadString(); + break; + } + case 42: { + DisplayName = input.ReadString(); + break; + } + case 50: { + modifications_.AddEntriesFrom(ref input, _repeated_modifications_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ModifyOrderRequest message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Modifications to make on the order. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Modification : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Modification()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Modification() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Modification(Modification other) : this() { + lineItemId_ = other.lineItemId_; + changeType_ = other.changeType_; + newLineItemInfo_ = other.newLineItemInfo_ != null ? other.newLineItemInfo_.Clone() : null; + autoRenewalBehavior_ = other.autoRenewalBehavior_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Modification Clone() { + return new Modification(this); + } + + /// Field number for the "line_item_id" field. + public const int LineItemIdFieldNumber = 1; + private string lineItemId_ = ""; + /// + /// Required. ID of the existing line item to make change to. + /// Required when change type is + /// [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE] or + /// [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_CANCEL]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string LineItemId { + get { return lineItemId_; } + set { + lineItemId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "change_type" field. + public const int ChangeTypeFieldNumber = 2; + private global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemChangeType changeType_ = global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemChangeType.Unspecified; + /// + /// Required. Type of change to make. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemChangeType ChangeType { + get { return changeType_; } + set { + changeType_ = value; + } + } + + /// Field number for the "new_line_item_info" field. + public const int NewLineItemInfoFieldNumber = 3; + private global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemInfo newLineItemInfo_; + /// + /// Optional. The line item to update to. + /// Required when change_type is + /// [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_CREATE] or + /// [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemInfo NewLineItemInfo { + get { return newLineItemInfo_; } + set { + newLineItemInfo_ = value; + } + } + + /// Field number for the "auto_renewal_behavior" field. + public const int AutoRenewalBehaviorFieldNumber = 4; + private global::Google.Cloud.Commerce.Consumer.Procurement.V1.AutoRenewalBehavior autoRenewalBehavior_ = global::Google.Cloud.Commerce.Consumer.Procurement.V1.AutoRenewalBehavior.Unspecified; + /// + /// Optional. Auto renewal behavior of the subscription for the update. + /// Applied when change_type is + /// [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE]. Follows plan default + /// config when this field is not specified. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Commerce.Consumer.Procurement.V1.AutoRenewalBehavior AutoRenewalBehavior { + get { return autoRenewalBehavior_; } + set { + autoRenewalBehavior_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Modification); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Modification other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (LineItemId != other.LineItemId) return false; + if (ChangeType != other.ChangeType) return false; + if (!object.Equals(NewLineItemInfo, other.NewLineItemInfo)) return false; + if (AutoRenewalBehavior != other.AutoRenewalBehavior) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (LineItemId.Length != 0) hash ^= LineItemId.GetHashCode(); + if (ChangeType != global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemChangeType.Unspecified) hash ^= ChangeType.GetHashCode(); + if (newLineItemInfo_ != null) hash ^= NewLineItemInfo.GetHashCode(); + if (AutoRenewalBehavior != global::Google.Cloud.Commerce.Consumer.Procurement.V1.AutoRenewalBehavior.Unspecified) hash ^= AutoRenewalBehavior.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (LineItemId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(LineItemId); + } + if (ChangeType != global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemChangeType.Unspecified) { + output.WriteRawTag(16); + output.WriteEnum((int) ChangeType); + } + if (newLineItemInfo_ != null) { + output.WriteRawTag(26); + output.WriteMessage(NewLineItemInfo); + } + if (AutoRenewalBehavior != global::Google.Cloud.Commerce.Consumer.Procurement.V1.AutoRenewalBehavior.Unspecified) { + output.WriteRawTag(32); + output.WriteEnum((int) AutoRenewalBehavior); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (LineItemId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(LineItemId); + } + if (ChangeType != global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemChangeType.Unspecified) { + output.WriteRawTag(16); + output.WriteEnum((int) ChangeType); + } + if (newLineItemInfo_ != null) { + output.WriteRawTag(26); + output.WriteMessage(NewLineItemInfo); + } + if (AutoRenewalBehavior != global::Google.Cloud.Commerce.Consumer.Procurement.V1.AutoRenewalBehavior.Unspecified) { + output.WriteRawTag(32); + output.WriteEnum((int) AutoRenewalBehavior); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (LineItemId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(LineItemId); + } + if (ChangeType != global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemChangeType.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ChangeType); + } + if (newLineItemInfo_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(NewLineItemInfo); + } + if (AutoRenewalBehavior != global::Google.Cloud.Commerce.Consumer.Procurement.V1.AutoRenewalBehavior.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AutoRenewalBehavior); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Modification other) { + if (other == null) { + return; + } + if (other.LineItemId.Length != 0) { + LineItemId = other.LineItemId; + } + if (other.ChangeType != global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemChangeType.Unspecified) { + ChangeType = other.ChangeType; + } + if (other.newLineItemInfo_ != null) { + if (newLineItemInfo_ == null) { + NewLineItemInfo = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemInfo(); + } + NewLineItemInfo.MergeFrom(other.NewLineItemInfo); + } + if (other.AutoRenewalBehavior != global::Google.Cloud.Commerce.Consumer.Procurement.V1.AutoRenewalBehavior.Unspecified) { + AutoRenewalBehavior = other.AutoRenewalBehavior; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + LineItemId = input.ReadString(); + break; + } + case 16: { + ChangeType = (global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemChangeType) input.ReadEnum(); + break; + } + case 26: { + if (newLineItemInfo_ == null) { + NewLineItemInfo = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemInfo(); + } + input.ReadMessage(NewLineItemInfo); + break; + } + case 32: { + AutoRenewalBehavior = (global::Google.Cloud.Commerce.Consumer.Procurement.V1.AutoRenewalBehavior) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + LineItemId = input.ReadString(); + break; + } + case 16: { + ChangeType = (global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemChangeType) input.ReadEnum(); + break; + } + case 26: { + if (newLineItemInfo_ == null) { + NewLineItemInfo = new global::Google.Cloud.Commerce.Consumer.Procurement.V1.LineItemInfo(); + } + input.ReadMessage(NewLineItemInfo); + break; + } + case 32: { + AutoRenewalBehavior = (global::Google.Cloud.Commerce.Consumer.Procurement.V1.AutoRenewalBehavior) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Message stored in the metadata field of the Operation returned by + /// [ConsumerProcurementService.ModifyOrder][google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ModifyOrder]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ModifyOrderMetadata : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ModifyOrderMetadata()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.ProcurementServiceReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModifyOrderMetadata() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModifyOrderMetadata(ModifyOrderMetadata other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModifyOrderMetadata Clone() { + return new ModifyOrderMetadata(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ModifyOrderMetadata); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ModifyOrderMetadata other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ModifyOrderMetadata other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + /// + /// Request message for + /// [ConsumerProcurementService.CancelOrder][google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.CancelOrder]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CancelOrderRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CancelOrderRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.ProcurementServiceReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelOrderRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelOrderRequest(CancelOrderRequest other) : this() { + name_ = other.name_; + etag_ = other.etag_; + cancellationPolicy_ = other.cancellationPolicy_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelOrderRequest Clone() { + return new CancelOrderRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The resource name of the order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "etag" field. + public const int EtagFieldNumber = 2; + private string etag_ = ""; + /// + /// Optional. The weak etag, which can be optionally populated, of the order + /// that this cancel request is based on. Validation checking will only happen + /// if the invoker supplies this field. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Etag { + get { return etag_; } + set { + etag_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "cancellation_policy" field. + public const int CancellationPolicyFieldNumber = 3; + private global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Types.CancellationPolicy cancellationPolicy_ = global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Types.CancellationPolicy.Unspecified; + /// + /// Optional. Cancellation policy of this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Types.CancellationPolicy CancellationPolicy { + get { return cancellationPolicy_; } + set { + cancellationPolicy_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CancelOrderRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CancelOrderRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Etag != other.Etag) return false; + if (CancellationPolicy != other.CancellationPolicy) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Etag.Length != 0) hash ^= Etag.GetHashCode(); + if (CancellationPolicy != global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Types.CancellationPolicy.Unspecified) hash ^= CancellationPolicy.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Etag.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Etag); + } + if (CancellationPolicy != global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Types.CancellationPolicy.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) CancellationPolicy); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Etag.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Etag); + } + if (CancellationPolicy != global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Types.CancellationPolicy.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) CancellationPolicy); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Etag.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Etag); + } + if (CancellationPolicy != global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Types.CancellationPolicy.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CancellationPolicy); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CancelOrderRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Etag.Length != 0) { + Etag = other.Etag; + } + if (other.CancellationPolicy != global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Types.CancellationPolicy.Unspecified) { + CancellationPolicy = other.CancellationPolicy; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Etag = input.ReadString(); + break; + } + case 24: { + CancellationPolicy = (global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Types.CancellationPolicy) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Etag = input.ReadString(); + break; + } + case 24: { + CancellationPolicy = (global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Types.CancellationPolicy) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the CancelOrderRequest message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Indicates the cancellation policy the customer uses to cancel the order. + /// + public enum CancellationPolicy { + /// + /// If unspecified, cancellation will try to cancel the order, if order + /// cannot be immediately cancelled, auto renewal will be turned off. + /// However, caller should avoid using the value as it will yield a + /// non-deterministic result. This is still supported mainly to maintain + /// existing integrated usages and ensure backwards compatibility. + /// + [pbr::OriginalName("CANCELLATION_POLICY_UNSPECIFIED")] Unspecified = 0, + /// + /// Request will cancel the whole order immediately, if order cannot be + /// immediately cancelled, the request will fail. + /// + [pbr::OriginalName("CANCELLATION_POLICY_CANCEL_IMMEDIATELY")] CancelImmediately = 1, + /// + /// Request will cancel the auto renewal, if order is not subscription based, + /// the request will fail. + /// + [pbr::OriginalName("CANCELLATION_POLICY_CANCEL_AT_TERM_END")] CancelAtTermEnd = 2, + } + + } + #endregion + + } + + /// + /// Message stored in the metadata field of the Operation returned by + /// [ConsumerProcurementService.CancelOrder][google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.CancelOrder]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CancelOrderMetadata : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CancelOrderMetadata()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Commerce.Consumer.Procurement.V1.ProcurementServiceReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelOrderMetadata() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelOrderMetadata(CancelOrderMetadata other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CancelOrderMetadata Clone() { + return new CancelOrderMetadata(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CancelOrderMetadata); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CancelOrderMetadata other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CancelOrderMetadata other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + #endregion } diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ProcurementServiceGrpc.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ProcurementServiceGrpc.g.cs index 6d73622fb191..86a06f7e3bef 100644 --- a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ProcurementServiceGrpc.g.cs +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ProcurementServiceGrpc.g.cs @@ -82,6 +82,10 @@ static T __Helper_DeserializeMessage(grpc::DeserializationContext context, gl static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_ListOrdersRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersRequest.Parser)); [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_ListOrdersResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_ModifyOrderRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_commerce_consumer_procurement_v1_CancelOrderRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest.Parser)); [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_PlaceOrder = new grpc::Method( @@ -107,6 +111,22 @@ static T __Helper_DeserializeMessage(grpc::DeserializationContext context, gl __Marshaller_google_cloud_commerce_consumer_procurement_v1_ListOrdersRequest, __Marshaller_google_cloud_commerce_consumer_procurement_v1_ListOrdersResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ModifyOrder = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ModifyOrder", + __Marshaller_google_cloud_commerce_consumer_procurement_v1_ModifyOrderRequest, + __Marshaller_google_longrunning_Operation); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_CancelOrder = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CancelOrder", + __Marshaller_google_cloud_commerce_consumer_procurement_v1_CancelOrderRequest, + __Marshaller_google_longrunning_Operation); + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { @@ -165,6 +185,33 @@ public abstract partial class ConsumerProcurementServiceBase throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); } + /// + /// Modifies an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ModifyOrder(global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Cancels an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product + /// procured in the Order will be cancelled. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task CancelOrder(global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + } /// Client for ConsumerProcurementService @@ -386,6 +433,114 @@ protected ConsumerProcurementServiceClient(ClientBaseConfiguration configuration { return CallInvoker.AsyncUnaryCall(__Method_ListOrders, null, options, request); } + /// + /// Modifies an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation ModifyOrder(global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ModifyOrder(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Modifies an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation ModifyOrder(global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ModifyOrder, null, options, request); + } + /// + /// Modifies an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ModifyOrderAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ModifyOrderAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Modifies an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ModifyOrderAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ModifyOrder, null, options, request); + } + /// + /// Cancels an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product + /// procured in the Order will be cancelled. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation CancelOrder(global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CancelOrder(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Cancels an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product + /// procured in the Order will be cancelled. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation CancelOrder(global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CancelOrder, null, options, request); + } + /// + /// Cancels an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product + /// procured in the Order will be cancelled. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CancelOrderAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CancelOrderAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Cancels an existing + /// [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product + /// procured in the Order will be cancelled. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CancelOrderAsync(global::Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CancelOrder, null, options, request); + } /// Creates a new instance of client from given ClientBaseConfiguration. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override ConsumerProcurementServiceClient NewInstance(ClientBaseConfiguration configuration) @@ -402,7 +557,9 @@ protected override ConsumerProcurementServiceClient NewInstance(ClientBaseConfig return grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_PlaceOrder, serviceImpl.PlaceOrder) .AddMethod(__Method_GetOrder, serviceImpl.GetOrder) - .AddMethod(__Method_ListOrders, serviceImpl.ListOrders).Build(); + .AddMethod(__Method_ListOrders, serviceImpl.ListOrders) + .AddMethod(__Method_ModifyOrder, serviceImpl.ModifyOrder) + .AddMethod(__Method_CancelOrder, serviceImpl.CancelOrder).Build(); } /// Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. @@ -415,6 +572,8 @@ public static void BindService(grpc::ServiceBinderBase serviceBinder, ConsumerPr serviceBinder.AddMethod(__Method_PlaceOrder, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.PlaceOrder)); serviceBinder.AddMethod(__Method_GetOrder, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetOrder)); serviceBinder.AddMethod(__Method_ListOrders, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListOrders)); + serviceBinder.AddMethod(__Method_ModifyOrder, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ModifyOrder)); + serviceBinder.AddMethod(__Method_CancelOrder, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.CancelOrder)); } } diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ServiceCollectionExtensions.g.cs b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ServiceCollectionExtensions.g.cs index d1674a8f20bb..0c300df3f919 100644 --- a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ServiceCollectionExtensions.g.cs +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/Google.Cloud.Commerce.Consumer.Procurement.V1/ServiceCollectionExtensions.g.cs @@ -63,5 +63,41 @@ public static IServiceCollection AddConsumerProcurementServiceClient(this IServi action?.Invoke(provider, builder); return builder.Build(provider); }); + + /// + /// Adds a singleton to . + /// + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddLicenseManagementServiceClient(this IServiceCollection services, sys::Action action = null) => + services.AddSingleton(provider => + { + gcccpv::LicenseManagementServiceClientBuilder builder = new gcccpv::LicenseManagementServiceClientBuilder(); + action?.Invoke(builder); + return builder.Build(provider); + }); + + /// + /// Adds a singleton to . + /// + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddLicenseManagementServiceClient(this IServiceCollection services, sys::Action action) => + services.AddSingleton(provider => + { + gcccpv::LicenseManagementServiceClientBuilder builder = new gcccpv::LicenseManagementServiceClientBuilder(); + action?.Invoke(provider, builder); + return builder.Build(provider); + }); } } diff --git a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/gapic_metadata.json b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/gapic_metadata.json index 96a7905709c9..ade4ea8c84d4 100644 --- a/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/gapic_metadata.json +++ b/apis/Google.Cloud.Commerce.Consumer.Procurement.V1/gapic_metadata.json @@ -10,6 +10,12 @@ "grpc": { "libraryClient": "ConsumerProcurementServiceClient", "rpcs": { + "CancelOrder": { + "methods": [ + "CancelOrder", + "CancelOrderAsync" + ] + }, "GetOrder": { "methods": [ "GetOrder", @@ -22,6 +28,12 @@ "ListOrdersAsync" ] }, + "ModifyOrder": { + "methods": [ + "ModifyOrder", + "ModifyOrderAsync" + ] + }, "PlaceOrder": { "methods": [ "PlaceOrder", @@ -31,6 +43,45 @@ } } } + }, + "LicenseManagementService": { + "clients": { + "grpc": { + "libraryClient": "LicenseManagementServiceClient", + "rpcs": { + "Assign": { + "methods": [ + "Assign", + "AssignAsync" + ] + }, + "EnumerateLicensedUsers": { + "methods": [ + "EnumerateLicensedUsers", + "EnumerateLicensedUsersAsync" + ] + }, + "GetLicensePool": { + "methods": [ + "GetLicensePool", + "GetLicensePoolAsync" + ] + }, + "Unassign": { + "methods": [ + "Unassign", + "UnassignAsync" + ] + }, + "UpdateLicensePool": { + "methods": [ + "UpdateLicensePool", + "UpdateLicensePoolAsync" + ] + } + } + } + } } } }