/// <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 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 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 CreateDataset</summary> public void CreateDatasetRequestObject() { // Snippet: CreateDataset(CreateDatasetRequest, CallSettings) // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) CreateDatasetRequest request = new CreateDatasetRequest { Parent = "", Dataset = new Dataset(), }; // Make the request Operation <Dataset, OperationMetadata> response = autoMlClient.CreateDataset(request); // 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; } // End snippet }
/// <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 DeployModel</summary> public void DeployModelRequestObject() { // Snippet: DeployModel(DeployModelRequest, CallSettings) // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) DeployModelRequest request = new DeployModelRequest { Name = "", ImageObjectDetectionModelDeploymentMetadata = new ImageObjectDetectionModelDeploymentMetadata(), ImageClassificationModelDeploymentMetadata = new ImageClassificationModelDeploymentMetadata(), }; // Make the request Operation <Empty, OperationMetadata> response = autoMlClient.DeployModel(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.PollOnceDeployModel(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 ExportModel</summary> public void ExportModelRequestObject() { // Snippet: ExportModel(ExportModelRequest, CallSettings) // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) ExportModelRequest request = new ExportModelRequest { Name = "", OutputConfig = new ModelExportOutputConfig(), }; // Make the request Operation <Empty, OperationMetadata> response = autoMlClient.ExportModel(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.PollOnceExportModel(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 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 ImportData</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ImportDataResourceNames() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"); InputConfig inputConfig = new InputConfig(); // Make the request Operation <Empty, OperationMetadata> response = autoMlClient.ImportData(name, inputConfig); // 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.PollOnceImportData(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 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 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 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 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 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 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 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 UpdateModel</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void UpdateModel() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) Model model = new Model(); FieldMask updateMask = new FieldMask(); // Make the request Model response = autoMlClient.UpdateModel(model, updateMask); }
/// <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 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 Dataset response = autoMlClient.CreateDataset(parent, dataset); }
/// <summary>Snippet for GetModel</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetModelRequestObject() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) GetModelRequest request = new GetModelRequest { ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"), }; // Make the request Model response = autoMlClient.GetModel(request); }
/// <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 GetDatasetRequestObject() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) GetDatasetRequest request = new GetDatasetRequest { DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"), }; // Make the request Dataset response = autoMlClient.GetDataset(request); }
/// <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 GetTableSpecRequestObject() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) GetTableSpecRequest request = new GetTableSpecRequest { TableSpecName = TableSpecName.FromProjectLocationDatasetTableSpec("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]"), FieldMask = new FieldMask(), }; // Make the request TableSpec response = autoMlClient.GetTableSpec(request); }
/// <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 CreateDatasetRequestObject() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) CreateDatasetRequest request = new CreateDatasetRequest { ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), Dataset = new Dataset(), }; // Make the request Dataset response = autoMlClient.CreateDataset(request); }
/// <summary>Snippet for UpdateModel</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void UpdateModelRequestObject() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) UpdateModelRequest request = new UpdateModelRequest { Model = new Model(), UpdateMask = new FieldMask(), }; // Make the request Model response = autoMlClient.UpdateModel(request); }
/// <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 UpdateColumnSpecRequestObject() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) UpdateColumnSpecRequest request = new UpdateColumnSpecRequest { ColumnSpec = new ColumnSpec(), UpdateMask = new FieldMask(), }; // Make the request ColumnSpec response = autoMlClient.UpdateColumnSpec(request); }
/// <summary>Snippet for GetModel</summary> public void GetModelRequestObject() { // Snippet: GetModel(GetModelRequest, CallSettings) // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) GetModelRequest request = new GetModelRequest { Name = "", }; // Make the request Model response = autoMlClient.GetModel(request); // End snippet }
/// <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 UpdateDatasetRequestObject() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) UpdateDatasetRequest request = new UpdateDatasetRequest { Dataset = new Dataset(), UpdateMask = new FieldMask(), }; // Make the request Dataset response = autoMlClient.UpdateDataset(request); }