private Amazon.SimpleWorkflow.Model.UndeprecateWorkflowTypeResponse CallAWSServiceOperation(IAmazonSimpleWorkflow client, Amazon.SimpleWorkflow.Model.UndeprecateWorkflowTypeRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Simple Workflow Service (SWF)", "UndeprecateWorkflowType"); try { #if DESKTOP return(client.UndeprecateWorkflowType(request)); #elif CORECLR return(client.UndeprecateWorkflowTypeAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.SimpleWorkflow.Model.UndeprecateWorkflowTypeRequest(); if (cmdletContext.Domain != null) { request.Domain = cmdletContext.Domain; } // populate WorkflowType var requestWorkflowTypeIsNull = true; request.WorkflowType = new Amazon.SimpleWorkflow.Model.WorkflowType(); System.String requestWorkflowType_workflowType_Name = null; if (cmdletContext.WorkflowType_Name != null) { requestWorkflowType_workflowType_Name = cmdletContext.WorkflowType_Name; } if (requestWorkflowType_workflowType_Name != null) { request.WorkflowType.Name = requestWorkflowType_workflowType_Name; requestWorkflowTypeIsNull = false; } System.String requestWorkflowType_workflowType_Version = null; if (cmdletContext.WorkflowType_Version != null) { requestWorkflowType_workflowType_Version = cmdletContext.WorkflowType_Version; } if (requestWorkflowType_workflowType_Version != null) { request.WorkflowType.Version = requestWorkflowType_workflowType_Version; requestWorkflowTypeIsNull = false; } // determine if request.WorkflowType should be set to null if (requestWorkflowTypeIsNull) { request.WorkflowType = null; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }