private Amazon.RoboMaker.Model.StartSimulationJobBatchResponse CallAWSServiceOperation(IAmazonRoboMaker client, Amazon.RoboMaker.Model.StartSimulationJobBatchRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS RoboMaker", "StartSimulationJobBatch");
     try
     {
         #if DESKTOP
         return(client.StartSimulationJobBatch(request));
         #elif CORECLR
         return(client.StartSimulationJobBatchAsync(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.RoboMaker.Model.StartSimulationJobBatchRequest();


            // populate BatchPolicy
            var requestBatchPolicyIsNull = true;

            request.BatchPolicy = new Amazon.RoboMaker.Model.BatchPolicy();
            System.Int32?requestBatchPolicy_batchPolicy_MaxConcurrency = null;
            if (cmdletContext.BatchPolicy_MaxConcurrency != null)
            {
                requestBatchPolicy_batchPolicy_MaxConcurrency = cmdletContext.BatchPolicy_MaxConcurrency.Value;
            }
            if (requestBatchPolicy_batchPolicy_MaxConcurrency != null)
            {
                request.BatchPolicy.MaxConcurrency = requestBatchPolicy_batchPolicy_MaxConcurrency.Value;
                requestBatchPolicyIsNull           = false;
            }
            System.Int64?requestBatchPolicy_batchPolicy_TimeoutInSecond = null;
            if (cmdletContext.BatchPolicy_TimeoutInSecond != null)
            {
                requestBatchPolicy_batchPolicy_TimeoutInSecond = cmdletContext.BatchPolicy_TimeoutInSecond.Value;
            }
            if (requestBatchPolicy_batchPolicy_TimeoutInSecond != null)
            {
                request.BatchPolicy.TimeoutInSeconds = requestBatchPolicy_batchPolicy_TimeoutInSecond.Value;
                requestBatchPolicyIsNull             = false;
            }
            // determine if request.BatchPolicy should be set to null
            if (requestBatchPolicyIsNull)
            {
                request.BatchPolicy = null;
            }
            if (cmdletContext.ClientRequestToken != null)
            {
                request.ClientRequestToken = cmdletContext.ClientRequestToken;
            }
            if (cmdletContext.CreateSimulationJobRequest != null)
            {
                request.CreateSimulationJobRequests = cmdletContext.CreateSimulationJobRequest;
            }
            if (cmdletContext.Tag != null)
            {
                request.Tags = cmdletContext.Tag;
            }

            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);
        }