public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.WAF.Model.UpdateWebACLRequest(); if (cmdletContext.ChangeToken != null) { request.ChangeToken = cmdletContext.ChangeToken; } // populate DefaultAction var requestDefaultActionIsNull = true; request.DefaultAction = new Amazon.WAF.Model.WafAction(); Amazon.WAF.WafActionType requestDefaultAction_defaultAction_Type = null; if (cmdletContext.DefaultAction_Type != null) { requestDefaultAction_defaultAction_Type = cmdletContext.DefaultAction_Type; } if (requestDefaultAction_defaultAction_Type != null) { request.DefaultAction.Type = requestDefaultAction_defaultAction_Type; requestDefaultActionIsNull = false; } // determine if request.DefaultAction should be set to null if (requestDefaultActionIsNull) { request.DefaultAction = null; } if (cmdletContext.Update != null) { request.Updates = cmdletContext.Update; } if (cmdletContext.WebACLId != null) { request.WebACLId = cmdletContext.WebACLId; } 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); }