private Amazon.SimpleEmailV2.Model.CreateImportJobResponse CallAWSServiceOperation(IAmazonSimpleEmailServiceV2 client, Amazon.SimpleEmailV2.Model.CreateImportJobRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Simple Email Service V2 (SES V2)", "CreateImportJob");
     try
     {
         #if DESKTOP
         return(client.CreateImportJob(request));
         #elif CORECLR
         return(client.CreateImportJobAsync(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.SimpleEmailV2.Model.CreateImportJobRequest();


            // populate ImportDataSource
            var requestImportDataSourceIsNull = true;

            request.ImportDataSource = new Amazon.SimpleEmailV2.Model.ImportDataSource();
            Amazon.SimpleEmailV2.DataFormat requestImportDataSource_importDataSource_DataFormat = null;
            if (cmdletContext.ImportDataSource_DataFormat != null)
            {
                requestImportDataSource_importDataSource_DataFormat = cmdletContext.ImportDataSource_DataFormat;
            }
            if (requestImportDataSource_importDataSource_DataFormat != null)
            {
                request.ImportDataSource.DataFormat = requestImportDataSource_importDataSource_DataFormat;
                requestImportDataSourceIsNull       = false;
            }
            System.String requestImportDataSource_importDataSource_S3Url = null;
            if (cmdletContext.ImportDataSource_S3Url != null)
            {
                requestImportDataSource_importDataSource_S3Url = cmdletContext.ImportDataSource_S3Url;
            }
            if (requestImportDataSource_importDataSource_S3Url != null)
            {
                request.ImportDataSource.S3Url = requestImportDataSource_importDataSource_S3Url;
                requestImportDataSourceIsNull  = false;
            }
            // determine if request.ImportDataSource should be set to null
            if (requestImportDataSourceIsNull)
            {
                request.ImportDataSource = null;
            }

            // populate ImportDestination
            var requestImportDestinationIsNull = true;

            request.ImportDestination = new Amazon.SimpleEmailV2.Model.ImportDestination();
            Amazon.SimpleEmailV2.Model.SuppressionListDestination requestImportDestination_importDestination_SuppressionListDestination = null;

            // populate SuppressionListDestination
            var requestImportDestination_importDestination_SuppressionListDestinationIsNull = true;

            requestImportDestination_importDestination_SuppressionListDestination = new Amazon.SimpleEmailV2.Model.SuppressionListDestination();
            Amazon.SimpleEmailV2.SuppressionListImportAction requestImportDestination_importDestination_SuppressionListDestination_suppressionListDestination_SuppressionListImportAction = null;
            if (cmdletContext.SuppressionListDestination_SuppressionListImportAction != null)
            {
                requestImportDestination_importDestination_SuppressionListDestination_suppressionListDestination_SuppressionListImportAction = cmdletContext.SuppressionListDestination_SuppressionListImportAction;
            }
            if (requestImportDestination_importDestination_SuppressionListDestination_suppressionListDestination_SuppressionListImportAction != null)
            {
                requestImportDestination_importDestination_SuppressionListDestination.SuppressionListImportAction = requestImportDestination_importDestination_SuppressionListDestination_suppressionListDestination_SuppressionListImportAction;
                requestImportDestination_importDestination_SuppressionListDestinationIsNull = false;
            }
            // determine if requestImportDestination_importDestination_SuppressionListDestination should be set to null
            if (requestImportDestination_importDestination_SuppressionListDestinationIsNull)
            {
                requestImportDestination_importDestination_SuppressionListDestination = null;
            }
            if (requestImportDestination_importDestination_SuppressionListDestination != null)
            {
                request.ImportDestination.SuppressionListDestination = requestImportDestination_importDestination_SuppressionListDestination;
                requestImportDestinationIsNull = false;
            }
            // determine if request.ImportDestination should be set to null
            if (requestImportDestinationIsNull)
            {
                request.ImportDestination = 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);
        }