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

            if (cmdletContext.ApplicationId != null)
            {
                request.ApplicationId = cmdletContext.ApplicationId;
            }

            // populate VerifyOTPMessageRequestParameters
            var requestVerifyOTPMessageRequestParametersIsNull = true;

            request.VerifyOTPMessageRequestParameters = new Amazon.Pinpoint.Model.VerifyOTPMessageRequestParameters();
            System.String requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_DestinationIdentity = null;
            if (cmdletContext.VerifyOTPMessageRequestParameters_DestinationIdentity != null)
            {
                requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_DestinationIdentity = cmdletContext.VerifyOTPMessageRequestParameters_DestinationIdentity;
            }
            if (requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_DestinationIdentity != null)
            {
                request.VerifyOTPMessageRequestParameters.DestinationIdentity = requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_DestinationIdentity;
                requestVerifyOTPMessageRequestParametersIsNull = false;
            }
            System.String requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_Otp = null;
            if (cmdletContext.VerifyOTPMessageRequestParameters_Otp != null)
            {
                requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_Otp = cmdletContext.VerifyOTPMessageRequestParameters_Otp;
            }
            if (requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_Otp != null)
            {
                request.VerifyOTPMessageRequestParameters.Otp  = requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_Otp;
                requestVerifyOTPMessageRequestParametersIsNull = false;
            }
            System.String requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_ReferenceId = null;
            if (cmdletContext.VerifyOTPMessageRequestParameters_ReferenceId != null)
            {
                requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_ReferenceId = cmdletContext.VerifyOTPMessageRequestParameters_ReferenceId;
            }
            if (requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_ReferenceId != null)
            {
                request.VerifyOTPMessageRequestParameters.ReferenceId = requestVerifyOTPMessageRequestParameters_verifyOTPMessageRequestParameters_ReferenceId;
                requestVerifyOTPMessageRequestParametersIsNull        = false;
            }
            // determine if request.VerifyOTPMessageRequestParameters should be set to null
            if (requestVerifyOTPMessageRequestParametersIsNull)
            {
                request.VerifyOTPMessageRequestParameters = 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);
        }