Skip to content

Commit

Permalink
feat: added support for custom content types
Browse files Browse the repository at this point in the history
docs: clarified wording around quota usage

PiperOrigin-RevId: 513681148

Source-Link: googleapis/googleapis@3b8869b

Source-Link: googleapis/googleapis-gen@c1c7570
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRGlhbG9nZmxvdy5WMi8uT3dsQm90LnlhbWwiLCJoIjoiYzFjNzU3MGIzMTVmZjJjYzk2NWMxN2EzYzlhODM0YjJhZjE4YWUwYyJ9
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Mar 3, 2023
1 parent 6db57ed commit 15d6a43
Show file tree
Hide file tree
Showing 12 changed files with 874 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace Google.Cloud.Dialogflow.V2.Snippets
{
// [START dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_async_flattened]
// [START dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_async_flattened1]
using Google.Cloud.Dialogflow.V2;
using Google.LongRunning;
using System.Threading.Tasks;
Expand All @@ -31,7 +31,7 @@ public sealed partial class GeneratedConversationProfilesClientSnippets
/// - 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 ClearSuggestionFeatureConfigAsync()
public async Task ClearSuggestionFeatureConfig1Async()
{
// Create client
ConversationProfilesClient conversationProfilesClient = await ConversationProfilesClient.CreateAsync();
Expand All @@ -57,5 +57,5 @@ public async Task ClearSuggestionFeatureConfigAsync()
}
}
}
// [END dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_async_flattened]
// [END dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_async_flattened1]
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace Google.Cloud.Dialogflow.V2.Snippets
{
// [START dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_sync_flattened]
// [START dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_sync_flattened1]
using Google.Cloud.Dialogflow.V2;
using Google.LongRunning;

Expand All @@ -30,7 +30,7 @@ public sealed partial class GeneratedConversationProfilesClientSnippets
/// - 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 ClearSuggestionFeatureConfig()
public void ClearSuggestionFeatureConfig1()
{
// Create client
ConversationProfilesClient conversationProfilesClient = ConversationProfilesClient.Create();
Expand All @@ -56,5 +56,5 @@ public void ClearSuggestionFeatureConfig()
}
}
}
// [END dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_sync_flattened]
// [END dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_sync_flattened1]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Copyright 2023 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.Dialogflow.V2.Snippets
{
// [START dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_async_flattened2]
using Google.Cloud.Dialogflow.V2;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedConversationProfilesClientSnippets
{
/// <summary>Snippet for ClearSuggestionFeatureConfigAsync</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 ClearSuggestionFeatureConfig2Async()
{
// Create client
ConversationProfilesClient conversationProfilesClient = await ConversationProfilesClient.CreateAsync();
// Initialize request argument(s)
string conversationProfile = "";
Participant.Types.Role participantRole = Participant.Types.Role.Unspecified;
SuggestionFeature.Types.Type suggestionFeatureType = SuggestionFeature.Types.Type.Unspecified;
// Make the request
Operation<ConversationProfile, ClearSuggestionFeatureConfigOperationMetadata> response = await conversationProfilesClient.ClearSuggestionFeatureConfigAsync(conversationProfile, participantRole, suggestionFeatureType);

// Poll until the returned long-running operation is complete
Operation<ConversationProfile, ClearSuggestionFeatureConfigOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ConversationProfile 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<ConversationProfile, ClearSuggestionFeatureConfigOperationMetadata> retrievedResponse = await conversationProfilesClient.PollOnceClearSuggestionFeatureConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ConversationProfile retrievedResult = retrievedResponse.Result;
}
}
}
// [END dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_async_flattened2]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright 2023 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.Dialogflow.V2.Snippets
{
// [START dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_sync_flattened2]
using Google.Cloud.Dialogflow.V2;
using Google.LongRunning;

public sealed partial class GeneratedConversationProfilesClientSnippets
{
/// <summary>Snippet for ClearSuggestionFeatureConfig</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 ClearSuggestionFeatureConfig2()
{
// Create client
ConversationProfilesClient conversationProfilesClient = ConversationProfilesClient.Create();
// Initialize request argument(s)
string conversationProfile = "";
Participant.Types.Role participantRole = Participant.Types.Role.Unspecified;
SuggestionFeature.Types.Type suggestionFeatureType = SuggestionFeature.Types.Type.Unspecified;
// Make the request
Operation<ConversationProfile, ClearSuggestionFeatureConfigOperationMetadata> response = conversationProfilesClient.ClearSuggestionFeatureConfig(conversationProfile, participantRole, suggestionFeatureType);

// Poll until the returned long-running operation is complete
Operation<ConversationProfile, ClearSuggestionFeatureConfigOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ConversationProfile 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<ConversationProfile, ClearSuggestionFeatureConfigOperationMetadata> retrievedResponse = conversationProfilesClient.PollOnceClearSuggestionFeatureConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ConversationProfile retrievedResult = retrievedResponse.Result;
}
}
}
// [END dialogflow_v2_generated_ConversationProfiles_ClearSuggestionFeatureConfig_sync_flattened2]
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace Google.Cloud.Dialogflow.V2.Snippets
{
// [START dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_async_flattened]
// [START dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_async_flattened1]
using Google.Cloud.Dialogflow.V2;
using Google.LongRunning;
using System.Threading.Tasks;
Expand All @@ -31,7 +31,7 @@ public sealed partial class GeneratedConversationProfilesClientSnippets
/// - 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 SetSuggestionFeatureConfigAsync()
public async Task SetSuggestionFeatureConfig1Async()
{
// Create client
ConversationProfilesClient conversationProfilesClient = await ConversationProfilesClient.CreateAsync();
Expand All @@ -57,5 +57,5 @@ public async Task SetSuggestionFeatureConfigAsync()
}
}
}
// [END dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_async_flattened]
// [END dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_async_flattened1]
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace Google.Cloud.Dialogflow.V2.Snippets
{
// [START dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_sync_flattened]
// [START dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_sync_flattened1]
using Google.Cloud.Dialogflow.V2;
using Google.LongRunning;

Expand All @@ -30,7 +30,7 @@ public sealed partial class GeneratedConversationProfilesClientSnippets
/// - 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 SetSuggestionFeatureConfig()
public void SetSuggestionFeatureConfig1()
{
// Create client
ConversationProfilesClient conversationProfilesClient = ConversationProfilesClient.Create();
Expand All @@ -56,5 +56,5 @@ public void SetSuggestionFeatureConfig()
}
}
}
// [END dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_sync_flattened]
// [END dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_sync_flattened1]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Copyright 2023 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.Dialogflow.V2.Snippets
{
// [START dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_async_flattened2]
using Google.Cloud.Dialogflow.V2;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedConversationProfilesClientSnippets
{
/// <summary>Snippet for SetSuggestionFeatureConfigAsync</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 SetSuggestionFeatureConfig2Async()
{
// Create client
ConversationProfilesClient conversationProfilesClient = await ConversationProfilesClient.CreateAsync();
// Initialize request argument(s)
string conversationProfile = "";
Participant.Types.Role participantRole = Participant.Types.Role.Unspecified;
HumanAgentAssistantConfig.Types.SuggestionFeatureConfig suggestionFeatureConfig = new HumanAgentAssistantConfig.Types.SuggestionFeatureConfig();
// Make the request
Operation<ConversationProfile, SetSuggestionFeatureConfigOperationMetadata> response = await conversationProfilesClient.SetSuggestionFeatureConfigAsync(conversationProfile, participantRole, suggestionFeatureConfig);

// Poll until the returned long-running operation is complete
Operation<ConversationProfile, SetSuggestionFeatureConfigOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ConversationProfile 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<ConversationProfile, SetSuggestionFeatureConfigOperationMetadata> retrievedResponse = await conversationProfilesClient.PollOnceSetSuggestionFeatureConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ConversationProfile retrievedResult = retrievedResponse.Result;
}
}
}
// [END dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_async_flattened2]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright 2023 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.Dialogflow.V2.Snippets
{
// [START dialogflow_v2_generated_ConversationProfiles_SetSuggestionFeatureConfig_sync_flattened2]
using Google.Cloud.Dialogflow.V2;
using Google.LongRunning;

public sealed partial class GeneratedConversationProfilesClientSnippets
{
/// <summary>Snippet for SetSuggestionFeatureConfig</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 SetSuggestionFeatureConfig2()
{
// Create client
ConversationProfilesClient conversationProfilesClient = ConversationProfilesClient.Create();
// Initialize request argument(s)
string conversationProfile = "";
Participant.Types.Role participantRole = Participant.Types.Role.Unspecified;
HumanAgentAssistantConfig.Types.SuggestionFeatureConfig suggestionFeatureConfig = new HumanAgentAssistantConfig.Types.SuggestionFeatureConfig();
// Make the request
Operation<ConversationProfile, SetSuggestionFeatureConfigOperationMetadata> response = conversationProfilesClient.SetSuggestionFeatureConfig(conversationProfile, participantRole, suggestionFeatureConfig);

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

0 comments on commit 15d6a43

Please sign in to comment.