diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlAsyncSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlAsyncSnippet.g.cs
index c7c101ea0cc9..b2ebc80d5c18 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlAsyncSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlAsyncSnippet.g.cs
@@ -35,7 +35,7 @@ public async Task CreateControlAsync()
// Create client
ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
// Initialize request argument(s)
- string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
+ string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/engines/[ENGINE]";
Control control = new Control();
string controlId = "";
// Make the request
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlRequestObjectAsyncSnippet.g.cs
index 535d45700886..d7f2090b7202 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlRequestObjectAsyncSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlRequestObjectAsyncSnippet.g.cs
@@ -37,7 +37,7 @@ public async Task CreateControlRequestObjectAsync()
// Initialize request argument(s)
CreateControlRequest request = new CreateControlRequest
{
- ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
+ ParentAsEngineName = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"),
Control = new Control(),
ControlId = "",
};
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlRequestObjectSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlRequestObjectSnippet.g.cs
index 11fcd1385371..b99b8ea28cc5 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlRequestObjectSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlRequestObjectSnippet.g.cs
@@ -36,7 +36,7 @@ public void CreateControlRequestObject()
// Initialize request argument(s)
CreateControlRequest request = new CreateControlRequest
{
- ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
+ ParentAsEngineName = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"),
Control = new Control(),
ControlId = "",
};
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames1AsyncSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames1AsyncSnippet.g.cs
new file mode 100644
index 000000000000..c642ede438d7
--- /dev/null
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames1AsyncSnippet.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 discoveryengine_v1_generated_ControlService_CreateControl_async_flattened_resourceNames1]
+ using Google.Cloud.DiscoveryEngine.V1;
+ using System.Threading.Tasks;
+
+ public sealed partial class GeneratedControlServiceClientSnippets
+ {
+ /// Snippet for CreateControlAsync
+ ///
+ /// 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 CreateControlResourceNames1Async()
+ {
+ // Create client
+ ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ EngineName parent = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ 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_resourceNames1]
+}
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames1Snippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames1Snippet.g.cs
new file mode 100644
index 000000000000..00ed7fb7b55c
--- /dev/null
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames1Snippet.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 discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened_resourceNames1]
+ using Google.Cloud.DiscoveryEngine.V1;
+
+ public sealed partial class GeneratedControlServiceClientSnippets
+ {
+ /// Snippet for CreateControl
+ ///
+ /// 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 CreateControlResourceNames1()
+ {
+ // Create client
+ ControlServiceClient controlServiceClient = ControlServiceClient.Create();
+ // Initialize request argument(s)
+ EngineName parent = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ Control control = new Control();
+ string controlId = "";
+ // Make the request
+ Control response = controlServiceClient.CreateControl(parent, control, controlId);
+ }
+ }
+ // [END discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened_resourceNames1]
+}
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames2AsyncSnippet.g.cs
similarity index 93%
rename from apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNamesAsyncSnippet.g.cs
rename to apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames2AsyncSnippet.g.cs
index ec583d9b925a..cf7b973d424c 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNamesAsyncSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames2AsyncSnippet.g.cs
@@ -16,7 +16,7 @@
namespace GoogleCSharpSnippets
{
- // [START discoveryengine_v1_generated_ControlService_CreateControl_async_flattened_resourceNames]
+ // [START discoveryengine_v1_generated_ControlService_CreateControl_async_flattened_resourceNames2]
using Google.Cloud.DiscoveryEngine.V1;
using System.Threading.Tasks;
@@ -30,7 +30,7 @@ public sealed partial class GeneratedControlServiceClientSnippets
/// - 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 CreateControlResourceNamesAsync()
+ public async Task CreateControlResourceNames2Async()
{
// Create client
ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
@@ -42,5 +42,5 @@ public async Task CreateControlResourceNamesAsync()
Control response = await controlServiceClient.CreateControlAsync(parent, control, controlId);
}
}
- // [END discoveryengine_v1_generated_ControlService_CreateControl_async_flattened_resourceNames]
+ // [END discoveryengine_v1_generated_ControlService_CreateControl_async_flattened_resourceNames2]
}
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNamesSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames2Snippet.g.cs
similarity index 93%
rename from apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNamesSnippet.g.cs
rename to apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames2Snippet.g.cs
index 7a73b3f93e9a..43ce299d0a92 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNamesSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlResourceNames2Snippet.g.cs
@@ -16,7 +16,7 @@
namespace GoogleCSharpSnippets
{
- // [START discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened_resourceNames]
+ // [START discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened_resourceNames2]
using Google.Cloud.DiscoveryEngine.V1;
public sealed partial class GeneratedControlServiceClientSnippets
@@ -29,7 +29,7 @@ public sealed partial class GeneratedControlServiceClientSnippets
/// - 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 CreateControlResourceNames()
+ public void CreateControlResourceNames2()
{
// Create client
ControlServiceClient controlServiceClient = ControlServiceClient.Create();
@@ -41,5 +41,5 @@ public void CreateControlResourceNames()
Control response = controlServiceClient.CreateControl(parent, control, controlId);
}
}
- // [END discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened_resourceNames]
+ // [END discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened_resourceNames2]
}
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlSnippet.g.cs
index c9d354857e63..a2cc29b09037 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.CreateControlSnippet.g.cs
@@ -34,7 +34,7 @@ public void CreateControl()
// Create client
ControlServiceClient controlServiceClient = ControlServiceClient.Create();
// Initialize request argument(s)
- string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
+ string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/engines/[ENGINE]";
Control control = new Control();
string controlId = "";
// Make the request
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsAsyncSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsAsyncSnippet.g.cs
index db0a9911a19e..114a75fb82c9 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsAsyncSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsAsyncSnippet.g.cs
@@ -38,7 +38,7 @@ public async Task ListControlsAsync()
// Create client
ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
// Initialize request argument(s)
- string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
+ string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/engines/[ENGINE]";
// Make the request
PagedAsyncEnumerable response = controlServiceClient.ListControlsAsync(parent);
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsRequestObjectAsyncSnippet.g.cs
index 208f9ea91edb..9049da169f50 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsRequestObjectAsyncSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsRequestObjectAsyncSnippet.g.cs
@@ -40,7 +40,7 @@ public async Task ListControlsRequestObjectAsync()
// Initialize request argument(s)
ListControlsRequest request = new ListControlsRequest
{
- ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
+ ParentAsEngineName = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"),
Filter = "",
};
// Make the request
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsRequestObjectSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsRequestObjectSnippet.g.cs
index 79f1677e18c5..336b954e17b1 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsRequestObjectSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsRequestObjectSnippet.g.cs
@@ -38,7 +38,7 @@ public void ListControlsRequestObject()
// Initialize request argument(s)
ListControlsRequest request = new ListControlsRequest
{
- ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
+ ParentAsEngineName = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"),
Filter = "",
};
// Make the request
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames1AsyncSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames1AsyncSnippet.g.cs
new file mode 100644
index 000000000000..30edb1453ecc
--- /dev/null
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames1AsyncSnippet.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 discoveryengine_v1_generated_ControlService_ListControls_async_flattened_resourceNames1]
+ using Google.Api.Gax;
+ using Google.Cloud.DiscoveryEngine.V1;
+ using System;
+ using System.Linq;
+ using System.Threading.Tasks;
+
+ public sealed partial class GeneratedControlServiceClientSnippets
+ {
+ /// Snippet for ListControlsAsync
+ ///
+ /// 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 ListControlsResourceNames1Async()
+ {
+ // Create client
+ ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ EngineName parent = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ // Make the request
+ PagedAsyncEnumerable response = controlServiceClient.ListControlsAsync(parent);
+
+ // Iterate over all response items, lazily performing RPCs as required
+ await response.ForEachAsync((Control 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((ListControlsResponse page) =>
+ {
+ // Do something with each page of items
+ Console.WriteLine("A page of results:");
+ foreach (Control 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 (Control 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 discoveryengine_v1_generated_ControlService_ListControls_async_flattened_resourceNames1]
+}
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames1Snippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames1Snippet.g.cs
new file mode 100644
index 000000000000..80b95627922c
--- /dev/null
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames1Snippet.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 discoveryengine_v1_generated_ControlService_ListControls_sync_flattened_resourceNames1]
+ using Google.Api.Gax;
+ using Google.Cloud.DiscoveryEngine.V1;
+ using System;
+
+ public sealed partial class GeneratedControlServiceClientSnippets
+ {
+ /// Snippet for ListControls
+ ///
+ /// 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 ListControlsResourceNames1()
+ {
+ // Create client
+ ControlServiceClient controlServiceClient = ControlServiceClient.Create();
+ // Initialize request argument(s)
+ EngineName parent = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ // Make the request
+ PagedEnumerable response = controlServiceClient.ListControls(parent);
+
+ // Iterate over all response items, lazily performing RPCs as required
+ foreach (Control 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 (ListControlsResponse page in response.AsRawResponses())
+ {
+ // Do something with each page of items
+ Console.WriteLine("A page of results:");
+ foreach (Control 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 (Control 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 discoveryengine_v1_generated_ControlService_ListControls_sync_flattened_resourceNames1]
+}
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames2AsyncSnippet.g.cs
similarity index 96%
rename from apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNamesAsyncSnippet.g.cs
rename to apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames2AsyncSnippet.g.cs
index 1836de204dbc..b722f9d6d76a 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNamesAsyncSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames2AsyncSnippet.g.cs
@@ -16,7 +16,7 @@
namespace GoogleCSharpSnippets
{
- // [START discoveryengine_v1_generated_ControlService_ListControls_async_flattened_resourceNames]
+ // [START discoveryengine_v1_generated_ControlService_ListControls_async_flattened_resourceNames2]
using Google.Api.Gax;
using Google.Cloud.DiscoveryEngine.V1;
using System;
@@ -33,7 +33,7 @@ public sealed partial class GeneratedControlServiceClientSnippets
/// - 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 ListControlsResourceNamesAsync()
+ public async Task ListControlsResourceNames2Async()
{
// Create client
ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
@@ -75,5 +75,5 @@ await response.AsRawResponses().ForEachAsync((ListControlsResponse page) =>
string nextPageToken = singlePage.NextPageToken;
}
}
- // [END discoveryengine_v1_generated_ControlService_ListControls_async_flattened_resourceNames]
+ // [END discoveryengine_v1_generated_ControlService_ListControls_async_flattened_resourceNames2]
}
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNamesSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames2Snippet.g.cs
similarity index 96%
rename from apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNamesSnippet.g.cs
rename to apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames2Snippet.g.cs
index d199804c1bbb..24c5188fe73f 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNamesSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsResourceNames2Snippet.g.cs
@@ -16,7 +16,7 @@
namespace GoogleCSharpSnippets
{
- // [START discoveryengine_v1_generated_ControlService_ListControls_sync_flattened_resourceNames]
+ // [START discoveryengine_v1_generated_ControlService_ListControls_sync_flattened_resourceNames2]
using Google.Api.Gax;
using Google.Cloud.DiscoveryEngine.V1;
using System;
@@ -31,7 +31,7 @@ public sealed partial class GeneratedControlServiceClientSnippets
/// - 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 ListControlsResourceNames()
+ public void ListControlsResourceNames2()
{
// Create client
ControlServiceClient controlServiceClient = ControlServiceClient.Create();
@@ -73,5 +73,5 @@ public void ListControlsResourceNames()
string nextPageToken = singlePage.NextPageToken;
}
}
- // [END discoveryengine_v1_generated_ControlService_ListControls_sync_flattened_resourceNames]
+ // [END discoveryengine_v1_generated_ControlService_ListControls_sync_flattened_resourceNames2]
}
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsSnippet.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsSnippet.g.cs
index 75ff4816fed8..0cc177a8d14f 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsSnippet.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/ControlServiceClient.ListControlsSnippet.g.cs
@@ -36,7 +36,7 @@ public void ListControls()
// Create client
ControlServiceClient controlServiceClient = ControlServiceClient.Create();
// Initialize request argument(s)
- string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
+ string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/engines/[ENGINE]";
// Make the request
PagedEnumerable response = controlServiceClient.ListControls(parent);
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/snippet_metadata_google.cloud.discoveryengine.v1.json b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/snippet_metadata_google.cloud.discoveryengine.v1.json
index f8b6bc6f49f1..b3f66e071303 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/snippet_metadata_google.cloud.discoveryengine.v1.json
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.GeneratedSnippets/snippet_metadata_google.cloud.discoveryengine.v1.json
@@ -510,10 +510,121 @@
]
},
{
- "regionTag": "discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened_resourceNames",
- "title": "CreateControlResourceNames",
+ "regionTag": "discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened_resourceNames1",
+ "title": "CreateControlResourceNames1",
"description": "Snippet for CreateControl",
- "file": "ControlServiceClient.CreateControlResourceNamesSnippet.g.cs",
+ "file": "ControlServiceClient.CreateControlResourceNames1Snippet.g.cs",
+ "language": "C_SHARP",
+ "clientMethod": {
+ "shortName": "CreateControl",
+ "fullName": "Google.Cloud.DiscoveryEngine.V1.ControlServiceClient.CreateControl",
+ "parameters": [
+ {
+ "type": "Google.Cloud.DiscoveryEngine.V1.EngineName",
+ "name": "parent"
+ },
+ {
+ "type": "Google.Cloud.DiscoveryEngine.V1.Control",
+ "name": "control"
+ },
+ {
+ "type": "System.String",
+ "name": "controlId"
+ },
+ {
+ "type": "Google.Api.Gax.Grpc.CallSettings",
+ "name": "callSettings"
+ }
+ ],
+ "resultType": "Google.Cloud.DiscoveryEngine.V1.Control",
+ "client": {
+ "shortName": "ControlServiceClient",
+ "fullName": "Google.Cloud.DiscoveryEngine.V1.ControlServiceClient"
+ },
+ "method": {
+ "shortName": "CreateControl",
+ "fullName": "google.cloud.discoveryengine.v1.ControlService.CreateControl",
+ "service": {
+ "shortName": "ControlService",
+ "fullName": "google.cloud.discoveryengine.v1.ControlService"
+ }
+ }
+ },
+ "origin": "API_DEFINITION",
+ "segments": [
+ {
+ "start": 20,
+ "end": 43,
+ "type": "FULL"
+ },
+ {
+ "start": 34,
+ "end": 41,
+ "type": "SHORT"
+ }
+ ]
+ },
+ {
+ "regionTag": "discoveryengine_v1_generated_ControlService_CreateControl_async_flattened_resourceNames1",
+ "title": "CreateControlResourceNames1Async",
+ "description": "Snippet for CreateControlAsync",
+ "file": "ControlServiceClient.CreateControlResourceNames1AsyncSnippet.g.cs",
+ "language": "C_SHARP",
+ "clientMethod": {
+ "shortName": "CreateControlAsync",
+ "fullName": "Google.Cloud.DiscoveryEngine.V1.ControlServiceClient.CreateControlAsync",
+ "async": true,
+ "parameters": [
+ {
+ "type": "Google.Cloud.DiscoveryEngine.V1.EngineName",
+ "name": "parent"
+ },
+ {
+ "type": "Google.Cloud.DiscoveryEngine.V1.Control",
+ "name": "control"
+ },
+ {
+ "type": "System.String",
+ "name": "controlId"
+ },
+ {
+ "type": "Google.Api.Gax.Grpc.CallSettings",
+ "name": "callSettings"
+ }
+ ],
+ "resultType": "System.Threading.Tasks.Task",
+ "client": {
+ "shortName": "ControlServiceClient",
+ "fullName": "Google.Cloud.DiscoveryEngine.V1.ControlServiceClient"
+ },
+ "method": {
+ "shortName": "CreateControl",
+ "fullName": "google.cloud.discoveryengine.v1.ControlService.CreateControl",
+ "service": {
+ "shortName": "ControlService",
+ "fullName": "google.cloud.discoveryengine.v1.ControlService"
+ }
+ }
+ },
+ "origin": "API_DEFINITION",
+ "segments": [
+ {
+ "start": 20,
+ "end": 44,
+ "type": "FULL"
+ },
+ {
+ "start": 35,
+ "end": 42,
+ "type": "SHORT"
+ }
+ ]
+ },
+ {
+ "regionTag": "discoveryengine_v1_generated_ControlService_CreateControl_sync_flattened_resourceNames2",
+ "title": "CreateControlResourceNames2",
+ "description": "Snippet for CreateControl",
+ "file": "ControlServiceClient.CreateControlResourceNames2Snippet.g.cs",
"language": "C_SHARP",
"clientMethod": {
"shortName": "CreateControl",
@@ -565,10 +676,10 @@
]
},
{
- "regionTag": "discoveryengine_v1_generated_ControlService_CreateControl_async_flattened_resourceNames",
- "title": "CreateControlResourceNamesAsync",
+ "regionTag": "discoveryengine_v1_generated_ControlService_CreateControl_async_flattened_resourceNames2",
+ "title": "CreateControlResourceNames2Async",
"description": "Snippet for CreateControlAsync",
- "file": "ControlServiceClient.CreateControlResourceNamesAsyncSnippet.g.cs",
+ "file": "ControlServiceClient.CreateControlResourceNames2AsyncSnippet.g.cs",
"language": "C_SHARP",
"clientMethod": {
"shortName": "CreateControlAsync",
@@ -1600,10 +1711,121 @@
]
},
{
- "regionTag": "discoveryengine_v1_generated_ControlService_ListControls_sync_flattened_resourceNames",
- "title": "ListControlsResourceNames",
+ "regionTag": "discoveryengine_v1_generated_ControlService_ListControls_sync_flattened_resourceNames1",
+ "title": "ListControlsResourceNames1",
+ "description": "Snippet for ListControls",
+ "file": "ControlServiceClient.ListControlsResourceNames1Snippet.g.cs",
+ "language": "C_SHARP",
+ "clientMethod": {
+ "shortName": "ListControls",
+ "fullName": "Google.Cloud.DiscoveryEngine.V1.ControlServiceClient.ListControls",
+ "parameters": [
+ {
+ "type": "Google.Cloud.DiscoveryEngine.V1.EngineName",
+ "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": "ControlServiceClient",
+ "fullName": "Google.Cloud.DiscoveryEngine.V1.ControlServiceClient"
+ },
+ "method": {
+ "shortName": "ListControls",
+ "fullName": "google.cloud.discoveryengine.v1.ControlService.ListControls",
+ "service": {
+ "shortName": "ControlService",
+ "fullName": "google.cloud.discoveryengine.v1.ControlService"
+ }
+ }
+ },
+ "origin": "API_DEFINITION",
+ "segments": [
+ {
+ "start": 20,
+ "end": 75,
+ "type": "FULL"
+ },
+ {
+ "start": 36,
+ "end": 73,
+ "type": "SHORT"
+ }
+ ]
+ },
+ {
+ "regionTag": "discoveryengine_v1_generated_ControlService_ListControls_async_flattened_resourceNames1",
+ "title": "ListControlsResourceNames1Async",
+ "description": "Snippet for ListControlsAsync",
+ "file": "ControlServiceClient.ListControlsResourceNames1AsyncSnippet.g.cs",
+ "language": "C_SHARP",
+ "clientMethod": {
+ "shortName": "ListControlsAsync",
+ "fullName": "Google.Cloud.DiscoveryEngine.V1.ControlServiceClient.ListControlsAsync",
+ "async": true,
+ "parameters": [
+ {
+ "type": "Google.Cloud.DiscoveryEngine.V1.EngineName",
+ "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": "ControlServiceClient",
+ "fullName": "Google.Cloud.DiscoveryEngine.V1.ControlServiceClient"
+ },
+ "method": {
+ "shortName": "ListControls",
+ "fullName": "google.cloud.discoveryengine.v1.ControlService.ListControls",
+ "service": {
+ "shortName": "ControlService",
+ "fullName": "google.cloud.discoveryengine.v1.ControlService"
+ }
+ }
+ },
+ "origin": "API_DEFINITION",
+ "segments": [
+ {
+ "start": 20,
+ "end": 77,
+ "type": "FULL"
+ },
+ {
+ "start": 38,
+ "end": 75,
+ "type": "SHORT"
+ }
+ ]
+ },
+ {
+ "regionTag": "discoveryengine_v1_generated_ControlService_ListControls_sync_flattened_resourceNames2",
+ "title": "ListControlsResourceNames2",
"description": "Snippet for ListControls",
- "file": "ControlServiceClient.ListControlsResourceNamesSnippet.g.cs",
+ "file": "ControlServiceClient.ListControlsResourceNames2Snippet.g.cs",
"language": "C_SHARP",
"clientMethod": {
"shortName": "ListControls",
@@ -1655,10 +1877,10 @@
]
},
{
- "regionTag": "discoveryengine_v1_generated_ControlService_ListControls_async_flattened_resourceNames",
- "title": "ListControlsResourceNamesAsync",
+ "regionTag": "discoveryengine_v1_generated_ControlService_ListControls_async_flattened_resourceNames2",
+ "title": "ListControlsResourceNames2Async",
"description": "Snippet for ListControlsAsync",
- "file": "ControlServiceClient.ListControlsResourceNamesAsyncSnippet.g.cs",
+ "file": "ControlServiceClient.ListControlsResourceNames2AsyncSnippet.g.cs",
"language": "C_SHARP",
"clientMethod": {
"shortName": "ListControlsAsync",
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.Snippets/ControlServiceClientSnippets.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.Snippets/ControlServiceClientSnippets.g.cs
index a6bce72d875d..45362288074f 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.Snippets/ControlServiceClientSnippets.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1.Snippets/ControlServiceClientSnippets.g.cs
@@ -35,7 +35,7 @@ public void CreateControlRequestObject()
// Initialize request argument(s)
CreateControlRequest request = new CreateControlRequest
{
- ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
+ ParentAsEngineName = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"),
Control = new Control(),
ControlId = "",
};
@@ -54,7 +54,7 @@ public async Task CreateControlRequestObjectAsync()
// Initialize request argument(s)
CreateControlRequest request = new CreateControlRequest
{
- ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
+ ParentAsEngineName = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"),
Control = new Control(),
ControlId = "",
};
@@ -70,7 +70,7 @@ public void CreateControl()
// Create client
ControlServiceClient controlServiceClient = ControlServiceClient.Create();
// Initialize request argument(s)
- string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
+ string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/engines/[ENGINE]";
Control control = new Control();
string controlId = "";
// Make the request
@@ -86,7 +86,7 @@ public async Task CreateControlAsync()
// Create client
ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
// Initialize request argument(s)
- string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
+ string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/engines/[ENGINE]";
Control control = new Control();
string controlId = "";
// Make the request
@@ -95,7 +95,38 @@ public async Task CreateControlAsync()
}
/// Snippet for CreateControl
- public void CreateControlResourceNames()
+ public void CreateControlResourceNames1()
+ {
+ // Snippet: CreateControl(EngineName, Control, string, CallSettings)
+ // Create client
+ ControlServiceClient controlServiceClient = ControlServiceClient.Create();
+ // Initialize request argument(s)
+ EngineName parent = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ Control control = new Control();
+ string controlId = "";
+ // Make the request
+ Control response = controlServiceClient.CreateControl(parent, control, controlId);
+ // End snippet
+ }
+
+ /// Snippet for CreateControlAsync
+ public async Task CreateControlResourceNames1Async()
+ {
+ // Snippet: CreateControlAsync(EngineName, Control, string, CallSettings)
+ // Additional: CreateControlAsync(EngineName, Control, string, CancellationToken)
+ // Create client
+ ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ EngineName parent = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ Control control = new Control();
+ string controlId = "";
+ // Make the request
+ Control response = await controlServiceClient.CreateControlAsync(parent, control, controlId);
+ // End snippet
+ }
+
+ /// Snippet for CreateControl
+ public void CreateControlResourceNames2()
{
// Snippet: CreateControl(DataStoreName, Control, string, CallSettings)
// Create client
@@ -110,7 +141,7 @@ public void CreateControlResourceNames()
}
/// Snippet for CreateControlAsync
- public async Task CreateControlResourceNamesAsync()
+ public async Task CreateControlResourceNames2Async()
{
// Snippet: CreateControlAsync(DataStoreName, Control, string, CallSettings)
// Additional: CreateControlAsync(DataStoreName, Control, string, CancellationToken)
@@ -372,7 +403,7 @@ public void ListControlsRequestObject()
// Initialize request argument(s)
ListControlsRequest request = new ListControlsRequest
{
- ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
+ ParentAsEngineName = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"),
Filter = "",
};
// Make the request
@@ -421,7 +452,7 @@ public async Task ListControlsRequestObjectAsync()
// Initialize request argument(s)
ListControlsRequest request = new ListControlsRequest
{
- ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
+ ParentAsEngineName = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"),
Filter = "",
};
// Make the request
@@ -468,7 +499,7 @@ public void ListControls()
// Create client
ControlServiceClient controlServiceClient = ControlServiceClient.Create();
// Initialize request argument(s)
- string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
+ string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/engines/[ENGINE]";
// Make the request
PagedEnumerable response = controlServiceClient.ListControls(parent);
@@ -513,7 +544,97 @@ public async Task ListControlsAsync()
// Create client
ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
// Initialize request argument(s)
- string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
+ string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/engines/[ENGINE]";
+ // Make the request
+ PagedAsyncEnumerable response = controlServiceClient.ListControlsAsync(parent);
+
+ // Iterate over all response items, lazily performing RPCs as required
+ await response.ForEachAsync((Control 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((ListControlsResponse page) =>
+ {
+ // Do something with each page of items
+ Console.WriteLine("A page of results:");
+ foreach (Control 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 (Control 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 ListControls
+ public void ListControlsResourceNames1()
+ {
+ // Snippet: ListControls(EngineName, string, int?, CallSettings)
+ // Create client
+ ControlServiceClient controlServiceClient = ControlServiceClient.Create();
+ // Initialize request argument(s)
+ EngineName parent = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ // Make the request
+ PagedEnumerable response = controlServiceClient.ListControls(parent);
+
+ // Iterate over all response items, lazily performing RPCs as required
+ foreach (Control 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 (ListControlsResponse page in response.AsRawResponses())
+ {
+ // Do something with each page of items
+ Console.WriteLine("A page of results:");
+ foreach (Control 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 (Control 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 ListControlsAsync
+ public async Task ListControlsResourceNames1Async()
+ {
+ // Snippet: ListControlsAsync(EngineName, string, int?, CallSettings)
+ // Create client
+ ControlServiceClient controlServiceClient = await ControlServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ EngineName parent = EngineName.FromProjectLocationCollectionEngine("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
// Make the request
PagedAsyncEnumerable response = controlServiceClient.ListControlsAsync(parent);
@@ -552,7 +673,7 @@ await response.AsRawResponses().ForEachAsync((ListControlsResponse page) =>
}
/// Snippet for ListControls
- public void ListControlsResourceNames()
+ public void ListControlsResourceNames2()
{
// Snippet: ListControls(DataStoreName, string, int?, CallSettings)
// Create client
@@ -597,7 +718,7 @@ public void ListControlsResourceNames()
}
/// Snippet for ListControlsAsync
- public async Task ListControlsResourceNamesAsync()
+ public async Task ListControlsResourceNames2Async()
{
// Snippet: ListControlsAsync(DataStoreName, string, int?, CallSettings)
// Create client
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlService.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlService.g.cs
index e43def27b93c..0864259fe8ab 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlService.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlService.g.cs
@@ -30,73 +30,72 @@ static ControlServiceReflection() {
"bnQucHJvdG8aH2dvb2dsZS9hcGkvZmllbGRfYmVoYXZpb3IucHJvdG8aGWdv",
"b2dsZS9hcGkvcmVzb3VyY2UucHJvdG8aLWdvb2dsZS9jbG91ZC9kaXNjb3Zl",
"cnllbmd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OjpEaXNjb3ZlcnlFbmdpbmU6OlYxYgZwcm90bzM="));
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.DiscoveryEngine.V1.ControlReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
@@ -168,6 +167,8 @@ public CreateControlRequest Clone() {
///
/// Required. Full resource name of parent data store. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
@@ -1114,6 +1115,8 @@ public ListControlsRequest Clone() {
///
/// Required. The data store resource name. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlServiceClient.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlServiceClient.g.cs
index bbc3f1dea6d7..61163773b736 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlServiceClient.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlServiceClient.g.cs
@@ -353,6 +353,8 @@ public virtual Control CreateControl(CreateControlRequest request, gaxgrpc::Call
///
/// Required. Full resource name of parent data store. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
///
/// Required. The Control to create.
@@ -385,6 +387,8 @@ public virtual Control CreateControl(string parent, Control control, string cont
///
/// Required. Full resource name of parent data store. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
///
/// Required. The Control to create.
@@ -417,6 +421,8 @@ public virtual Control CreateControl(string parent, Control control, string cont
///
/// Required. Full resource name of parent data store. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
///
/// Required. The Control to create.
@@ -444,6 +450,105 @@ public virtual Control CreateControl(string parent, Control control, string cont
///
/// Required. Full resource name of parent data store. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
+ ///
+ ///
+ /// Required. The Control to create.
+ ///
+ ///
+ /// Required. The ID to use for the Control, which will become the final
+ /// component of the Control's resource name.
+ ///
+ /// This value must be within 1-63 characters.
+ /// Valid characters are /[a-z][0-9]-_/.
+ ///
+ /// If not null, applies overrides to this RPC call.
+ /// The RPC response.
+ public virtual Control CreateControl(EngineName parent, Control control, string controlId, gaxgrpc::CallSettings callSettings = null) =>
+ CreateControl(new CreateControlRequest
+ {
+ ParentAsEngineName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)),
+ Control = gax::GaxPreconditions.CheckNotNull(control, nameof(control)),
+ ControlId = gax::GaxPreconditions.CheckNotNullOrEmpty(controlId, nameof(controlId)),
+ }, callSettings);
+
+ ///
+ /// Creates a Control.
+ ///
+ /// By default 1000 controls are allowed for a data store.
+ /// A request can be submitted to adjust this limit.
+ /// If the [Control][google.cloud.discoveryengine.v1.Control] to create already
+ /// exists, an ALREADY_EXISTS error is returned.
+ ///
+ ///
+ /// Required. Full resource name of parent data store. Format:
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
+ ///
+ ///
+ /// Required. The Control to create.
+ ///
+ ///
+ /// Required. The ID to use for the Control, which will become the final
+ /// component of the Control's resource name.
+ ///
+ /// This value must be within 1-63 characters.
+ /// Valid characters are /[a-z][0-9]-_/.
+ ///
+ /// If not null, applies overrides to this RPC call.
+ /// A Task containing the RPC response.
+ public virtual stt::Task CreateControlAsync(EngineName parent, Control control, string controlId, gaxgrpc::CallSettings callSettings = null) =>
+ CreateControlAsync(new CreateControlRequest
+ {
+ ParentAsEngineName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)),
+ Control = gax::GaxPreconditions.CheckNotNull(control, nameof(control)),
+ ControlId = gax::GaxPreconditions.CheckNotNullOrEmpty(controlId, nameof(controlId)),
+ }, callSettings);
+
+ ///
+ /// Creates a Control.
+ ///
+ /// By default 1000 controls are allowed for a data store.
+ /// A request can be submitted to adjust this limit.
+ /// If the [Control][google.cloud.discoveryengine.v1.Control] to create already
+ /// exists, an ALREADY_EXISTS error is returned.
+ ///
+ ///
+ /// Required. Full resource name of parent data store. Format:
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
+ ///
+ ///
+ /// Required. The Control to create.
+ ///
+ ///
+ /// Required. The ID to use for the Control, which will become the final
+ /// component of the Control's resource name.
+ ///
+ /// This value must be within 1-63 characters.
+ /// Valid characters are /[a-z][0-9]-_/.
+ ///
+ /// A to use for this RPC.
+ /// A Task containing the RPC response.
+ public virtual stt::Task CreateControlAsync(EngineName parent, Control control, string controlId, st::CancellationToken cancellationToken) =>
+ CreateControlAsync(parent, control, controlId, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Creates a Control.
+ ///
+ /// By default 1000 controls are allowed for a data store.
+ /// A request can be submitted to adjust this limit.
+ /// If the [Control][google.cloud.discoveryengine.v1.Control] to create already
+ /// exists, an ALREADY_EXISTS error is returned.
+ ///
+ ///
+ /// Required. Full resource name of parent data store. Format:
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
///
/// Required. The Control to create.
@@ -476,6 +581,8 @@ public virtual Control CreateControl(DataStoreName parent, Control control, stri
///
/// Required. Full resource name of parent data store. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
///
/// Required. The Control to create.
@@ -508,6 +615,8 @@ public virtual Control CreateControl(DataStoreName parent, Control control, stri
///
/// Required. Full resource name of parent data store. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
///
/// Required. The Control to create.
@@ -922,6 +1031,8 @@ public virtual Control GetControl(ControlName name, gaxgrpc::CallSettings callSe
///
/// Required. The data store resource name. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
///
/// The token returned from the previous request. A value of null or an empty string retrieves the first
@@ -948,6 +1059,8 @@ public virtual Control GetControl(ControlName name, gaxgrpc::CallSettings callSe
///
/// Required. The data store resource name. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
///
/// The token returned from the previous request. A value of null or an empty string retrieves the first
@@ -974,6 +1087,64 @@ public virtual Control GetControl(ControlName name, gaxgrpc::CallSettings callSe
///
/// Required. The data store resource name. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
+ ///
+ ///
+ /// 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 ListControls(EngineName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
+ ListControls(new ListControlsRequest
+ {
+ ParentAsEngineName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)),
+ PageToken = pageToken ?? "",
+ PageSize = pageSize ?? 0,
+ }, callSettings);
+
+ ///
+ /// Lists all Controls by their parent
+ /// [DataStore][google.cloud.discoveryengine.v1.DataStore].
+ ///
+ ///
+ /// Required. The data store resource name. Format:
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
+ ///
+ ///
+ /// 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 ListControlsAsync(EngineName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
+ ListControlsAsync(new ListControlsRequest
+ {
+ ParentAsEngineName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)),
+ PageToken = pageToken ?? "",
+ PageSize = pageSize ?? 0,
+ }, callSettings);
+
+ ///
+ /// Lists all Controls by their parent
+ /// [DataStore][google.cloud.discoveryengine.v1.DataStore].
+ ///
+ ///
+ /// Required. The data store resource name. Format:
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
///
/// The token returned from the previous request. A value of null or an empty string retrieves the first
@@ -1000,6 +1171,8 @@ public virtual Control GetControl(ControlName name, gaxgrpc::CallSettings callSe
///
/// Required. The data store resource name. Format:
/// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
+ /// or
+ /// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
///
///
/// The token returned from the previous request. A value of null or an empty string retrieves the first
diff --git a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlServiceResourceNames.g.cs b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlServiceResourceNames.g.cs
index b91ba996c8b0..4d659a4ec2b8 100644
--- a/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlServiceResourceNames.g.cs
+++ b/apis/Google.Cloud.DiscoveryEngine.V1/Google.Cloud.DiscoveryEngine.V1/ControlServiceResourceNames.g.cs
@@ -15,12 +15,20 @@
// Generated code. DO NOT EDIT!
#pragma warning disable CS8981
+using gax = Google.Api.Gax;
using gcdv = Google.Cloud.DiscoveryEngine.V1;
namespace Google.Cloud.DiscoveryEngine.V1
{
public partial class CreateControlRequest
{
+ /// -typed view over the resource name property.
+ public EngineName ParentAsEngineName
+ {
+ get => string.IsNullOrEmpty(Parent) ? null : EngineName.Parse(Parent, allowUnparsed: true);
+ set => Parent = value?.ToString() ?? "";
+ }
+
///
/// -typed view over the resource name property.
///
@@ -29,6 +37,30 @@ public DataStoreName ParentAsDataStoreName
get => string.IsNullOrEmpty(Parent) ? null : DataStoreName.Parse(Parent, allowUnparsed: true);
set => Parent = value?.ToString() ?? "";
}
+
+ ///
+ /// -typed view over the resource name property.
+ ///
+ public gax::IResourceName ParentAsResourceName
+ {
+ get
+ {
+ if (string.IsNullOrEmpty(Parent))
+ {
+ return null;
+ }
+ if (EngineName.TryParse(Parent, out EngineName engine))
+ {
+ return engine;
+ }
+ if (DataStoreName.TryParse(Parent, out DataStoreName dataStore))
+ {
+ return dataStore;
+ }
+ return gax::UnparsedResourceName.Parse(Parent);
+ }
+ set => Parent = value?.ToString() ?? "";
+ }
}
public partial class DeleteControlRequest
@@ -57,6 +89,13 @@ public partial class GetControlRequest
public partial class ListControlsRequest
{
+ /// -typed view over the resource name property.
+ public EngineName ParentAsEngineName
+ {
+ get => string.IsNullOrEmpty(Parent) ? null : EngineName.Parse(Parent, allowUnparsed: true);
+ set => Parent = value?.ToString() ?? "";
+ }
+
///
/// -typed view over the resource name property.
///
@@ -65,5 +104,29 @@ public DataStoreName ParentAsDataStoreName
get => string.IsNullOrEmpty(Parent) ? null : DataStoreName.Parse(Parent, allowUnparsed: true);
set => Parent = value?.ToString() ?? "";
}
+
+ ///
+ /// -typed view over the resource name property.
+ ///
+ public gax::IResourceName ParentAsResourceName
+ {
+ get
+ {
+ if (string.IsNullOrEmpty(Parent))
+ {
+ return null;
+ }
+ if (EngineName.TryParse(Parent, out EngineName engine))
+ {
+ return engine;
+ }
+ if (DataStoreName.TryParse(Parent, out DataStoreName dataStore))
+ {
+ return dataStore;
+ }
+ return gax::UnparsedResourceName.Parse(Parent);
+ }
+ set => Parent = value?.ToString() ?? "";
+ }
}
}