/// <summary>Snippet for CreateExperiment</summary> public void CreateExperiment() { // Snippet: CreateExperiment(string, Experiment, CallSettings) // Create client ExperimentsClient experimentsClient = ExperimentsClient.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]"; Experiment experiment = new Experiment(); // Make the request Experiment response = experimentsClient.CreateExperiment(parent, experiment); // End snippet }
/// <summary>Snippet for CreateExperiment</summary> public void CreateExperimentResourceNames() { // Snippet: CreateExperiment(EnvironmentName, Experiment, CallSettings) // Create client ExperimentsClient experimentsClient = ExperimentsClient.Create(); // Initialize request argument(s) EnvironmentName parent = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"); Experiment experiment = new Experiment(); // Make the request Experiment response = experimentsClient.CreateExperiment(parent, experiment); // End snippet }
/// <summary>Snippet for CreateExperiment</summary> public void CreateExperimentRequestObject() { // Snippet: CreateExperiment(CreateExperimentRequest, CallSettings) // Create client ExperimentsClient experimentsClient = ExperimentsClient.Create(); // Initialize request argument(s) CreateExperimentRequest request = new CreateExperimentRequest { ParentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"), Experiment = new Experiment(), }; // Make the request Experiment response = experimentsClient.CreateExperiment(request); // End snippet }