/// <summary>Snippet for CreateVersionAsync</summary> public async Task CreateVersionResourceNamesAsync() { // Snippet: CreateVersionAsync(FlowName, Version, CallSettings) // Additional: CreateVersionAsync(FlowName, Version, CancellationToken) // Create client VersionsClient versionsClient = await VersionsClient.CreateAsync(); // Initialize request argument(s) FlowName parent = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"); gcdcv::Version version = new gcdcv::Version(); // Make the request Operation <gcdcv::Version, CreateVersionOperationMetadata> response = await versionsClient.CreateVersionAsync(parent, version); // Poll until the returned long-running operation is complete Operation <gcdcv::Version, CreateVersionOperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result gcdcv::Version 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 <gcdcv::Version, CreateVersionOperationMetadata> retrievedResponse = await versionsClient.PollOnceCreateVersionAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result gcdcv::Version retrievedResult = retrievedResponse.Result; } // End snippet }
/// <summary>Snippet for CreateVersion</summary> public void CreateVersionRequestObject() { // Snippet: CreateVersion(CreateVersionRequest, CallSettings) // Create client VersionsClient versionsClient = VersionsClient.Create(); // Initialize request argument(s) CreateVersionRequest request = new CreateVersionRequest { ParentAsFlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"), Version = new gcdcv::Version(), }; // Make the request Operation <gcdcv::Version, CreateVersionOperationMetadata> response = versionsClient.CreateVersion(request); // Poll until the returned long-running operation is complete Operation <gcdcv::Version, CreateVersionOperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result gcdcv::Version 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 <gcdcv::Version, CreateVersionOperationMetadata> retrievedResponse = versionsClient.PollOnceCreateVersion(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result gcdcv::Version retrievedResult = retrievedResponse.Result; } // End snippet }
/// <summary>Snippet for CreateVersion</summary> public void CreateVersion() { // Snippet: CreateVersion(string, Version, CallSettings) // Create client VersionsClient versionsClient = VersionsClient.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]"; gcdcv::Version version = new gcdcv::Version(); // Make the request Operation <gcdcv::Version, CreateVersionOperationMetadata> response = versionsClient.CreateVersion(parent, version); // Poll until the returned long-running operation is complete Operation <gcdcv::Version, CreateVersionOperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result gcdcv::Version 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 <gcdcv::Version, CreateVersionOperationMetadata> retrievedResponse = versionsClient.PollOnceCreateVersion(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result gcdcv::Version retrievedResult = retrievedResponse.Result; } // End snippet }
/// <summary>Snippet for GetVersion</summary> public void GetVersionResourceNames() { // Snippet: GetVersion(VersionName, CallSettings) // Create client VersionsClient versionsClient = VersionsClient.Create(); // Initialize request argument(s) VersionName name = VersionName.FromProjectLocationAgentFlowVersion("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]"); // Make the request gcdcv::Version response = versionsClient.GetVersion(name); // End snippet }
/// <summary>Snippet for GetVersion</summary> public void GetVersion() { // Snippet: GetVersion(string, CallSettings) // Create client VersionsClient versionsClient = VersionsClient.Create(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/versions/[VERSION]"; // Make the request gcdcv::Version response = versionsClient.GetVersion(name); // End snippet }
/// <summary>Snippet for UpdateVersion</summary> public void UpdateVersion() { // Snippet: UpdateVersion(Version, FieldMask, CallSettings) // Create client VersionsClient versionsClient = VersionsClient.Create(); // Initialize request argument(s) gcdcv::Version version = new gcdcv::Version(); FieldMask updateMask = new FieldMask(); // Make the request gcdcv::Version response = versionsClient.UpdateVersion(version, updateMask); // End snippet }
/// <summary>Snippet for GetVersionAsync</summary> public async Task GetVersionResourceNamesAsync() { // Snippet: GetVersionAsync(VersionName, CallSettings) // Additional: GetVersionAsync(VersionName, CancellationToken) // Create client VersionsClient versionsClient = await VersionsClient.CreateAsync(); // Initialize request argument(s) VersionName name = VersionName.FromProjectLocationAgentFlowVersion("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]"); // Make the request gcdcv::Version response = await versionsClient.GetVersionAsync(name); // End snippet }
/// <summary>Snippet for GetVersionAsync</summary> public async Task GetVersionAsync() { // Snippet: GetVersionAsync(string, CallSettings) // Additional: GetVersionAsync(string, CancellationToken) // Create client VersionsClient versionsClient = await VersionsClient.CreateAsync(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/versions/[VERSION]"; // Make the request gcdcv::Version response = await versionsClient.GetVersionAsync(name); // End snippet }
/// <summary>Snippet for GetVersion</summary> public void GetVersionRequestObject() { // Snippet: GetVersion(GetVersionRequest, CallSettings) // Create client VersionsClient versionsClient = VersionsClient.Create(); // Initialize request argument(s) GetVersionRequest request = new GetVersionRequest { VersionName = VersionName.FromProjectLocationAgentFlowVersion("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]"), }; // Make the request gcdcv::Version response = versionsClient.GetVersion(request); // End snippet }
/// <summary>Snippet for UpdateVersionAsync</summary> public async Task UpdateVersionAsync() { // Snippet: UpdateVersionAsync(Version, FieldMask, CallSettings) // Additional: UpdateVersionAsync(Version, FieldMask, CancellationToken) // Create client VersionsClient versionsClient = await VersionsClient.CreateAsync(); // Initialize request argument(s) gcdcv::Version version = new gcdcv::Version(); FieldMask updateMask = new FieldMask(); // Make the request gcdcv::Version response = await versionsClient.UpdateVersionAsync(version, updateMask); // End snippet }
/// <summary>Snippet for UpdateVersion</summary> public void UpdateVersionRequestObject() { // Snippet: UpdateVersion(UpdateVersionRequest, CallSettings) // Create client VersionsClient versionsClient = VersionsClient.Create(); // Initialize request argument(s) UpdateVersionRequest request = new UpdateVersionRequest { Version = new gcdcv::Version(), UpdateMask = new FieldMask(), }; // Make the request gcdcv::Version response = versionsClient.UpdateVersion(request); // End snippet }
/// <summary>Snippet for UpdateVersionAsync</summary> public async Task UpdateVersionRequestObjectAsync() { // Snippet: UpdateVersionAsync(UpdateVersionRequest, CallSettings) // Additional: UpdateVersionAsync(UpdateVersionRequest, CancellationToken) // Create client VersionsClient versionsClient = await VersionsClient.CreateAsync(); // Initialize request argument(s) UpdateVersionRequest request = new UpdateVersionRequest { Version = new gcdcv::Version(), UpdateMask = new FieldMask(), }; // Make the request gcdcv::Version response = await versionsClient.UpdateVersionAsync(request); // End snippet }