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


            // populate DeviceRegistrationState
            var requestDeviceRegistrationStateIsNull = true;

            request.DeviceRegistrationState = new Amazon.IoTWireless.Model.DeviceRegistrationStateEventConfiguration();
            Amazon.IoTWireless.Model.SidewalkEventNotificationConfigurations requestDeviceRegistrationState_deviceRegistrationState_Sidewalk = null;

            // populate Sidewalk
            var requestDeviceRegistrationState_deviceRegistrationState_SidewalkIsNull = true;

            requestDeviceRegistrationState_deviceRegistrationState_Sidewalk = new Amazon.IoTWireless.Model.SidewalkEventNotificationConfigurations();
            Amazon.IoTWireless.EventNotificationTopicStatus requestDeviceRegistrationState_deviceRegistrationState_Sidewalk_sidewalk_DeviceRegistrationState_AmazonIdEventTopic = null;
            if (cmdletContext.Sidewalk_DeviceRegistrationState_AmazonIdEventTopic != null)
            {
                requestDeviceRegistrationState_deviceRegistrationState_Sidewalk_sidewalk_DeviceRegistrationState_AmazonIdEventTopic = cmdletContext.Sidewalk_DeviceRegistrationState_AmazonIdEventTopic;
            }
            if (requestDeviceRegistrationState_deviceRegistrationState_Sidewalk_sidewalk_DeviceRegistrationState_AmazonIdEventTopic != null)
            {
                requestDeviceRegistrationState_deviceRegistrationState_Sidewalk.AmazonIdEventTopic = requestDeviceRegistrationState_deviceRegistrationState_Sidewalk_sidewalk_DeviceRegistrationState_AmazonIdEventTopic;
                requestDeviceRegistrationState_deviceRegistrationState_SidewalkIsNull = false;
            }
            // determine if requestDeviceRegistrationState_deviceRegistrationState_Sidewalk should be set to null
            if (requestDeviceRegistrationState_deviceRegistrationState_SidewalkIsNull)
            {
                requestDeviceRegistrationState_deviceRegistrationState_Sidewalk = null;
            }
            if (requestDeviceRegistrationState_deviceRegistrationState_Sidewalk != null)
            {
                request.DeviceRegistrationState.Sidewalk = requestDeviceRegistrationState_deviceRegistrationState_Sidewalk;
                requestDeviceRegistrationStateIsNull     = false;
            }
            // determine if request.DeviceRegistrationState should be set to null
            if (requestDeviceRegistrationStateIsNull)
            {
                request.DeviceRegistrationState = null;
            }
            if (cmdletContext.Identifier != null)
            {
                request.Identifier = cmdletContext.Identifier;
            }
            if (cmdletContext.IdentifierType != null)
            {
                request.IdentifierType = cmdletContext.IdentifierType;
            }
            if (cmdletContext.PartnerType != null)
            {
                request.PartnerType = cmdletContext.PartnerType;
            }

            // populate Proximity
            var requestProximityIsNull = true;

            request.Proximity = new Amazon.IoTWireless.Model.ProximityEventConfiguration();
            Amazon.IoTWireless.Model.SidewalkEventNotificationConfigurations requestProximity_proximity_Sidewalk = null;

            // populate Sidewalk
            var requestProximity_proximity_SidewalkIsNull = true;

            requestProximity_proximity_Sidewalk = new Amazon.IoTWireless.Model.SidewalkEventNotificationConfigurations();
            Amazon.IoTWireless.EventNotificationTopicStatus requestProximity_proximity_Sidewalk_sidewalk_AmazonIdEventTopic = null;
            if (cmdletContext.Sidewalk_AmazonIdEventTopic != null)
            {
                requestProximity_proximity_Sidewalk_sidewalk_AmazonIdEventTopic = cmdletContext.Sidewalk_AmazonIdEventTopic;
            }
            if (requestProximity_proximity_Sidewalk_sidewalk_AmazonIdEventTopic != null)
            {
                requestProximity_proximity_Sidewalk.AmazonIdEventTopic = requestProximity_proximity_Sidewalk_sidewalk_AmazonIdEventTopic;
                requestProximity_proximity_SidewalkIsNull = false;
            }
            // determine if requestProximity_proximity_Sidewalk should be set to null
            if (requestProximity_proximity_SidewalkIsNull)
            {
                requestProximity_proximity_Sidewalk = null;
            }
            if (requestProximity_proximity_Sidewalk != null)
            {
                request.Proximity.Sidewalk = requestProximity_proximity_Sidewalk;
                requestProximityIsNull     = false;
            }
            // determine if request.Proximity should be set to null
            if (requestProximityIsNull)
            {
                request.Proximity = 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);
        }