Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright 2026 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 aiplatform_v1beta1_generated_ReasoningEngineExecutionService_AsyncQueryReasoningEngine_async]
using Google.Cloud.AIPlatform.V1Beta1;
using Google.LongRunning;
using System.Threading.Tasks;

public sealed partial class GeneratedReasoningEngineExecutionServiceClientSnippets
{
/// <summary>Snippet for AsyncQueryReasoningEngineAsync</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 AsyncQueryReasoningEngineRequestObjectAsync()
{
// Create client
ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient = await ReasoningEngineExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
AsyncQueryReasoningEngineRequest request = new AsyncQueryReasoningEngineRequest
{
ReasoningEngineName = ReasoningEngineName.FromProjectLocationReasoningEngine("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]"),
InputGcsUri = "",
OutputGcsUri = "",
};
// Make the request
Operation<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> response = await reasoningEngineExecutionServiceClient.AsyncQueryReasoningEngineAsync(request);

// Poll until the returned long-running operation is complete
Operation<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AsyncQueryReasoningEngineResponse 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<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> retrievedResponse = await reasoningEngineExecutionServiceClient.PollOnceAsyncQueryReasoningEngineAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AsyncQueryReasoningEngineResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END aiplatform_v1beta1_generated_ReasoningEngineExecutionService_AsyncQueryReasoningEngine_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright 2026 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 aiplatform_v1beta1_generated_ReasoningEngineExecutionService_AsyncQueryReasoningEngine_sync]
using Google.Cloud.AIPlatform.V1Beta1;
using Google.LongRunning;

public sealed partial class GeneratedReasoningEngineExecutionServiceClientSnippets
{
/// <summary>Snippet for AsyncQueryReasoningEngine</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 AsyncQueryReasoningEngineRequestObject()
{
// Create client
ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient = ReasoningEngineExecutionServiceClient.Create();
// Initialize request argument(s)
AsyncQueryReasoningEngineRequest request = new AsyncQueryReasoningEngineRequest
{
ReasoningEngineName = ReasoningEngineName.FromProjectLocationReasoningEngine("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]"),
InputGcsUri = "",
OutputGcsUri = "",
};
// Make the request
Operation<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> response = reasoningEngineExecutionServiceClient.AsyncQueryReasoningEngine(request);

// Poll until the returned long-running operation is complete
Operation<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AsyncQueryReasoningEngineResponse 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<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> retrievedResponse = reasoningEngineExecutionServiceClient.PollOnceAsyncQueryReasoningEngine(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AsyncQueryReasoningEngineResponse retrievedResult = retrievedResponse.Result;
}
}
}
// [END aiplatform_v1beta1_generated_ReasoningEngineExecutionService_AsyncQueryReasoningEngine_sync]
}
Original file line number Diff line number Diff line change
Expand Up @@ -85745,6 +85745,103 @@
}
]
},
{
"regionTag": "aiplatform_v1beta1_generated_ReasoningEngineExecutionService_AsyncQueryReasoningEngine_sync",
"title": "AsyncQueryReasoningEngineRequestObject",
"description": "Snippet for AsyncQueryReasoningEngine",
"file": "ReasoningEngineExecutionServiceClient.AsyncQueryReasoningEngineRequestObjectSnippet.g.cs",
"language": "C_SHARP",
"clientMethod": {
"shortName": "AsyncQueryReasoningEngine",
"fullName": "Google.Cloud.AIPlatform.V1Beta1.ReasoningEngineExecutionServiceClient.AsyncQueryReasoningEngine",
"parameters": [
{
"type": "Google.Cloud.AIPlatform.V1Beta1.AsyncQueryReasoningEngineRequest",
"name": "request"
},
{
"type": "Google.Api.Gax.Grpc.CallSettings",
"name": "callSettings"
}
],
"resultType": "Google.LongRunning.Operation<Google.Cloud.AIPlatform.V1Beta1.AsyncQueryReasoningEngineResponse, Google.Cloud.AIPlatform.V1Beta1.AsyncQueryReasoningEngineOperationMetadata>",
"client": {
"shortName": "ReasoningEngineExecutionServiceClient",
"fullName": "Google.Cloud.AIPlatform.V1Beta1.ReasoningEngineExecutionServiceClient"
},
"method": {
"shortName": "AsyncQueryReasoningEngine",
"fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService.AsyncQueryReasoningEngine",
"service": {
"shortName": "ReasoningEngineExecutionService",
"fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService"
}
}
},
"canonical": true,
"origin": "API_DEFINITION",
"segments": [
{
"start": 20,
"end": 63,
"type": "FULL"
},
{
"start": 35,
"end": 61,
"type": "SHORT"
}
]
},
{
"regionTag": "aiplatform_v1beta1_generated_ReasoningEngineExecutionService_AsyncQueryReasoningEngine_async",
"title": "AsyncQueryReasoningEngineRequestObjectAsync",
"description": "Snippet for AsyncQueryReasoningEngineAsync",
"file": "ReasoningEngineExecutionServiceClient.AsyncQueryReasoningEngineRequestObjectAsyncSnippet.g.cs",
"language": "C_SHARP",
"clientMethod": {
"shortName": "AsyncQueryReasoningEngineAsync",
"fullName": "Google.Cloud.AIPlatform.V1Beta1.ReasoningEngineExecutionServiceClient.AsyncQueryReasoningEngineAsync",
"async": true,
"parameters": [
{
"type": "Google.Cloud.AIPlatform.V1Beta1.AsyncQueryReasoningEngineRequest",
"name": "request"
},
{
"type": "Google.Api.Gax.Grpc.CallSettings",
"name": "callSettings"
}
],
"resultType": "System.Threading.Tasks.Task<Google.LongRunning.Operation<Google.Cloud.AIPlatform.V1Beta1.AsyncQueryReasoningEngineResponse, Google.Cloud.AIPlatform.V1Beta1.AsyncQueryReasoningEngineOperationMetadata>>",
"client": {
"shortName": "ReasoningEngineExecutionServiceClient",
"fullName": "Google.Cloud.AIPlatform.V1Beta1.ReasoningEngineExecutionServiceClient"
},
"method": {
"shortName": "AsyncQueryReasoningEngine",
"fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService.AsyncQueryReasoningEngine",
"service": {
"shortName": "ReasoningEngineExecutionService",
"fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService"
}
}
},
"canonical": true,
"origin": "API_DEFINITION",
"segments": [
{
"start": 20,
"end": 64,
"type": "FULL"
},
{
"start": 36,
"end": 62,
"type": "SHORT"
}
]
},
{
"regionTag": "aiplatform_v1beta1_generated_ReasoningEngineService_CreateReasoningEngine_sync",
"title": "CreateReasoningEngineRequestObject",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace GoogleCSharpSnippets
using Google.Api;
using Google.Api.Gax.Grpc;
using Google.Cloud.AIPlatform.V1Beta1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

Expand Down Expand Up @@ -89,5 +90,74 @@ public async Task StreamQueryReasoningEngineRequestObject()
// The response stream has completed
// End snippet
}

