/// <summary>Snippet for CreateDataset</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateDatasetResourceNames() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); Dataset dataset = new Dataset(); // Make the request Operation <Dataset, OperationMetadata> response = autoMlClient.CreateDataset(parent, dataset); // Poll until the returned long-running operation is complete Operation <Dataset, OperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result Dataset 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 <Dataset, OperationMetadata> retrievedResponse = autoMlClient.PollOnceCreateDataset(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Dataset retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for ExportData</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ExportDataResourceNames() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"); OutputConfig outputConfig = new OutputConfig(); // Make the request Operation <Empty, OperationMetadata> response = autoMlClient.ExportData(name, outputConfig); // Poll until the returned long-running operation is complete Operation <Empty, OperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result Empty 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 <Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceExportData(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Empty retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for ExportEvaluatedExamplesAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task ExportEvaluatedExamplesRequestObjectAsync() { // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) ExportEvaluatedExamplesRequest request = new ExportEvaluatedExamplesRequest { ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"), OutputConfig = new ExportEvaluatedExamplesOutputConfig(), }; // Make the request Operation <Empty, OperationMetadata> response = await autoMlClient.ExportEvaluatedExamplesAsync(request); // Poll until the returned long-running operation is complete Operation <Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result Empty 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 <Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportEvaluatedExamplesAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Empty retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for CreateDatasetAsync</summary> public async Task CreateDatasetRequestObjectAsync() { // Snippet: CreateDatasetAsync(CreateDatasetRequest, CallSettings) // Additional: CreateDatasetAsync(CreateDatasetRequest, CancellationToken) // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) CreateDatasetRequest request = new CreateDatasetRequest { Parent = "", Dataset = new Dataset(), }; // Make the request Operation <Dataset, OperationMetadata> response = await autoMlClient.CreateDatasetAsync(request); // Poll until the returned long-running operation is complete Operation <Dataset, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result Dataset 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 <Dataset, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateDatasetAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Dataset retrievedResult = retrievedResponse.Result; } // End snippet }
/// <summary>Snippet for CreateModelAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task CreateModelRequestObjectAsync() { // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) CreateModelRequest request = new CreateModelRequest { ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), Model = new Model(), }; // Make the request Operation <Model, OperationMetadata> response = await autoMlClient.CreateModelAsync(request); // Poll until the returned long-running operation is complete Operation <Model, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result Model 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 <Model, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateModelAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Model retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for ExportModelAsync</summary> public async Task ExportModelRequestObjectAsync() { // Snippet: ExportModelAsync(ExportModelRequest, CallSettings) // Additional: ExportModelAsync(ExportModelRequest, CancellationToken) // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) ExportModelRequest request = new ExportModelRequest { Name = "", OutputConfig = new ModelExportOutputConfig(), }; // Make the request Operation <Empty, OperationMetadata> response = await autoMlClient.ExportModelAsync(request); // Poll until the returned long-running operation is complete Operation <Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result Empty 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 <Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportModelAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Empty retrievedResult = retrievedResponse.Result; } // End snippet }
/// <summary>Snippet for ExportEvaluatedExamples</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ExportEvaluatedExamples() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]"; ExportEvaluatedExamplesOutputConfig outputConfig = new ExportEvaluatedExamplesOutputConfig(); // Make the request Operation <Empty, OperationMetadata> response = autoMlClient.ExportEvaluatedExamples(name, outputConfig); // Poll until the returned long-running operation is complete Operation <Empty, OperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result Empty 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 <Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceExportEvaluatedExamples(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Empty retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for CreateDatasetAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task CreateDatasetAsync() { // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) string parent = "projects/[PROJECT]/locations/[LOCATION]"; Dataset dataset = new Dataset(); // Make the request Operation <Dataset, OperationMetadata> response = await autoMlClient.CreateDatasetAsync(parent, dataset); // Poll until the returned long-running operation is complete Operation <Dataset, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result Dataset 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 <Dataset, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateDatasetAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Dataset retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for DeleteModel</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void DeleteModelResourceNames() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"); // Make the request Operation <Empty, OperationMetadata> response = autoMlClient.DeleteModel(name); // Poll until the returned long-running operation is complete Operation <Empty, OperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result Empty 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 <Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceDeleteModel(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Empty retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for ExportDataAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task ExportDataAsync() { // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]"; OutputConfig outputConfig = new OutputConfig(); // Make the request Operation <Empty, OperationMetadata> response = await autoMlClient.ExportDataAsync(name, outputConfig); // Poll until the returned long-running operation is complete Operation <Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result Empty 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 <Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportDataAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Empty retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for ImportDataAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task ImportDataRequestObjectAsync() { // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) ImportDataRequest request = new ImportDataRequest { DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"), InputConfig = new InputConfig(), }; // Make the request Operation <Empty, OperationMetadata> response = await autoMlClient.ImportDataAsync(request); // Poll until the returned long-running operation is complete Operation <Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result Empty 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 <Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceImportDataAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Empty retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for UndeployModel</summary> public void UndeployModelRequestObject() { // Snippet: UndeployModel(UndeployModelRequest, CallSettings) // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) UndeployModelRequest request = new UndeployModelRequest { Name = "", }; // Make the request Operation <Empty, OperationMetadata> response = autoMlClient.UndeployModel(request); // Poll until the returned long-running operation is complete Operation <Empty, OperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result Empty 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 <Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceUndeployModel(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Empty retrievedResult = retrievedResponse.Result; } // End snippet }
/// <summary>Snippet for DeleteDataset</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void DeleteDataset() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]"; // Make the request Operation <Empty, OperationMetadata> response = autoMlClient.DeleteDataset(name); // Poll until the returned long-running operation is complete Operation <Empty, OperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result Empty 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 <Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceDeleteDataset(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Empty retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for CreateModel</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateModel() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]/locations/[LOCATION]"; Model model = new Model(); // Make the request Operation <Model, OperationMetadata> response = autoMlClient.CreateModel(parent, model); // Poll until the returned long-running operation is complete Operation <Model, OperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result Model 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 <Model, OperationMetadata> retrievedResponse = autoMlClient.PollOnceCreateModel(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Model retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for GetModelEvaluation</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetModelEvaluation() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/modelEvaluations/[MODEL_EVALUATION]"; // Make the request ModelEvaluation response = autoMlClient.GetModelEvaluation(name); }
/// <summary>Snippet for GetDataset</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetDatasetResourceNames() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"); // Make the request Dataset response = autoMlClient.GetDataset(name); }
/// <summary>Snippet for UpdateColumnSpec</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void UpdateColumnSpec() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) ColumnSpec columnSpec = new ColumnSpec(); // Make the request ColumnSpec response = autoMlClient.UpdateColumnSpec(columnSpec); }
/// <summary>Snippet for GetDataset</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetDataset() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]"; // Make the request Dataset response = autoMlClient.GetDataset(name); }
/// <summary>Snippet for UpdateDataset</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void UpdateDataset() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) Dataset dataset = new Dataset(); // Make the request Dataset response = autoMlClient.UpdateDataset(dataset); }
/// <summary>Snippet for GetColumnSpec</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetColumnSpecResourceNames() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) ColumnSpecName name = ColumnSpecName.FromProjectLocationDatasetTableSpecColumnSpec("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]"); // Make the request ColumnSpec response = autoMlClient.GetColumnSpec(name); }
/// <summary>Snippet for GetModelEvaluation</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetModelEvaluationResourceNames() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) ModelEvaluationName name = ModelEvaluationName.FromProjectLocationModelModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]"); // Make the request ModelEvaluation response = autoMlClient.GetModelEvaluation(name); }
/// <summary>Snippet for GetAnnotationSpec</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetAnnotationSpecResourceNames() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) AnnotationSpecName name = AnnotationSpecName.FromProjectLocationDatasetAnnotationSpec("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]"); // Make the request AnnotationSpec response = autoMlClient.GetAnnotationSpec(name); }
/// <summary>Snippet for UpdateTableSpec</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void UpdateTableSpec() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) TableSpec tableSpec = new TableSpec(); // Make the request TableSpec response = autoMlClient.UpdateTableSpec(tableSpec); }
/// <summary>Snippet for GetTableSpec</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetTableSpec() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]/tableSpecs/[TABLE_SPEC]"; // Make the request TableSpec response = autoMlClient.GetTableSpec(name); }
/// <summary>Snippet for GetAnnotationSpecAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task GetAnnotationSpecAsync() { // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]/annotationSpecs/[ANNOTATION_SPEC]"; // Make the request AnnotationSpec response = await autoMlClient.GetAnnotationSpecAsync(name); }
/// <summary>Snippet for GetModelAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task GetModelResourceNamesAsync() { // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"); // Make the request Model response = await autoMlClient.GetModelAsync(name); }
/// <summary>Snippet for UpdateColumnSpecAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task UpdateColumnSpecAsync() { // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) ColumnSpec columnSpec = new ColumnSpec(); // Make the request ColumnSpec response = await autoMlClient.UpdateColumnSpecAsync(columnSpec); }
/// <summary>Snippet for CreateDataset</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateDataset() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]/locations/[LOCATION]"; Dataset dataset = new Dataset(); // Make the request Dataset response = autoMlClient.CreateDataset(parent, dataset); }
/// <summary>Snippet for UpdateTableSpecAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task UpdateTableSpecAsync() { // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) TableSpec tableSpec = new TableSpec(); // Make the request TableSpec response = await autoMlClient.UpdateTableSpecAsync(tableSpec); }
/// <summary>Snippet for GetModelAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task GetModelAsync() { // Create client AutoMlClient autoMlClient = await AutoMlClient.CreateAsync(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]"; // Make the request Model response = await autoMlClient.GetModelAsync(name); }