private Amazon.MediaConnect.Model.UpdateFlowOutputResponse CallAWSServiceOperation(IAmazonMediaConnect client, Amazon.MediaConnect.Model.UpdateFlowOutputRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elemental MediaConnect", "UpdateFlowOutput");
     try
     {
         #if DESKTOP
         return(client.UpdateFlowOutput(request));
         #elif CORECLR
         return(client.UpdateFlowOutputAsync(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.MediaConnect.Model.UpdateFlowOutputRequest();

            if (cmdletContext.CidrAllowList != null)
            {
                request.CidrAllowList = cmdletContext.CidrAllowList;
            }
            if (cmdletContext.Description != null)
            {
                request.Description = cmdletContext.Description;
            }
            if (cmdletContext.Destination != null)
            {
                request.Destination = cmdletContext.Destination;
            }
            if (cmdletContext.Encryption != null)
            {
                request.Encryption = cmdletContext.Encryption;
            }
            if (cmdletContext.FlowArn != null)
            {
                request.FlowArn = cmdletContext.FlowArn;
            }
            if (cmdletContext.MaxLatency != null)
            {
                request.MaxLatency = cmdletContext.MaxLatency.Value;
            }
            if (cmdletContext.OutputArn != null)
            {
                request.OutputArn = cmdletContext.OutputArn;
            }
            if (cmdletContext.Port != null)
            {
                request.Port = cmdletContext.Port.Value;
            }
            if (cmdletContext.Protocol != null)
            {
                request.Protocol = cmdletContext.Protocol;
            }
            if (cmdletContext.RemoteId != null)
            {
                request.RemoteId = cmdletContext.RemoteId;
            }
            if (cmdletContext.SmoothingLatency != null)
            {
                request.SmoothingLatency = cmdletContext.SmoothingLatency.Value;
            }
            if (cmdletContext.StreamId != null)
            {
                request.StreamId = cmdletContext.StreamId;
            }

            // populate VpcInterfaceAttachment
            var requestVpcInterfaceAttachmentIsNull = true;

            request.VpcInterfaceAttachment = new Amazon.MediaConnect.Model.VpcInterfaceAttachment();
            System.String requestVpcInterfaceAttachment_vpcInterfaceAttachment_VpcInterfaceName = null;
            if (cmdletContext.VpcInterfaceAttachment_VpcInterfaceName != null)
            {
                requestVpcInterfaceAttachment_vpcInterfaceAttachment_VpcInterfaceName = cmdletContext.VpcInterfaceAttachment_VpcInterfaceName;
            }
            if (requestVpcInterfaceAttachment_vpcInterfaceAttachment_VpcInterfaceName != null)
            {
                request.VpcInterfaceAttachment.VpcInterfaceName = requestVpcInterfaceAttachment_vpcInterfaceAttachment_VpcInterfaceName;
                requestVpcInterfaceAttachmentIsNull             = false;
            }
            // determine if request.VpcInterfaceAttachment should be set to null
            if (requestVpcInterfaceAttachmentIsNull)
            {
                request.VpcInterfaceAttachment = 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);
        }