private Amazon.AmplifyUIBuilder.Model.ExchangeCodeForTokenResponse CallAWSServiceOperation(IAmazonAmplifyUIBuilder client, Amazon.AmplifyUIBuilder.Model.ExchangeCodeForTokenRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Amplify UI Builder", "ExchangeCodeForToken");
     try
     {
         #if DESKTOP
         return client.ExchangeCodeForToken(request);
         #elif CORECLR
         return client.ExchangeCodeForTokenAsync(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.AmplifyUIBuilder.Model.ExchangeCodeForTokenRequest();
     
     if (cmdletContext.Provider != null)
     {
         request.Provider = cmdletContext.Provider;
     }
     
      // populate Request
     var requestRequestIsNull = true;
     request.Request = new Amazon.AmplifyUIBuilder.Model.ExchangeCodeForTokenRequestBody();
     System.String requestRequest_request_Code = null;
     if (cmdletContext.Request_Code != null)
     {
         requestRequest_request_Code = cmdletContext.Request_Code;
     }
     if (requestRequest_request_Code != null)
     {
         request.Request.Code = requestRequest_request_Code;
         requestRequestIsNull = false;
     }
     System.String requestRequest_request_RedirectUri = null;
     if (cmdletContext.Request_RedirectUri != null)
     {
         requestRequest_request_RedirectUri = cmdletContext.Request_RedirectUri;
     }
     if (requestRequest_request_RedirectUri != null)
     {
         request.Request.RedirectUri = requestRequest_request_RedirectUri;
         requestRequestIsNull = false;
     }
      // determine if request.Request should be set to null
     if (requestRequestIsNull)
     {
         request.Request = 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;
 }