private Amazon.Pinpoint.Model.CreateRecommenderConfigurationResponse CallAWSServiceOperation(IAmazonPinpoint client, Amazon.Pinpoint.Model.CreateRecommenderConfigurationRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Pinpoint", "CreateRecommenderConfiguration");
     try
     {
         #if DESKTOP
         return(client.CreateRecommenderConfiguration(request));
         #elif CORECLR
         return(client.CreateRecommenderConfigurationAsync(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.Pinpoint.Model.CreateRecommenderConfigurationRequest();


            // populate CreateRecommenderConfiguration
            var requestCreateRecommenderConfigurationIsNull = true;

            request.CreateRecommenderConfiguration = new Amazon.Pinpoint.Model.CreateRecommenderConfiguration();
            Dictionary <System.String, System.String> requestCreateRecommenderConfiguration_createRecommenderConfiguration_Attribute = null;

            if (cmdletContext.CreateRecommenderConfiguration_Attribute != null)
            {
                requestCreateRecommenderConfiguration_createRecommenderConfiguration_Attribute = cmdletContext.CreateRecommenderConfiguration_Attribute;
            }
            if (requestCreateRecommenderConfiguration_createRecommenderConfiguration_Attribute != null)
            {
                request.CreateRecommenderConfiguration.Attributes = requestCreateRecommenderConfiguration_createRecommenderConfiguration_Attribute;
                requestCreateRecommenderConfigurationIsNull       = false;
            }
            System.String requestCreateRecommenderConfiguration_createRecommenderConfiguration_Description = null;
            if (cmdletContext.CreateRecommenderConfiguration_Description != null)
            {
                requestCreateRecommenderConfiguration_createRecommenderConfiguration_Description = cmdletContext.CreateRecommenderConfiguration_Description;
            }
            if (requestCreateRecommenderConfiguration_createRecommenderConfiguration_Description != null)
            {
                request.CreateRecommenderConfiguration.Description = requestCreateRecommenderConfiguration_createRecommenderConfiguration_Description;
                requestCreateRecommenderConfigurationIsNull        = false;
            }
            System.String requestCreateRecommenderConfiguration_createRecommenderConfiguration_Name = null;
            if (cmdletContext.CreateRecommenderConfiguration_Name != null)
            {
                requestCreateRecommenderConfiguration_createRecommenderConfiguration_Name = cmdletContext.CreateRecommenderConfiguration_Name;
            }
            if (requestCreateRecommenderConfiguration_createRecommenderConfiguration_Name != null)
            {
                request.CreateRecommenderConfiguration.Name = requestCreateRecommenderConfiguration_createRecommenderConfiguration_Name;
                requestCreateRecommenderConfigurationIsNull = false;
            }
            System.String requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderIdType = null;
            if (cmdletContext.CreateRecommenderConfiguration_RecommendationProviderIdType != null)
            {
                requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderIdType = cmdletContext.CreateRecommenderConfiguration_RecommendationProviderIdType;
            }
            if (requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderIdType != null)
            {
                request.CreateRecommenderConfiguration.RecommendationProviderIdType = requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderIdType;
                requestCreateRecommenderConfigurationIsNull = false;
            }
            System.String requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderRoleArn = null;
            if (cmdletContext.CreateRecommenderConfiguration_RecommendationProviderRoleArn != null)
            {
                requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderRoleArn = cmdletContext.CreateRecommenderConfiguration_RecommendationProviderRoleArn;
            }
            if (requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderRoleArn != null)
            {
                request.CreateRecommenderConfiguration.RecommendationProviderRoleArn = requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderRoleArn;
                requestCreateRecommenderConfigurationIsNull = false;
            }
            System.String requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderUri = null;
            if (cmdletContext.CreateRecommenderConfiguration_RecommendationProviderUri != null)
            {
                requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderUri = cmdletContext.CreateRecommenderConfiguration_RecommendationProviderUri;
            }
            if (requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderUri != null)
            {
                request.CreateRecommenderConfiguration.RecommendationProviderUri = requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationProviderUri;
                requestCreateRecommenderConfigurationIsNull = false;
            }
            System.String requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationsDisplayName = null;
            if (cmdletContext.CreateRecommenderConfiguration_RecommendationsDisplayName != null)
            {
                requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationsDisplayName = cmdletContext.CreateRecommenderConfiguration_RecommendationsDisplayName;
            }
            if (requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationsDisplayName != null)
            {
                request.CreateRecommenderConfiguration.RecommendationsDisplayName = requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationsDisplayName;
                requestCreateRecommenderConfigurationIsNull = false;
            }
            System.Int32?requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationsPerMessage = null;
            if (cmdletContext.CreateRecommenderConfiguration_RecommendationsPerMessage != null)
            {
                requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationsPerMessage = cmdletContext.CreateRecommenderConfiguration_RecommendationsPerMessage.Value;
            }
            if (requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationsPerMessage != null)
            {
                request.CreateRecommenderConfiguration.RecommendationsPerMessage = requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationsPerMessage.Value;
                requestCreateRecommenderConfigurationIsNull = false;
            }
            System.String requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationTransformerUri = null;
            if (cmdletContext.CreateRecommenderConfiguration_RecommendationTransformerUri != null)
            {
                requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationTransformerUri = cmdletContext.CreateRecommenderConfiguration_RecommendationTransformerUri;
            }
            if (requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationTransformerUri != null)
            {
                request.CreateRecommenderConfiguration.RecommendationTransformerUri = requestCreateRecommenderConfiguration_createRecommenderConfiguration_RecommendationTransformerUri;
                requestCreateRecommenderConfigurationIsNull = false;
            }
            // determine if request.CreateRecommenderConfiguration should be set to null
            if (requestCreateRecommenderConfigurationIsNull)
            {
                request.CreateRecommenderConfiguration = 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);
        }