Skip to content

Commit

Permalink
feat: promote grounding check APIs to v1 GA
Browse files Browse the repository at this point in the history
feat: promote answer APIs to v1 GA
feat: promote ranking APIs to v1 GA
feat: add control service APIs
feat: support writing user events for blended engines
feat: support cancelling import operations
docs: keep the API doc up-to-date with recent changes

PiperOrigin-RevId: 637140936

Source-Link: googleapis/googleapis@4f3af9b

Source-Link: googleapis/googleapis-gen@6cdc4fe
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRGlzY292ZXJ5RW5naW5lLlYxLy5Pd2xCb3QueWFtbCIsImgiOiI2Y2RjNGZlOTM2ZmIzMjRjYmVlMTQzYzE3N2Y2Zjc0ZTQ5NTU0NDhkIn0=
  • Loading branch information
gcf-owl-bot[bot] authored and amanda-tarafa committed May 28, 2024
1 parent 54d1ff9 commit 8e6674a
Show file tree
Hide file tree
Showing 137 changed files with 44,420 additions and 2,729 deletions.
Original file line number Diff line number Diff line change
@@ -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 discoveryengine_v1_generated_ControlService_CreateControl_async_flattened]
using Google.Cloud.DiscoveryEngine.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedControlServiceClientSnippets
{
/// <summary>Snippet for CreateControlAsync</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 CreateControlAsync()
{
// Create client
ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
Control control = new Control();
string controlId = "";
// Make the request
Control response = await controlServiceClient.CreateControlAsync(parent, control, controlId);
}
}
// [END discoveryengine_v1_generated_ControlService_CreateControl_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -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 discoveryengine_v1_generated_ControlService_CreateControl_async]
using Google.Cloud.DiscoveryEngine.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedControlServiceClientSnippets
{
/// <summary>Snippet for CreateControlAsync</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 CreateControlRequestObjectAsync()
{
// Create client
ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
// Initialize request argument(s)
CreateControlRequest request = new CreateControlRequest
{
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
Control = new Control(),
ControlId = "",
};
// Make the request
Control response = await controlServiceClient.CreateControlAsync(request);
}
}
// [END discoveryengine_v1_generated_ControlService_CreateControl_async]
}
Original file line number Diff line number Diff line change
@@ -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 discoveryengine_v1_generated_ControlService_CreateControl_sync]
using Google.Cloud.DiscoveryEngine.V1;

public sealed partial class GeneratedControlServiceClientSnippets
{
/// <summary>Snippet for CreateControl</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 CreateControlRequestObject()
{
// Create client
ControlServiceClient controlServiceClient = ControlServiceClient.Create();
// Initialize request argument(s)
CreateControlRequest request = new CreateControlRequest
{
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
Control = new Control(),
ControlId = "",
};
// Make the request
Control response = controlServiceClient.CreateControl(request);
}
}
// [END discoveryengine_v1_generated_ControlService_CreateControl_sync]
}
Original file line number Diff line number Diff line change
@@ -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 discoveryengine_v1_generated_ControlService_CreateControl_async_flattened_resourceNames]
using Google.Cloud.DiscoveryEngine.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedControlServiceClientSnippets
{
/// <summary>Snippet for CreateControlAsync</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 CreateControlResourceNamesAsync()
{
// Create client
ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
Control control = new Control();
string controlId = "";
// Make the request
Control response = await controlServiceClient.CreateControlAsync(parent, control, controlId);
}
}
// [END discoveryengine_v1_generated_ControlService_CreateControl_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -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 discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened_resourceNames]
using Google.Cloud.DiscoveryEngine.V1;

public sealed partial class GeneratedControlServiceClientSnippets
{
/// <summary>Snippet for CreateControl</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 CreateControlResourceNames()
{
// Create client
ControlServiceClient controlServiceClient = ControlServiceClient.Create();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
Control control = new Control();
string controlId = "";
// Make the request
Control response = controlServiceClient.CreateControl(parent, control, controlId);
}
}
// [END discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -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 discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened]
using Google.Cloud.DiscoveryEngine.V1;

public sealed partial class GeneratedControlServiceClientSnippets
{
/// <summary>Snippet for CreateControl</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 CreateControl()
{
// Create client
ControlServiceClient controlServiceClient = ControlServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
Control control = new Control();
string controlId = "";
// Make the request
Control response = controlServiceClient.CreateControl(parent, control, controlId);
}
}
// [END discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -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 discoveryengine_v1_generated_ControlService_DeleteControl_async_flattened]
using Google.Cloud.DiscoveryEngine.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedControlServiceClientSnippets
{
/// <summary>Snippet for DeleteControlAsync</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 DeleteControlAsync()
{
// Create client
ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/controls/[CONTROL]";
// Make the request
await controlServiceClient.DeleteControlAsync(name);
}
}
// [END discoveryengine_v1_generated_ControlService_DeleteControl_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -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 discoveryengine_v1_generated_ControlService_DeleteControl_async]
using Google.Cloud.DiscoveryEngine.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedControlServiceClientSnippets
{
/// <summary>Snippet for DeleteControlAsync</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 DeleteControlRequestObjectAsync()
{
// Create client
ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteControlRequest request = new DeleteControlRequest
{
ControlName = ControlName.FromProjectLocationDataStoreControl("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONTROL]"),
};
// Make the request
await controlServiceClient.DeleteControlAsync(request);
}
}
// [END discoveryengine_v1_generated_ControlService_DeleteControl_async]
}
Loading

0 comments on commit 8e6674a

Please sign in to comment.