private Amazon.QLDB.Model.GetRevisionResponse CallAWSServiceOperation(IAmazonQLDB client, Amazon.QLDB.Model.GetRevisionRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon QLDB", "GetRevision");
     try
     {
         #if DESKTOP
         return(client.GetRevision(request));
         #elif CORECLR
         return(client.GetRevisionAsync(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.QLDB.Model.GetRevisionRequest();


            // populate BlockAddress
            var requestBlockAddressIsNull = true;

            request.BlockAddress = new Amazon.QLDB.Model.ValueHolder();
            System.String requestBlockAddress_blockAddress_IonText = null;
            if (cmdletContext.BlockAddress_IonText != null)
            {
                requestBlockAddress_blockAddress_IonText = cmdletContext.BlockAddress_IonText;
            }
            if (requestBlockAddress_blockAddress_IonText != null)
            {
                request.BlockAddress.IonText = requestBlockAddress_blockAddress_IonText;
                requestBlockAddressIsNull    = false;
            }
            // determine if request.BlockAddress should be set to null
            if (requestBlockAddressIsNull)
            {
                request.BlockAddress = null;
            }

            // populate DigestTipAddress
            var requestDigestTipAddressIsNull = true;

            request.DigestTipAddress = new Amazon.QLDB.Model.ValueHolder();
            System.String requestDigestTipAddress_digestTipAddress_IonText = null;
            if (cmdletContext.DigestTipAddress_IonText != null)
            {
                requestDigestTipAddress_digestTipAddress_IonText = cmdletContext.DigestTipAddress_IonText;
            }
            if (requestDigestTipAddress_digestTipAddress_IonText != null)
            {
                request.DigestTipAddress.IonText = requestDigestTipAddress_digestTipAddress_IonText;
                requestDigestTipAddressIsNull    = false;
            }
            // determine if request.DigestTipAddress should be set to null
            if (requestDigestTipAddressIsNull)
            {
                request.DigestTipAddress = null;
            }
            if (cmdletContext.DocumentId != null)
            {
                request.DocumentId = cmdletContext.DocumentId;
            }
            if (cmdletContext.Name != null)
            {
                request.Name = cmdletContext.Name;
            }

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