private Amazon.CustomerProfiles.Model.GetAutoMergingPreviewResponse CallAWSServiceOperation(IAmazonCustomerProfiles client, Amazon.CustomerProfiles.Model.GetAutoMergingPreviewRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Customer Profiles", "GetAutoMergingPreview");
     try
     {
         #if DESKTOP
         return(client.GetAutoMergingPreview(request));
         #elif CORECLR
         return(client.GetAutoMergingPreviewAsync(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.CustomerProfiles.Model.GetAutoMergingPreviewRequest();


            // populate ConflictResolution
            var requestConflictResolutionIsNull = true;

            request.ConflictResolution = new Amazon.CustomerProfiles.Model.ConflictResolution();
            Amazon.CustomerProfiles.ConflictResolvingModel requestConflictResolution_conflictResolution_ConflictResolvingModel = null;
            if (cmdletContext.ConflictResolution_ConflictResolvingModel != null)
            {
                requestConflictResolution_conflictResolution_ConflictResolvingModel = cmdletContext.ConflictResolution_ConflictResolvingModel;
            }
            if (requestConflictResolution_conflictResolution_ConflictResolvingModel != null)
            {
                request.ConflictResolution.ConflictResolvingModel = requestConflictResolution_conflictResolution_ConflictResolvingModel;
                requestConflictResolutionIsNull = false;
            }
            System.String requestConflictResolution_conflictResolution_SourceName = null;
            if (cmdletContext.ConflictResolution_SourceName != null)
            {
                requestConflictResolution_conflictResolution_SourceName = cmdletContext.ConflictResolution_SourceName;
            }
            if (requestConflictResolution_conflictResolution_SourceName != null)
            {
                request.ConflictResolution.SourceName = requestConflictResolution_conflictResolution_SourceName;
                requestConflictResolutionIsNull       = false;
            }
            // determine if request.ConflictResolution should be set to null
            if (requestConflictResolutionIsNull)
            {
                request.ConflictResolution = null;
            }

            // populate Consolidation
            var requestConsolidationIsNull = true;

            request.Consolidation = new Amazon.CustomerProfiles.Model.Consolidation();
            List <List <System.String> > requestConsolidation_consolidation_MatchingAttributesList = null;

            if (cmdletContext.Consolidation_MatchingAttributesList != null)
            {
                requestConsolidation_consolidation_MatchingAttributesList = cmdletContext.Consolidation_MatchingAttributesList;
            }
            if (requestConsolidation_consolidation_MatchingAttributesList != null)
            {
                request.Consolidation.MatchingAttributesList = requestConsolidation_consolidation_MatchingAttributesList;
                requestConsolidationIsNull = false;
            }
            // determine if request.Consolidation should be set to null
            if (requestConsolidationIsNull)
            {
                request.Consolidation = null;
            }
            if (cmdletContext.DomainName != null)
            {
                request.DomainName = cmdletContext.DomainName;
            }

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