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


            // populate ProtocolsList
            var requestProtocolsListIsNull = true;

            request.ProtocolsList = new Amazon.FMS.Model.ProtocolsListData();
            System.DateTime?requestProtocolsList_protocolsList_CreateTime = null;
            if (cmdletContext.ProtocolsList_CreateTime != null)
            {
                requestProtocolsList_protocolsList_CreateTime = cmdletContext.ProtocolsList_CreateTime.Value;
            }
            if (requestProtocolsList_protocolsList_CreateTime != null)
            {
                request.ProtocolsList.CreateTime = requestProtocolsList_protocolsList_CreateTime.Value;
                requestProtocolsListIsNull       = false;
            }
            System.DateTime?requestProtocolsList_protocolsList_LastUpdateTime = null;
            if (cmdletContext.ProtocolsList_LastUpdateTime != null)
            {
                requestProtocolsList_protocolsList_LastUpdateTime = cmdletContext.ProtocolsList_LastUpdateTime.Value;
            }
            if (requestProtocolsList_protocolsList_LastUpdateTime != null)
            {
                request.ProtocolsList.LastUpdateTime = requestProtocolsList_protocolsList_LastUpdateTime.Value;
                requestProtocolsListIsNull           = false;
            }
            System.String requestProtocolsList_protocolsList_ListId = null;
            if (cmdletContext.ProtocolsList_ListId != null)
            {
                requestProtocolsList_protocolsList_ListId = cmdletContext.ProtocolsList_ListId;
            }
            if (requestProtocolsList_protocolsList_ListId != null)
            {
                request.ProtocolsList.ListId = requestProtocolsList_protocolsList_ListId;
                requestProtocolsListIsNull   = false;
            }
            System.String requestProtocolsList_protocolsList_ListName = null;
            if (cmdletContext.ProtocolsList_ListName != null)
            {
                requestProtocolsList_protocolsList_ListName = cmdletContext.ProtocolsList_ListName;
            }
            if (requestProtocolsList_protocolsList_ListName != null)
            {
                request.ProtocolsList.ListName = requestProtocolsList_protocolsList_ListName;
                requestProtocolsListIsNull     = false;
            }
            System.String requestProtocolsList_protocolsList_ListUpdateToken = null;
            if (cmdletContext.ProtocolsList_ListUpdateToken != null)
            {
                requestProtocolsList_protocolsList_ListUpdateToken = cmdletContext.ProtocolsList_ListUpdateToken;
            }
            if (requestProtocolsList_protocolsList_ListUpdateToken != null)
            {
                request.ProtocolsList.ListUpdateToken = requestProtocolsList_protocolsList_ListUpdateToken;
                requestProtocolsListIsNull            = false;
            }
            Dictionary <System.String, List <System.String> > requestProtocolsList_protocolsList_PreviousProtocolsList = null;

            if (cmdletContext.ProtocolsList_PreviousProtocolsList != null)
            {
                requestProtocolsList_protocolsList_PreviousProtocolsList = cmdletContext.ProtocolsList_PreviousProtocolsList;
            }
            if (requestProtocolsList_protocolsList_PreviousProtocolsList != null)
            {
                request.ProtocolsList.PreviousProtocolsList = requestProtocolsList_protocolsList_PreviousProtocolsList;
                requestProtocolsListIsNull = false;
            }
            List <System.String> requestProtocolsList_protocolsList_ProtocolsList = null;

            if (cmdletContext.ProtocolsList_ProtocolsList != null)
            {
                requestProtocolsList_protocolsList_ProtocolsList = cmdletContext.ProtocolsList_ProtocolsList;
            }
            if (requestProtocolsList_protocolsList_ProtocolsList != null)
            {
                request.ProtocolsList.ProtocolsList = requestProtocolsList_protocolsList_ProtocolsList;
                requestProtocolsListIsNull          = false;
            }
            // determine if request.ProtocolsList should be set to null
            if (requestProtocolsListIsNull)
            {
                request.ProtocolsList = 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);
        }