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

            if (cmdletContext.ExclusiveEndTime != null)
            {
                request.ExclusiveEndTime = cmdletContext.ExclusiveEndTime.Value;
            }
            if (cmdletContext.InclusiveStartTime != null)
            {
                request.InclusiveStartTime = cmdletContext.InclusiveStartTime.Value;
            }

            // populate KinesisConfiguration
            var requestKinesisConfigurationIsNull = true;

            request.KinesisConfiguration = new Amazon.QLDB.Model.KinesisConfiguration();
            System.Boolean?requestKinesisConfiguration_kinesisConfiguration_AggregationEnabled = null;
            if (cmdletContext.KinesisConfiguration_AggregationEnabled != null)
            {
                requestKinesisConfiguration_kinesisConfiguration_AggregationEnabled = cmdletContext.KinesisConfiguration_AggregationEnabled.Value;
            }
            if (requestKinesisConfiguration_kinesisConfiguration_AggregationEnabled != null)
            {
                request.KinesisConfiguration.AggregationEnabled = requestKinesisConfiguration_kinesisConfiguration_AggregationEnabled.Value;
                requestKinesisConfigurationIsNull = false;
            }
            System.String requestKinesisConfiguration_kinesisConfiguration_StreamArn = null;
            if (cmdletContext.KinesisConfiguration_StreamArn != null)
            {
                requestKinesisConfiguration_kinesisConfiguration_StreamArn = cmdletContext.KinesisConfiguration_StreamArn;
            }
            if (requestKinesisConfiguration_kinesisConfiguration_StreamArn != null)
            {
                request.KinesisConfiguration.StreamArn = requestKinesisConfiguration_kinesisConfiguration_StreamArn;
                requestKinesisConfigurationIsNull      = false;
            }
            // determine if request.KinesisConfiguration should be set to null
            if (requestKinesisConfigurationIsNull)
            {
                request.KinesisConfiguration = null;
            }
            if (cmdletContext.LedgerName != null)
            {
                request.LedgerName = cmdletContext.LedgerName;
            }
            if (cmdletContext.RoleArn != null)
            {
                request.RoleArn = cmdletContext.RoleArn;
            }
            if (cmdletContext.StreamName != null)
            {
                request.StreamName = cmdletContext.StreamName;
            }
            if (cmdletContext.Tag != null)
            {
                request.Tags = cmdletContext.Tag;
            }

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