private Amazon.Pinpoint.Model.UpdateApnsVoipChannelResponse CallAWSServiceOperation(IAmazonPinpoint client, Amazon.Pinpoint.Model.UpdateApnsVoipChannelRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Pinpoint", "UpdateApnsVoipChannel");
     try
     {
         #if DESKTOP
         return(client.UpdateApnsVoipChannel(request));
         #elif CORECLR
         return(client.UpdateApnsVoipChannelAsync(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.Pinpoint.Model.UpdateApnsVoipChannelRequest();


            // populate APNSVoipChannelRequest
            var requestAPNSVoipChannelRequestIsNull = true;

            request.APNSVoipChannelRequest = new Amazon.Pinpoint.Model.APNSVoipChannelRequest();
            System.String requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_BundleId = null;
            if (cmdletContext.APNSVoipChannelRequest_BundleId != null)
            {
                requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_BundleId = cmdletContext.APNSVoipChannelRequest_BundleId;
            }
            if (requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_BundleId != null)
            {
                request.APNSVoipChannelRequest.BundleId = requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_BundleId;
                requestAPNSVoipChannelRequestIsNull     = false;
            }
            System.String requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_Certificate = null;
            if (cmdletContext.APNSVoipChannelRequest_Certificate != null)
            {
                requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_Certificate = cmdletContext.APNSVoipChannelRequest_Certificate;
            }
            if (requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_Certificate != null)
            {
                request.APNSVoipChannelRequest.Certificate = requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_Certificate;
                requestAPNSVoipChannelRequestIsNull        = false;
            }
            System.String requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_DefaultAuthenticationMethod = null;
            if (cmdletContext.APNSVoipChannelRequest_DefaultAuthenticationMethod != null)
            {
                requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_DefaultAuthenticationMethod = cmdletContext.APNSVoipChannelRequest_DefaultAuthenticationMethod;
            }
            if (requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_DefaultAuthenticationMethod != null)
            {
                request.APNSVoipChannelRequest.DefaultAuthenticationMethod = requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_DefaultAuthenticationMethod;
                requestAPNSVoipChannelRequestIsNull = false;
            }
            System.Boolean?requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_Enabled = null;
            if (cmdletContext.APNSVoipChannelRequest_Enabled != null)
            {
                requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_Enabled = cmdletContext.APNSVoipChannelRequest_Enabled.Value;
            }
            if (requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_Enabled != null)
            {
                request.APNSVoipChannelRequest.Enabled = requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_Enabled.Value;
                requestAPNSVoipChannelRequestIsNull    = false;
            }
            System.String requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_PrivateKey = null;
            if (cmdletContext.APNSVoipChannelRequest_PrivateKey != null)
            {
                requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_PrivateKey = cmdletContext.APNSVoipChannelRequest_PrivateKey;
            }
            if (requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_PrivateKey != null)
            {
                request.APNSVoipChannelRequest.PrivateKey = requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_PrivateKey;
                requestAPNSVoipChannelRequestIsNull       = false;
            }
            System.String requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TeamId = null;
            if (cmdletContext.APNSVoipChannelRequest_TeamId != null)
            {
                requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TeamId = cmdletContext.APNSVoipChannelRequest_TeamId;
            }
            if (requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TeamId != null)
            {
                request.APNSVoipChannelRequest.TeamId = requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TeamId;
                requestAPNSVoipChannelRequestIsNull   = false;
            }
            System.String requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TokenKey = null;
            if (cmdletContext.APNSVoipChannelRequest_TokenKey != null)
            {
                requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TokenKey = cmdletContext.APNSVoipChannelRequest_TokenKey;
            }
            if (requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TokenKey != null)
            {
                request.APNSVoipChannelRequest.TokenKey = requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TokenKey;
                requestAPNSVoipChannelRequestIsNull     = false;
            }
            System.String requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TokenKeyId = null;
            if (cmdletContext.APNSVoipChannelRequest_TokenKeyId != null)
            {
                requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TokenKeyId = cmdletContext.APNSVoipChannelRequest_TokenKeyId;
            }
            if (requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TokenKeyId != null)
            {
                request.APNSVoipChannelRequest.TokenKeyId = requestAPNSVoipChannelRequest_aPNSVoipChannelRequest_TokenKeyId;
                requestAPNSVoipChannelRequestIsNull       = false;
            }
            // determine if request.APNSVoipChannelRequest should be set to null
            if (requestAPNSVoipChannelRequestIsNull)
            {
                request.APNSVoipChannelRequest = null;
            }
            if (cmdletContext.ApplicationId != null)
            {
                request.ApplicationId = cmdletContext.ApplicationId;
            }

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