private Amazon.FMS.Model.PutAppsListResponse CallAWSServiceOperation(IAmazonFMS client, Amazon.FMS.Model.PutAppsListRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Firewall Management Service", "PutAppsList");
     try
     {
         #if DESKTOP
         return(client.PutAppsList(request));
         #elif CORECLR
         return(client.PutAppsListAsync(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.FMS.Model.PutAppsListRequest();


            // populate AppsList
            var requestAppsListIsNull = true;

            request.AppsList = new Amazon.FMS.Model.AppsListData();
            List <Amazon.FMS.Model.App> requestAppsList_appsList_AppsList = null;

            if (cmdletContext.AppsList_AppsList != null)
            {
                requestAppsList_appsList_AppsList = cmdletContext.AppsList_AppsList;
            }
            if (requestAppsList_appsList_AppsList != null)
            {
                request.AppsList.AppsList = requestAppsList_appsList_AppsList;
                requestAppsListIsNull     = false;
            }
            System.DateTime?requestAppsList_appsList_CreateTime = null;
            if (cmdletContext.AppsList_CreateTime != null)
            {
                requestAppsList_appsList_CreateTime = cmdletContext.AppsList_CreateTime.Value;
            }
            if (requestAppsList_appsList_CreateTime != null)
            {
                request.AppsList.CreateTime = requestAppsList_appsList_CreateTime.Value;
                requestAppsListIsNull       = false;
            }
            System.DateTime?requestAppsList_appsList_LastUpdateTime = null;
            if (cmdletContext.AppsList_LastUpdateTime != null)
            {
                requestAppsList_appsList_LastUpdateTime = cmdletContext.AppsList_LastUpdateTime.Value;
            }
            if (requestAppsList_appsList_LastUpdateTime != null)
            {
                request.AppsList.LastUpdateTime = requestAppsList_appsList_LastUpdateTime.Value;
                requestAppsListIsNull           = false;
            }
            System.String requestAppsList_appsList_ListId = null;
            if (cmdletContext.AppsList_ListId != null)
            {
                requestAppsList_appsList_ListId = cmdletContext.AppsList_ListId;
            }
            if (requestAppsList_appsList_ListId != null)
            {
                request.AppsList.ListId = requestAppsList_appsList_ListId;
                requestAppsListIsNull   = false;
            }
            System.String requestAppsList_appsList_ListName = null;
            if (cmdletContext.AppsList_ListName != null)
            {
                requestAppsList_appsList_ListName = cmdletContext.AppsList_ListName;
            }
            if (requestAppsList_appsList_ListName != null)
            {
                request.AppsList.ListName = requestAppsList_appsList_ListName;
                requestAppsListIsNull     = false;
            }
            System.String requestAppsList_appsList_ListUpdateToken = null;
            if (cmdletContext.AppsList_ListUpdateToken != null)
            {
                requestAppsList_appsList_ListUpdateToken = cmdletContext.AppsList_ListUpdateToken;
            }
            if (requestAppsList_appsList_ListUpdateToken != null)
            {
                request.AppsList.ListUpdateToken = requestAppsList_appsList_ListUpdateToken;
                requestAppsListIsNull            = false;
            }
            Dictionary <System.String, List <Amazon.FMS.Model.App> > requestAppsList_appsList_PreviousAppsList = null;

            if (cmdletContext.AppsList_PreviousAppsList != null)
            {
                requestAppsList_appsList_PreviousAppsList = cmdletContext.AppsList_PreviousAppsList;
            }
            if (requestAppsList_appsList_PreviousAppsList != null)
            {
                request.AppsList.PreviousAppsList = requestAppsList_appsList_PreviousAppsList;
                requestAppsListIsNull             = false;
            }
            // determine if request.AppsList should be set to null
            if (requestAppsListIsNull)
            {
                request.AppsList = null;
            }
            if (cmdletContext.TagList != null)
            {
                request.TagList = cmdletContext.TagList;
            }

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