private Amazon.AppIntegrationsService.Model.CreateDataIntegrationResponse CallAWSServiceOperation(IAmazonAppIntegrationsService client, Amazon.AppIntegrationsService.Model.CreateDataIntegrationRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon AppIntegrations Service", "CreateDataIntegration");
     try
     {
         #if DESKTOP
         return(client.CreateDataIntegration(request));
         #elif CORECLR
         return(client.CreateDataIntegrationAsync(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.AppIntegrationsService.Model.CreateDataIntegrationRequest();

            if (cmdletContext.ClientToken != null)
            {
                request.ClientToken = cmdletContext.ClientToken;
            }
            if (cmdletContext.Description != null)
            {
                request.Description = cmdletContext.Description;
            }
            if (cmdletContext.KmsKey != null)
            {
                request.KmsKey = cmdletContext.KmsKey;
            }
            if (cmdletContext.Name != null)
            {
                request.Name = cmdletContext.Name;
            }

            // populate ScheduleConfig
            var requestScheduleConfigIsNull = true;

            request.ScheduleConfig = new Amazon.AppIntegrationsService.Model.ScheduleConfiguration();
            System.String requestScheduleConfig_scheduleConfig_FirstExecutionFrom = null;
            if (cmdletContext.ScheduleConfig_FirstExecutionFrom != null)
            {
                requestScheduleConfig_scheduleConfig_FirstExecutionFrom = cmdletContext.ScheduleConfig_FirstExecutionFrom;
            }
            if (requestScheduleConfig_scheduleConfig_FirstExecutionFrom != null)
            {
                request.ScheduleConfig.FirstExecutionFrom = requestScheduleConfig_scheduleConfig_FirstExecutionFrom;
                requestScheduleConfigIsNull = false;
            }
            System.String requestScheduleConfig_scheduleConfig_Object = null;
            if (cmdletContext.ScheduleConfig_Object != null)
            {
                requestScheduleConfig_scheduleConfig_Object = cmdletContext.ScheduleConfig_Object;
            }
            if (requestScheduleConfig_scheduleConfig_Object != null)
            {
                request.ScheduleConfig.Object = requestScheduleConfig_scheduleConfig_Object;
                requestScheduleConfigIsNull   = false;
            }
            System.String requestScheduleConfig_scheduleConfig_ScheduleExpression = null;
            if (cmdletContext.ScheduleConfig_ScheduleExpression != null)
            {
                requestScheduleConfig_scheduleConfig_ScheduleExpression = cmdletContext.ScheduleConfig_ScheduleExpression;
            }
            if (requestScheduleConfig_scheduleConfig_ScheduleExpression != null)
            {
                request.ScheduleConfig.ScheduleExpression = requestScheduleConfig_scheduleConfig_ScheduleExpression;
                requestScheduleConfigIsNull = false;
            }
            // determine if request.ScheduleConfig should be set to null
            if (requestScheduleConfigIsNull)
            {
                request.ScheduleConfig = null;
            }
            if (cmdletContext.SourceURI != null)
            {
                request.SourceURI = cmdletContext.SourceURI;
            }
            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);
        }