Content-Length: 670990 | pFad | https://github.com/googleapis/google-cloud-dotnet/commit/7fa56aa6604cfeb78597c7799e3d9ea10a39e4a7

4E feat: add match service in aiplatform v1 · googleapis/google-cloud-dotnet@7fa56aa · GitHub
Skip to content

Commit 7fa56aa

Browse files
gcf-owl-bot[bot]Rishabh-V
authored andcommitted
feat: add match service in aiplatform v1
PiperOrigin-RevId: 533008702 Source-Link: googleapis/googleapis@2f00988 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3ccb5f69dee03f37c58d0f4c0f87b40936457e5c Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQUlQbGF0Zm9ybS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiM2NjYjVmNjlkZWUwM2YzN2M1OGQwZjRjMGY4N2I0MDkzNjQ1N2U1YyJ9
1 parent 7081baf commit 7fa56aa

13 files changed

+3207
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Copyright 2023 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START aiplatform_v1_generated_MatchService_FindNeighbors_async]
20+
using Google.Cloud.AIPlatform.V1;
21+
using System.Threading.Tasks;
22+
23+
public sealed partial class GeneratedMatchServiceClientSnippets
24+
{
25+
//github.com/ <summary>Snippet for FindNeighborsAsync</summary>
26+
//github.com/ <remarks>
27+
//github.com/ This snippet has been automatically generated and should be regarded as a code template only.
28+
//github.com/ It will require modifications to work:
29+
//github.com/ - It may require correct/in-range values for request initialization.
30+
//github.com/ - It may require specifying regional endpoints when creating the service client as shown in
31+
//github.com/ https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
//github.com/ </remarks>
33+
public async Task FindNeighborsRequestObjectAsync()
34+
{
35+
// Create client
36+
MatchServiceClient matchServiceClient = await MatchServiceClient.CreateAsync();
37+
// Initialize request argument(s)
38+
FindNeighborsRequest request = new FindNeighborsRequest
39+
{
40+
IndexEndpointAsIndexEndpointName = IndexEndpointName.FromProjectLocationIndexEndpoint("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"),
41+
DeployedIndexId = "",
42+
Queries =
43+
{
44+
new FindNeighborsRequest.Types.Query(),
45+
},
46+
ReturnFullDatapoint = false,
47+
};
48+
// Make the request
49+
FindNeighborsResponse response = await matchServiceClient.FindNeighborsAsync(request);
50+
}
51+
}
52+
// [END aiplatform_v1_generated_MatchService_FindNeighbors_async]
53+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Copyright 2023 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START aiplatform_v1_generated_MatchService_FindNeighbors_sync]
20+
using Google.Cloud.AIPlatform.V1;
21+
22+
public sealed partial class GeneratedMatchServiceClientSnippets
23+
{
24+
//github.com/ <summary>Snippet for FindNeighbors</summary>
25+
//github.com/ <remarks>
26+
//github.com/ This snippet has been automatically generated and should be regarded as a code template only.
27+
//github.com/ It will require modifications to work:
28+
//github.com/ - It may require correct/in-range values for request initialization.
29+
//github.com/ - It may require specifying regional endpoints when creating the service client as shown in
30+
//github.com/ https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
31+
//github.com/ </remarks>
32+
public void FindNeighborsRequestObject()
33+
{
34+
// Create client
35+
MatchServiceClient matchServiceClient = MatchServiceClient.Create();
36+
// Initialize request argument(s)
37+
FindNeighborsRequest request = new FindNeighborsRequest
38+
{
39+
IndexEndpointAsIndexEndpointName = IndexEndpointName.FromProjectLocationIndexEndpoint("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"),
40+
DeployedIndexId = "",
41+
Queries =
42+
{
43+
new FindNeighborsRequest.Types.Query(),
44+
},
45+
ReturnFullDatapoint = false,
46+
};
47+
// Make the request
48+
FindNeighborsResponse response = matchServiceClient.FindNeighbors(request);
49+
}
50+
}
51+
// [END aiplatform_v1_generated_MatchService_FindNeighbors_sync]
52+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Copyright 2023 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START aiplatform_v1_generated_MatchService_ReadIndexDatapoints_async]
20+
using Google.Cloud.AIPlatform.V1;
21+
using System.Threading.Tasks;
22+
23+
public sealed partial class GeneratedMatchServiceClientSnippets
24+
{
25+
//github.com/ <summary>Snippet for ReadIndexDatapointsAsync</summary>
26+
//github.com/ <remarks>
27+
//github.com/ This snippet has been automatically generated and should be regarded as a code template only.
28+
//github.com/ It will require modifications to work:
29+
//github.com/ - It may require correct/in-range values for request initialization.
30+
//github.com/ - It may require specifying regional endpoints when creating the service client as shown in
31+
//github.com/ https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
//github.com/ </remarks>
33+
public async Task ReadIndexDatapointsRequestObjectAsync()
34+
{
35+
// Create client
36+
MatchServiceClient matchServiceClient = await MatchServiceClient.CreateAsync();
37+
// Initialize request argument(s)
38+
ReadIndexDatapointsRequest request = new ReadIndexDatapointsRequest
39+
{
40+
IndexEndpointAsIndexEndpointName = IndexEndpointName.FromProjectLocationIndexEndpoint("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"),
41+
DeployedIndexId = "",
42+
Ids = { "", },
43+
};
44+
// Make the request
45+
ReadIndexDatapointsResponse response = await matchServiceClient.ReadIndexDatapointsAsync(request);
46+
}
47+
}
48+
// [END aiplatform_v1_generated_MatchService_ReadIndexDatapoints_async]
49+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Copyright 2023 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START aiplatform_v1_generated_MatchService_ReadIndexDatapoints_sync]
20+
using Google.Cloud.AIPlatform.V1;
21+
22+
public sealed partial class GeneratedMatchServiceClientSnippets
23+
{
24+
//github.com/ <summary>Snippet for ReadIndexDatapoints</summary>
25+
//github.com/ <remarks>
26+
//github.com/ This snippet has been automatically generated and should be regarded as a code template only.
27+
//github.com/ It will require modifications to work:
28+
//github.com/ - It may require correct/in-range values for request initialization.
29+
//github.com/ - It may require specifying regional endpoints when creating the service client as shown in
30+
//github.com/ https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
31+
//github.com/ </remarks>
32+
public void ReadIndexDatapointsRequestObject()
33+
{
34+
// Create client
35+
MatchServiceClient matchServiceClient = MatchServiceClient.Create();
36+
// Initialize request argument(s)
37+
ReadIndexDatapointsRequest request = new ReadIndexDatapointsRequest
38+
{
39+
IndexEndpointAsIndexEndpointName = IndexEndpointName.FromProjectLocationIndexEndpoint("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"),
40+
DeployedIndexId = "",
41+
Ids = { "", },
42+
};
43+
// Make the request
44+
ReadIndexDatapointsResponse response = matchServiceClient.ReadIndexDatapoints(request);
45+
}
46+
}
47+
// [END aiplatform_v1_generated_MatchService_ReadIndexDatapoints_sync]
48+
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/google-cloud-dotnet/commit/7fa56aa6604cfeb78597c7799e3d9ea10a39e4a7

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy