private Amazon.LocationService.Model.UpdatePlaceIndexResponse CallAWSServiceOperation(IAmazonLocationService client, Amazon.LocationService.Model.UpdatePlaceIndexRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Location Service", "UpdatePlaceIndex");
     try
     {
         #if DESKTOP
         return(client.UpdatePlaceIndex(request));
         #elif CORECLR
         return(client.UpdatePlaceIndexAsync(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.LocationService.Model.UpdatePlaceIndexRequest();


            // populate DataSourceConfiguration
            var requestDataSourceConfigurationIsNull = true;

            request.DataSourceConfiguration = new Amazon.LocationService.Model.DataSourceConfiguration();
            Amazon.LocationService.IntendedUse requestDataSourceConfiguration_dataSourceConfiguration_IntendedUse = null;
            if (cmdletContext.DataSourceConfiguration_IntendedUse != null)
            {
                requestDataSourceConfiguration_dataSourceConfiguration_IntendedUse = cmdletContext.DataSourceConfiguration_IntendedUse;
            }
            if (requestDataSourceConfiguration_dataSourceConfiguration_IntendedUse != null)
            {
                request.DataSourceConfiguration.IntendedUse = requestDataSourceConfiguration_dataSourceConfiguration_IntendedUse;
                requestDataSourceConfigurationIsNull        = false;
            }
            // determine if request.DataSourceConfiguration should be set to null
            if (requestDataSourceConfigurationIsNull)
            {
                request.DataSourceConfiguration = null;
            }
            if (cmdletContext.Description != null)
            {
                request.Description = cmdletContext.Description;
            }
            if (cmdletContext.IndexName != null)
            {
                request.IndexName = cmdletContext.IndexName;
            }
            if (cmdletContext.PricingPlan != null)
            {
                request.PricingPlan = cmdletContext.PricingPlan;
            }

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