/// <summary>Snippet for RawPredictAsync</summary> public async Task RawPredictAsync() { // Snippet: RawPredictAsync(string, HttpBody, CallSettings) // Additional: RawPredictAsync(string, HttpBody, CancellationToken) // Create client PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync(); // Initialize request argument(s) string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]"; HttpBody httpBody = new HttpBody(); // Make the request HttpBody response = await predictionServiceClient.RawPredictAsync(endpoint, httpBody); // End snippet }
/// <summary>Snippet for RawPredictAsync</summary> public async Task RawPredictResourceNamesAsync() { // Snippet: RawPredictAsync(EndpointName, HttpBody, CallSettings) // Additional: RawPredictAsync(EndpointName, HttpBody, CancellationToken) // Create client PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync(); // Initialize request argument(s) EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); HttpBody httpBody = new HttpBody(); // Make the request HttpBody response = await predictionServiceClient.RawPredictAsync(endpoint, httpBody); // End snippet }
/// <summary>Snippet for RawPredictAsync</summary> public async Task RawPredictRequestObjectAsync() { // Snippet: RawPredictAsync(RawPredictRequest, CallSettings) // Additional: RawPredictAsync(RawPredictRequest, CancellationToken) // Create client PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync(); // Initialize request argument(s) RawPredictRequest request = new RawPredictRequest { EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"), HttpBody = new HttpBody(), }; // Make the request HttpBody response = await predictionServiceClient.RawPredictAsync(request); // End snippet }