private Amazon.IoTWireless.Model.UpdateNetworkAnalyzerConfigurationResponse CallAWSServiceOperation(IAmazonIoTWireless client, Amazon.IoTWireless.Model.UpdateNetworkAnalyzerConfigurationRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS IoT Wireless", "UpdateNetworkAnalyzerConfiguration");
     try
     {
         #if DESKTOP
         return(client.UpdateNetworkAnalyzerConfiguration(request));
         #elif CORECLR
         return(client.UpdateNetworkAnalyzerConfigurationAsync(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.IoTWireless.Model.UpdateNetworkAnalyzerConfigurationRequest();

            if (cmdletContext.ConfigurationName != null)
            {
                request.ConfigurationName = cmdletContext.ConfigurationName;
            }

            // populate TraceContent
            var requestTraceContentIsNull = true;

            request.TraceContent = new Amazon.IoTWireless.Model.TraceContent();
            Amazon.IoTWireless.LogLevel requestTraceContent_traceContent_LogLevel = null;
            if (cmdletContext.TraceContent_LogLevel != null)
            {
                requestTraceContent_traceContent_LogLevel = cmdletContext.TraceContent_LogLevel;
            }
            if (requestTraceContent_traceContent_LogLevel != null)
            {
                request.TraceContent.LogLevel = requestTraceContent_traceContent_LogLevel;
                requestTraceContentIsNull     = false;
            }
            Amazon.IoTWireless.WirelessDeviceFrameInfo requestTraceContent_traceContent_WirelessDeviceFrameInfo = null;
            if (cmdletContext.TraceContent_WirelessDeviceFrameInfo != null)
            {
                requestTraceContent_traceContent_WirelessDeviceFrameInfo = cmdletContext.TraceContent_WirelessDeviceFrameInfo;
            }
            if (requestTraceContent_traceContent_WirelessDeviceFrameInfo != null)
            {
                request.TraceContent.WirelessDeviceFrameInfo = requestTraceContent_traceContent_WirelessDeviceFrameInfo;
                requestTraceContentIsNull = false;
            }
            // determine if request.TraceContent should be set to null
            if (requestTraceContentIsNull)
            {
                request.TraceContent = null;
            }
            if (cmdletContext.WirelessDevicesToAdd != null)
            {
                request.WirelessDevicesToAdd = cmdletContext.WirelessDevicesToAdd;
            }
            if (cmdletContext.WirelessDevicesToRemove != null)
            {
                request.WirelessDevicesToRemove = cmdletContext.WirelessDevicesToRemove;
            }
            if (cmdletContext.WirelessGatewaysToAdd != null)
            {
                request.WirelessGatewaysToAdd = cmdletContext.WirelessGatewaysToAdd;
            }
            if (cmdletContext.WirelessGatewaysToRemove != null)
            {
                request.WirelessGatewaysToRemove = cmdletContext.WirelessGatewaysToRemove;
            }

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