Skip to content

Commit

Permalink
feat: add Configurable Analysis, Bulk Upload, Bulk Analyze, Delete Is…
Browse files Browse the repository at this point in the history
…sue Apis

PiperOrigin-RevId: 495057883

Source-Link: googleapis/googleapis@59a66eb

Source-Link: googleapis/googleapis-gen@9e7f289
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29udGFjdENlbnRlckluc2lnaHRzLlYxLy5Pd2xCb3QueWFtbCIsImgiOiI5ZTdmMjg5YzZjNmU0ZmQ1ZjYzYjZkY2ZlZTBkMjcyYWIxZGNhMWRlIn0=
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Dec 14, 2022
1 parent 1f81bac commit 6f38b9f
Show file tree
Hide file tree
Showing 27 changed files with 7,764 additions and 957 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace Google.Cloud.ContactCenterInsights.V1.Snippets
{
// [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async_flattened]
using Google.Cloud.ContactCenterInsights.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedContactCenterInsightsClientSnippets
{
/// <summary>Snippet for BulkAnalyzeConversationsAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task BulkAnalyzeConversationsAsync()
{
// Create client
ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string filter = "";
float analysisPercentage = 0F;
// Make the request
Operation<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> response = await contactCenterInsightsClient.BulkAnalyzeConversationsAsync(parent, filter, analysisPercentage);

// Poll until the returned long-running operation is complete
Operation<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BulkAnalyzeConversationsResponse 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<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> retrievedResponse = await contactCenterInsightsClient.PollOnceBulkAnalyzeConversationsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BulkAnalyzeConversationsResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace Google.Cloud.ContactCenterInsights.V1.Snippets
{
// [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.ContactCenterInsights.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedContactCenterInsightsClientSnippets
{
/// <summary>Snippet for BulkAnalyzeConversationsAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task BulkAnalyzeConversationsRequestObjectAsync()
{
// Create client
ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();
// Initialize request argument(s)
BulkAnalyzeConversationsRequest request = new BulkAnalyzeConversationsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
AnalysisPercentage = 0F,
AnnotatorSelector = new AnnotatorSelector(),
};
// Make the request
Operation<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> response = await contactCenterInsightsClient.BulkAnalyzeConversationsAsync(request);

// Poll until the returned long-running operation is complete
Operation<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BulkAnalyzeConversationsResponse 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<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> retrievedResponse = await contactCenterInsightsClient.PollOnceBulkAnalyzeConversationsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BulkAnalyzeConversationsResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace Google.Cloud.ContactCenterInsights.V1.Snippets
{
// [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.ContactCenterInsights.V1;
using Google.LongRunning;

public sealed partial class GeneratedContactCenterInsightsClientSnippets
{
/// <summary>Snippet for BulkAnalyzeConversations</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void BulkAnalyzeConversationsRequestObject()
{
// Create client
ContactCenterInsightsClient contactCenterInsightsClient = ContactCenterInsightsClient.Create();
// Initialize request argument(s)
BulkAnalyzeConversationsRequest request = new BulkAnalyzeConversationsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
AnalysisPercentage = 0F,
AnnotatorSelector = new AnnotatorSelector(),
};
// Make the request
Operation<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> response = contactCenterInsightsClient.BulkAnalyzeConversations(request);

// Poll until the returned long-running operation is complete
Operation<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BulkAnalyzeConversationsResponse 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<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> retrievedResponse = contactCenterInsightsClient.PollOnceBulkAnalyzeConversations(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BulkAnalyzeConversationsResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace Google.Cloud.ContactCenterInsights.V1.Snippets
{
// [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.ContactCenterInsights.V1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedContactCenterInsightsClientSnippets
{
/// <summary>Snippet for BulkAnalyzeConversationsAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task BulkAnalyzeConversationsResourceNamesAsync()
{
// Create client
ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string filter = "";
float analysisPercentage = 0F;
// Make the request
Operation<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> response = await contactCenterInsightsClient.BulkAnalyzeConversationsAsync(parent, filter, analysisPercentage);

// Poll until the returned long-running operation is complete
Operation<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BulkAnalyzeConversationsResponse 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<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> retrievedResponse = await contactCenterInsightsClient.PollOnceBulkAnalyzeConversationsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BulkAnalyzeConversationsResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace Google.Cloud.ContactCenterInsights.V1.Snippets
{
// [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.ContactCenterInsights.V1;
using Google.LongRunning;

public sealed partial class GeneratedContactCenterInsightsClientSnippets
{
/// <summary>Snippet for BulkAnalyzeConversations</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void BulkAnalyzeConversationsResourceNames()
{
// Create client
ContactCenterInsightsClient contactCenterInsightsClient = ContactCenterInsightsClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string filter = "";
float analysisPercentage = 0F;
// Make the request
Operation<BulkAnalyzeConversationsResponse, BulkAnalyzeConversationsMetadata> response = contactCenterInsightsClient.BulkAnalyzeConversations(parent, filter, analysisPercentage);

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

0 comments on commit 6f38b9f

Please sign in to comment.