/// <summary>Snippet for AsyncQueryReasoningEngine</summary>
public void AsyncQueryReasoningEngineRequestObject()
{
// Snippet: AsyncQueryReasoningEngine(AsyncQueryReasoningEngineRequest, CallSettings)
// Create client
ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient = ReasoningEngineExecutionServiceClient.Create();
// Initialize request argument(s)
AsyncQueryReasoningEngineRequest request = new AsyncQueryReasoningEngineRequest
{
ReasoningEngineName = ReasoningEngineName.FromProjectLocationReasoningEngine("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]"),
InputGcsUri = "",
OutputGcsUri = "",
};
// Make the request
Operation<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> response = reasoningEngineExecutionServiceClient.AsyncQueryReasoningEngine(request);

// Poll until the returned long-running operation is complete
Operation<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AsyncQueryReasoningEngineResponse 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<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> retrievedResponse = reasoningEngineExecutionServiceClient.PollOnceAsyncQueryReasoningEngine(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AsyncQueryReasoningEngineResponse retrievedResult = retrievedResponse.Result;
}
// End snippet
}

/// <summary>Snippet for AsyncQueryReasoningEngineAsync</summary>
public async Task AsyncQueryReasoningEngineRequestObjectAsync()
{
// Snippet: AsyncQueryReasoningEngineAsync(AsyncQueryReasoningEngineRequest, CallSettings)
// Additional: AsyncQueryReasoningEngineAsync(AsyncQueryReasoningEngineRequest, CancellationToken)
// Create client
ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient = await ReasoningEngineExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
AsyncQueryReasoningEngineRequest request = new AsyncQueryReasoningEngineRequest
{
ReasoningEngineName = ReasoningEngineName.FromProjectLocationReasoningEngine("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]"),
InputGcsUri = "",
OutputGcsUri = "",
};
// Make the request
Operation<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> response = await reasoningEngineExecutionServiceClient.AsyncQueryReasoningEngineAsync(request);

// Poll until the returned long-running operation is complete
Operation<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AsyncQueryReasoningEngineResponse 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<AsyncQueryReasoningEngineResponse, AsyncQueryReasoningEngineOperationMetadata> retrievedResponse = await reasoningEngineExecutionServiceClient.PollOnceAsyncQueryReasoningEngineAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AsyncQueryReasoningEngineResponse retrievedResult = retrievedResponse.Result;
}
// End snippet
}
}
}
Loading
Loading