-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add data store, engine, serving config and site search engine s…
…ervices feat: support search summarization with citations and references feat: add suggestion deny list import/purge APIs feat: add engine support for multi-turn search and search APIs docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 605344453 Source-Link: googleapis/googleapis@4fd031d Source-Link: googleapis/googleapis-gen@b77d7a4 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRGlzY292ZXJ5RW5naW5lLlYxQmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiYjc3ZDdhNDQ2YzJlODU5ZGFkMTZhZmQwYTFkMWU4ZjUwM2ZiYTg4NCJ9
- Loading branch information
1 parent
eb2157a
commit b2d79e6
Showing
179 changed files
with
53,130 additions
and
2,024 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
...ets/CompletionServiceClient.ImportSuggestionDenyListEntriesRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 discoveryengine_v1beta_generated_CompletionService_ImportSuggestionDenyListEntries_async] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedCompletionServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for ImportSuggestionDenyListEntriesAsync</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 ImportSuggestionDenyListEntriesRequestObjectAsync() | ||
{ | ||
// Create client | ||
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
ImportSuggestionDenyListEntriesRequest request = new ImportSuggestionDenyListEntriesRequest | ||
{ | ||
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"), | ||
InlineSource = new ImportSuggestionDenyListEntriesRequest.Types.InlineSource(), | ||
}; | ||
// Make the request | ||
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> response = await completionServiceClient.ImportSuggestionDenyListEntriesAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
ImportSuggestionDenyListEntriesResponse 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<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> retrievedResponse = await completionServiceClient.PollOnceImportSuggestionDenyListEntriesAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
ImportSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_CompletionService_ImportSuggestionDenyListEntries_async] | ||
} |
64 changes: 64 additions & 0 deletions
64
...Snippets/CompletionServiceClient.ImportSuggestionDenyListEntriesRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// 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 discoveryengine_v1beta_generated_CompletionService_ImportSuggestionDenyListEntries_sync] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedCompletionServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for ImportSuggestionDenyListEntries</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 ImportSuggestionDenyListEntriesRequestObject() | ||
{ | ||
// Create client | ||
CompletionServiceClient completionServiceClient = CompletionServiceClient.Create(); | ||
// Initialize request argument(s) | ||
ImportSuggestionDenyListEntriesRequest request = new ImportSuggestionDenyListEntriesRequest | ||
{ | ||
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"), | ||
InlineSource = new ImportSuggestionDenyListEntriesRequest.Types.InlineSource(), | ||
}; | ||
// Make the request | ||
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> response = completionServiceClient.ImportSuggestionDenyListEntries(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
ImportSuggestionDenyListEntriesResponse 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<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> retrievedResponse = completionServiceClient.PollOnceImportSuggestionDenyListEntries(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
ImportSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_CompletionService_ImportSuggestionDenyListEntries_sync] | ||
} |
64 changes: 64 additions & 0 deletions
64
...pets/CompletionServiceClient.PurgeSuggestionDenyListEntriesRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// 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 discoveryengine_v1beta_generated_CompletionService_PurgeSuggestionDenyListEntries_async] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedCompletionServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for PurgeSuggestionDenyListEntriesAsync</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 PurgeSuggestionDenyListEntriesRequestObjectAsync() | ||
{ | ||
// Create client | ||
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
PurgeSuggestionDenyListEntriesRequest request = new PurgeSuggestionDenyListEntriesRequest | ||
{ | ||
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"), | ||
}; | ||
// Make the request | ||
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> response = await completionServiceClient.PurgeSuggestionDenyListEntriesAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
PurgeSuggestionDenyListEntriesResponse 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<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> retrievedResponse = await completionServiceClient.PollOncePurgeSuggestionDenyListEntriesAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
PurgeSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_CompletionService_PurgeSuggestionDenyListEntries_async] | ||
} |
63 changes: 63 additions & 0 deletions
63
...dSnippets/CompletionServiceClient.PurgeSuggestionDenyListEntriesRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// 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 discoveryengine_v1beta_generated_CompletionService_PurgeSuggestionDenyListEntries_sync] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedCompletionServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for PurgeSuggestionDenyListEntries</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 PurgeSuggestionDenyListEntriesRequestObject() | ||
{ | ||
// Create client | ||
CompletionServiceClient completionServiceClient = CompletionServiceClient.Create(); | ||
// Initialize request argument(s) | ||
PurgeSuggestionDenyListEntriesRequest request = new PurgeSuggestionDenyListEntriesRequest | ||
{ | ||
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"), | ||
}; | ||
// Make the request | ||
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> response = completionServiceClient.PurgeSuggestionDenyListEntries(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
PurgeSuggestionDenyListEntriesResponse 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<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> retrievedResponse = completionServiceClient.PollOncePurgeSuggestionDenyListEntries(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
PurgeSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_CompletionService_PurgeSuggestionDenyListEntries_sync] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
...ryEngine.V1Beta.GeneratedSnippets/DataStoreServiceClient.CreateDataStoreAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// 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 discoveryengine_v1beta_generated_DataStoreService_CreateDataStore_async_flattened] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedDataStoreServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateDataStoreAsync</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 CreateDataStoreAsync() | ||
{ | ||
// Create client | ||
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]"; | ||
DataStore dataStore = new DataStore(); | ||
string dataStoreId = ""; | ||
// Make the request | ||
Operation<DataStore, CreateDataStoreMetadata> response = await dataStoreServiceClient.CreateDataStoreAsync(parent, dataStore, dataStoreId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<DataStore, CreateDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
DataStore 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<DataStore, CreateDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceCreateDataStoreAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
DataStore retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_DataStoreService_CreateDataStore_async_flattened] | ||
} |
Oops, something went wrong.