Beispiel #1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.Kafka.Model.UpdateMonitoringRequest();

            if (cmdletContext.ClusterArn != null)
            {
                request.ClusterArn = cmdletContext.ClusterArn;
            }
            if (cmdletContext.CurrentVersion != null)
            {
                request.CurrentVersion = cmdletContext.CurrentVersion;
            }
            if (cmdletContext.EnhancedMonitoring != null)
            {
                request.EnhancedMonitoring = cmdletContext.EnhancedMonitoring;
            }

            // populate LoggingInfo
            var requestLoggingInfoIsNull = true;

            request.LoggingInfo = new Amazon.Kafka.Model.LoggingInfo();
            Amazon.Kafka.Model.BrokerLogs requestLoggingInfo_loggingInfo_BrokerLogs = null;

            // populate BrokerLogs
            var requestLoggingInfo_loggingInfo_BrokerLogsIsNull = true;

            requestLoggingInfo_loggingInfo_BrokerLogs = new Amazon.Kafka.Model.BrokerLogs();
            Amazon.Kafka.Model.CloudWatchLogs requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs = null;

            // populate CloudWatchLogs
            var requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogsIsNull = true;

            requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs = new Amazon.Kafka.Model.CloudWatchLogs();
            System.Boolean?requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_Enabled = null;
            if (cmdletContext.CloudWatchLogs_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_Enabled = cmdletContext.CloudWatchLogs_Enabled.Value;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs.Enabled = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_Enabled.Value;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogsIsNull   = false;
            }
            System.String requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_LogGroup = null;
            if (cmdletContext.CloudWatchLogs_LogGroup != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_LogGroup = cmdletContext.CloudWatchLogs_LogGroup;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_LogGroup != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs.LogGroup = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_LogGroup;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogsIsNull    = false;
            }
            // determine if requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs should be set to null
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogsIsNull)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs = null;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs.CloudWatchLogs = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs;
                requestLoggingInfo_loggingInfo_BrokerLogsIsNull          = false;
            }
            Amazon.Kafka.Model.Firehose requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose = null;

            // populate Firehose
            var requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_FirehoseIsNull = true;

            requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose = new Amazon.Kafka.Model.Firehose();
            System.String requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_DeliveryStream = null;
            if (cmdletContext.Firehose_DeliveryStream != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_DeliveryStream = cmdletContext.Firehose_DeliveryStream;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_DeliveryStream != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose.DeliveryStream = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_DeliveryStream;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_FirehoseIsNull          = false;
            }
            System.Boolean?requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_Enabled = null;
            if (cmdletContext.Firehose_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_Enabled = cmdletContext.Firehose_Enabled.Value;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose.Enabled = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_Enabled.Value;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_FirehoseIsNull   = false;
            }
            // determine if requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose should be set to null
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_FirehoseIsNull)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose = null;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs.Firehose = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose;
                requestLoggingInfo_loggingInfo_BrokerLogsIsNull    = false;
            }
            Amazon.Kafka.Model.S3 requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3 = null;

            // populate S3
            var requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3IsNull = true;

            requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3 = new Amazon.Kafka.Model.S3();
            System.String requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Bucket = null;
            if (cmdletContext.S3_Bucket != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Bucket = cmdletContext.S3_Bucket;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Bucket != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3.Bucket = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Bucket;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3IsNull  = false;
            }
            System.Boolean?requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Enabled = null;
            if (cmdletContext.S3_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Enabled = cmdletContext.S3_Enabled.Value;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3.Enabled = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Enabled.Value;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3IsNull   = false;
            }
            System.String requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Prefix = null;
            if (cmdletContext.S3_Prefix != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Prefix = cmdletContext.S3_Prefix;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Prefix != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3.Prefix = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Prefix;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3IsNull  = false;
            }
            // determine if requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3 should be set to null
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3IsNull)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3 = null;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3 != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs.S3    = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3;
                requestLoggingInfo_loggingInfo_BrokerLogsIsNull = false;
            }
            // determine if requestLoggingInfo_loggingInfo_BrokerLogs should be set to null
            if (requestLoggingInfo_loggingInfo_BrokerLogsIsNull)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs = null;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs != null)
            {
                request.LoggingInfo.BrokerLogs = requestLoggingInfo_loggingInfo_BrokerLogs;
                requestLoggingInfoIsNull       = false;
            }
            // determine if request.LoggingInfo should be set to null
            if (requestLoggingInfoIsNull)
            {
                request.LoggingInfo = null;
            }

            // populate OpenMonitoring
            var requestOpenMonitoringIsNull = true;

            request.OpenMonitoring = new Amazon.Kafka.Model.OpenMonitoringInfo();
            Amazon.Kafka.Model.PrometheusInfo requestOpenMonitoring_openMonitoring_Prometheus = null;

            // populate Prometheus
            var requestOpenMonitoring_openMonitoring_PrometheusIsNull = true;

            requestOpenMonitoring_openMonitoring_Prometheus = new Amazon.Kafka.Model.PrometheusInfo();
            Amazon.Kafka.Model.JmxExporterInfo requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter = null;

            // populate JmxExporter
            var requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporterIsNull = true;

            requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter = new Amazon.Kafka.Model.JmxExporterInfo();
            System.Boolean?requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter_jmxExporter_EnabledInBroker = null;
            if (cmdletContext.JmxExporter_EnabledInBroker != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter_jmxExporter_EnabledInBroker = cmdletContext.JmxExporter_EnabledInBroker.Value;
            }
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter_jmxExporter_EnabledInBroker != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter.EnabledInBroker = requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter_jmxExporter_EnabledInBroker.Value;
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporterIsNull           = false;
            }
            // determine if requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter should be set to null
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporterIsNull)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter = null;
            }
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus.JmxExporter = requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter;
                requestOpenMonitoring_openMonitoring_PrometheusIsNull       = false;
            }
            Amazon.Kafka.Model.NodeExporterInfo requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter = null;

            // populate NodeExporter
            var requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporterIsNull = true;

            requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter = new Amazon.Kafka.Model.NodeExporterInfo();
            System.Boolean?requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter_nodeExporter_EnabledInBroker = null;
            if (cmdletContext.NodeExporter_EnabledInBroker != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter_nodeExporter_EnabledInBroker = cmdletContext.NodeExporter_EnabledInBroker.Value;
            }
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter_nodeExporter_EnabledInBroker != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter.EnabledInBroker = requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter_nodeExporter_EnabledInBroker.Value;
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporterIsNull           = false;
            }
            // determine if requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter should be set to null
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporterIsNull)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter = null;
            }
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus.NodeExporter = requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter;
                requestOpenMonitoring_openMonitoring_PrometheusIsNull        = false;
            }
            // determine if requestOpenMonitoring_openMonitoring_Prometheus should be set to null
            if (requestOpenMonitoring_openMonitoring_PrometheusIsNull)
            {
                requestOpenMonitoring_openMonitoring_Prometheus = null;
            }
            if (requestOpenMonitoring_openMonitoring_Prometheus != null)
            {
                request.OpenMonitoring.Prometheus = requestOpenMonitoring_openMonitoring_Prometheus;
                requestOpenMonitoringIsNull       = false;
            }
            // determine if request.OpenMonitoring should be set to null
            if (requestOpenMonitoringIsNull)
            {
                request.OpenMonitoring = 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);
        }
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.Kafka.Model.CreateClusterRequest();

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

            // populate ClientAuthentication
            var requestClientAuthenticationIsNull = true;

            request.ClientAuthentication = new Amazon.Kafka.Model.ClientAuthentication();
            Amazon.Kafka.Model.Tls requestClientAuthentication_clientAuthentication_Tls = null;

            // populate Tls
            var requestClientAuthentication_clientAuthentication_TlsIsNull = true;

            requestClientAuthentication_clientAuthentication_Tls = new Amazon.Kafka.Model.Tls();
            List <System.String> requestClientAuthentication_clientAuthentication_Tls_tls_CertificateAuthorityArnList = null;

            if (cmdletContext.Tls_CertificateAuthorityArnList != null)
            {
                requestClientAuthentication_clientAuthentication_Tls_tls_CertificateAuthorityArnList = cmdletContext.Tls_CertificateAuthorityArnList;
            }
            if (requestClientAuthentication_clientAuthentication_Tls_tls_CertificateAuthorityArnList != null)
            {
                requestClientAuthentication_clientAuthentication_Tls.CertificateAuthorityArnList = requestClientAuthentication_clientAuthentication_Tls_tls_CertificateAuthorityArnList;
                requestClientAuthentication_clientAuthentication_TlsIsNull = false;
            }
            // determine if requestClientAuthentication_clientAuthentication_Tls should be set to null
            if (requestClientAuthentication_clientAuthentication_TlsIsNull)
            {
                requestClientAuthentication_clientAuthentication_Tls = null;
            }
            if (requestClientAuthentication_clientAuthentication_Tls != null)
            {
                request.ClientAuthentication.Tls  = requestClientAuthentication_clientAuthentication_Tls;
                requestClientAuthenticationIsNull = false;
            }
            // determine if request.ClientAuthentication should be set to null
            if (requestClientAuthenticationIsNull)
            {
                request.ClientAuthentication = null;
            }
            if (cmdletContext.ClusterName != null)
            {
                request.ClusterName = cmdletContext.ClusterName;
            }

            // populate ConfigurationInfo
            var requestConfigurationInfoIsNull = true;

            request.ConfigurationInfo = new Amazon.Kafka.Model.ConfigurationInfo();
            System.String requestConfigurationInfo_configurationInfo_Arn = null;
            if (cmdletContext.ConfigurationInfo_Arn != null)
            {
                requestConfigurationInfo_configurationInfo_Arn = cmdletContext.ConfigurationInfo_Arn;
            }
            if (requestConfigurationInfo_configurationInfo_Arn != null)
            {
                request.ConfigurationInfo.Arn  = requestConfigurationInfo_configurationInfo_Arn;
                requestConfigurationInfoIsNull = false;
            }
            System.Int64?requestConfigurationInfo_configurationInfo_Revision = null;
            if (cmdletContext.ConfigurationInfo_Revision != null)
            {
                requestConfigurationInfo_configurationInfo_Revision = cmdletContext.ConfigurationInfo_Revision.Value;
            }
            if (requestConfigurationInfo_configurationInfo_Revision != null)
            {
                request.ConfigurationInfo.Revision = requestConfigurationInfo_configurationInfo_Revision.Value;
                requestConfigurationInfoIsNull     = false;
            }
            // determine if request.ConfigurationInfo should be set to null
            if (requestConfigurationInfoIsNull)
            {
                request.ConfigurationInfo = null;
            }

            // populate EncryptionInfo
            var requestEncryptionInfoIsNull = true;

            request.EncryptionInfo = new Amazon.Kafka.Model.EncryptionInfo();
            Amazon.Kafka.Model.EncryptionAtRest requestEncryptionInfo_encryptionInfo_EncryptionAtRest = null;

            // populate EncryptionAtRest
            var requestEncryptionInfo_encryptionInfo_EncryptionAtRestIsNull = true;

            requestEncryptionInfo_encryptionInfo_EncryptionAtRest = new Amazon.Kafka.Model.EncryptionAtRest();
            System.String requestEncryptionInfo_encryptionInfo_EncryptionAtRest_encryptionAtRest_DataVolumeKMSKeyId = null;
            if (cmdletContext.EncryptionAtRest_DataVolumeKMSKeyId != null)
            {
                requestEncryptionInfo_encryptionInfo_EncryptionAtRest_encryptionAtRest_DataVolumeKMSKeyId = cmdletContext.EncryptionAtRest_DataVolumeKMSKeyId;
            }
            if (requestEncryptionInfo_encryptionInfo_EncryptionAtRest_encryptionAtRest_DataVolumeKMSKeyId != null)
            {
                requestEncryptionInfo_encryptionInfo_EncryptionAtRest.DataVolumeKMSKeyId = requestEncryptionInfo_encryptionInfo_EncryptionAtRest_encryptionAtRest_DataVolumeKMSKeyId;
                requestEncryptionInfo_encryptionInfo_EncryptionAtRestIsNull = false;
            }
            // determine if requestEncryptionInfo_encryptionInfo_EncryptionAtRest should be set to null
            if (requestEncryptionInfo_encryptionInfo_EncryptionAtRestIsNull)
            {
                requestEncryptionInfo_encryptionInfo_EncryptionAtRest = null;
            }
            if (requestEncryptionInfo_encryptionInfo_EncryptionAtRest != null)
            {
                request.EncryptionInfo.EncryptionAtRest = requestEncryptionInfo_encryptionInfo_EncryptionAtRest;
                requestEncryptionInfoIsNull             = false;
            }
            Amazon.Kafka.Model.EncryptionInTransit requestEncryptionInfo_encryptionInfo_EncryptionInTransit = null;

            // populate EncryptionInTransit
            var requestEncryptionInfo_encryptionInfo_EncryptionInTransitIsNull = true;

            requestEncryptionInfo_encryptionInfo_EncryptionInTransit = new Amazon.Kafka.Model.EncryptionInTransit();
            Amazon.Kafka.ClientBroker requestEncryptionInfo_encryptionInfo_EncryptionInTransit_encryptionInTransit_ClientBroker = null;
            if (cmdletContext.EncryptionInTransit_ClientBroker != null)
            {
                requestEncryptionInfo_encryptionInfo_EncryptionInTransit_encryptionInTransit_ClientBroker = cmdletContext.EncryptionInTransit_ClientBroker;
            }
            if (requestEncryptionInfo_encryptionInfo_EncryptionInTransit_encryptionInTransit_ClientBroker != null)
            {
                requestEncryptionInfo_encryptionInfo_EncryptionInTransit.ClientBroker = requestEncryptionInfo_encryptionInfo_EncryptionInTransit_encryptionInTransit_ClientBroker;
                requestEncryptionInfo_encryptionInfo_EncryptionInTransitIsNull        = false;
            }
            System.Boolean?requestEncryptionInfo_encryptionInfo_EncryptionInTransit_encryptionInTransit_InCluster = null;
            if (cmdletContext.EncryptionInTransit_InCluster != null)
            {
                requestEncryptionInfo_encryptionInfo_EncryptionInTransit_encryptionInTransit_InCluster = cmdletContext.EncryptionInTransit_InCluster.Value;
            }
            if (requestEncryptionInfo_encryptionInfo_EncryptionInTransit_encryptionInTransit_InCluster != null)
            {
                requestEncryptionInfo_encryptionInfo_EncryptionInTransit.InCluster = requestEncryptionInfo_encryptionInfo_EncryptionInTransit_encryptionInTransit_InCluster.Value;
                requestEncryptionInfo_encryptionInfo_EncryptionInTransitIsNull     = false;
            }
            // determine if requestEncryptionInfo_encryptionInfo_EncryptionInTransit should be set to null
            if (requestEncryptionInfo_encryptionInfo_EncryptionInTransitIsNull)
            {
                requestEncryptionInfo_encryptionInfo_EncryptionInTransit = null;
            }
            if (requestEncryptionInfo_encryptionInfo_EncryptionInTransit != null)
            {
                request.EncryptionInfo.EncryptionInTransit = requestEncryptionInfo_encryptionInfo_EncryptionInTransit;
                requestEncryptionInfoIsNull = false;
            }
            // determine if request.EncryptionInfo should be set to null
            if (requestEncryptionInfoIsNull)
            {
                request.EncryptionInfo = null;
            }
            if (cmdletContext.EnhancedMonitoring != null)
            {
                request.EnhancedMonitoring = cmdletContext.EnhancedMonitoring;
            }
            if (cmdletContext.KafkaVersion != null)
            {
                request.KafkaVersion = cmdletContext.KafkaVersion;
            }

            // populate LoggingInfo
            var requestLoggingInfoIsNull = true;

            request.LoggingInfo = new Amazon.Kafka.Model.LoggingInfo();
            Amazon.Kafka.Model.BrokerLogs requestLoggingInfo_loggingInfo_BrokerLogs = null;

            // populate BrokerLogs
            var requestLoggingInfo_loggingInfo_BrokerLogsIsNull = true;

            requestLoggingInfo_loggingInfo_BrokerLogs = new Amazon.Kafka.Model.BrokerLogs();
            Amazon.Kafka.Model.CloudWatchLogs requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs = null;

            // populate CloudWatchLogs
            var requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogsIsNull = true;

            requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs = new Amazon.Kafka.Model.CloudWatchLogs();
            System.Boolean?requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_Enabled = null;
            if (cmdletContext.CloudWatchLogs_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_Enabled = cmdletContext.CloudWatchLogs_Enabled.Value;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs.Enabled = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_Enabled.Value;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogsIsNull   = false;
            }
            System.String requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_LogGroup = null;
            if (cmdletContext.CloudWatchLogs_LogGroup != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_LogGroup = cmdletContext.CloudWatchLogs_LogGroup;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_LogGroup != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs.LogGroup = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs_cloudWatchLogs_LogGroup;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogsIsNull    = false;
            }
            // determine if requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs should be set to null
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogsIsNull)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs = null;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs.CloudWatchLogs = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_CloudWatchLogs;
                requestLoggingInfo_loggingInfo_BrokerLogsIsNull          = false;
            }
            Amazon.Kafka.Model.Firehose requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose = null;

            // populate Firehose
            var requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_FirehoseIsNull = true;

            requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose = new Amazon.Kafka.Model.Firehose();
            System.String requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_DeliveryStream = null;
            if (cmdletContext.Firehose_DeliveryStream != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_DeliveryStream = cmdletContext.Firehose_DeliveryStream;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_DeliveryStream != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose.DeliveryStream = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_DeliveryStream;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_FirehoseIsNull          = false;
            }
            System.Boolean?requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_Enabled = null;
            if (cmdletContext.Firehose_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_Enabled = cmdletContext.Firehose_Enabled.Value;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose.Enabled = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose_firehose_Enabled.Value;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_FirehoseIsNull   = false;
            }
            // determine if requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose should be set to null
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_FirehoseIsNull)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose = null;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs.Firehose = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_Firehose;
                requestLoggingInfo_loggingInfo_BrokerLogsIsNull    = false;
            }
            Amazon.Kafka.Model.S3 requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3 = null;

            // populate S3
            var requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3IsNull = true;

            requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3 = new Amazon.Kafka.Model.S3();
            System.String requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Bucket = null;
            if (cmdletContext.S3_Bucket != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Bucket = cmdletContext.S3_Bucket;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Bucket != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3.Bucket = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Bucket;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3IsNull  = false;
            }
            System.Boolean?requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Enabled = null;
            if (cmdletContext.S3_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Enabled = cmdletContext.S3_Enabled.Value;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Enabled != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3.Enabled = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Enabled.Value;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3IsNull   = false;
            }
            System.String requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Prefix = null;
            if (cmdletContext.S3_Prefix != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Prefix = cmdletContext.S3_Prefix;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Prefix != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3.Prefix = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3_s3_Prefix;
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3IsNull  = false;
            }
            // determine if requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3 should be set to null
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3IsNull)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3 = null;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3 != null)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs.S3    = requestLoggingInfo_loggingInfo_BrokerLogs_loggingInfo_BrokerLogs_S3;
                requestLoggingInfo_loggingInfo_BrokerLogsIsNull = false;
            }
            // determine if requestLoggingInfo_loggingInfo_BrokerLogs should be set to null
            if (requestLoggingInfo_loggingInfo_BrokerLogsIsNull)
            {
                requestLoggingInfo_loggingInfo_BrokerLogs = null;
            }
            if (requestLoggingInfo_loggingInfo_BrokerLogs != null)
            {
                request.LoggingInfo.BrokerLogs = requestLoggingInfo_loggingInfo_BrokerLogs;
                requestLoggingInfoIsNull       = false;
            }
            // determine if request.LoggingInfo should be set to null
            if (requestLoggingInfoIsNull)
            {
                request.LoggingInfo = null;
            }
            if (cmdletContext.NumberOfBrokerNode != null)
            {
                request.NumberOfBrokerNodes = cmdletContext.NumberOfBrokerNode.Value;
            }

            // populate OpenMonitoring
            var requestOpenMonitoringIsNull = true;

            request.OpenMonitoring = new Amazon.Kafka.Model.OpenMonitoringInfo();
            Amazon.Kafka.Model.PrometheusInfo requestOpenMonitoring_openMonitoring_Prometheus = null;

            // populate Prometheus
            var requestOpenMonitoring_openMonitoring_PrometheusIsNull = true;

            requestOpenMonitoring_openMonitoring_Prometheus = new Amazon.Kafka.Model.PrometheusInfo();
            Amazon.Kafka.Model.JmxExporterInfo requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter = null;

            // populate JmxExporter
            var requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporterIsNull = true;

            requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter = new Amazon.Kafka.Model.JmxExporterInfo();
            System.Boolean?requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter_jmxExporter_EnabledInBroker = null;
            if (cmdletContext.JmxExporter_EnabledInBroker != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter_jmxExporter_EnabledInBroker = cmdletContext.JmxExporter_EnabledInBroker.Value;
            }
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter_jmxExporter_EnabledInBroker != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter.EnabledInBroker = requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter_jmxExporter_EnabledInBroker.Value;
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporterIsNull           = false;
            }
            // determine if requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter should be set to null
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporterIsNull)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter = null;
            }
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus.JmxExporter = requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_JmxExporter;
                requestOpenMonitoring_openMonitoring_PrometheusIsNull       = false;
            }
            Amazon.Kafka.Model.NodeExporterInfo requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter = null;

            // populate NodeExporter
            var requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporterIsNull = true;

            requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter = new Amazon.Kafka.Model.NodeExporterInfo();
            System.Boolean?requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter_nodeExporter_EnabledInBroker = null;
            if (cmdletContext.NodeExporter_EnabledInBroker != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter_nodeExporter_EnabledInBroker = cmdletContext.NodeExporter_EnabledInBroker.Value;
            }
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter_nodeExporter_EnabledInBroker != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter.EnabledInBroker = requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter_nodeExporter_EnabledInBroker.Value;
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporterIsNull           = false;
            }
            // determine if requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter should be set to null
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporterIsNull)
            {
                requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter = null;
            }
            if (requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter != null)
            {
                requestOpenMonitoring_openMonitoring_Prometheus.NodeExporter = requestOpenMonitoring_openMonitoring_Prometheus_openMonitoring_Prometheus_NodeExporter;
                requestOpenMonitoring_openMonitoring_PrometheusIsNull        = false;
            }
            // determine if requestOpenMonitoring_openMonitoring_Prometheus should be set to null
            if (requestOpenMonitoring_openMonitoring_PrometheusIsNull)
            {
                requestOpenMonitoring_openMonitoring_Prometheus = null;
            }
            if (requestOpenMonitoring_openMonitoring_Prometheus != null)
            {
                request.OpenMonitoring.Prometheus = requestOpenMonitoring_openMonitoring_Prometheus;
                requestOpenMonitoringIsNull       = false;
            }
            // determine if request.OpenMonitoring should be set to null
            if (requestOpenMonitoringIsNull)
            {
                request.OpenMonitoring = null;
            }
            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);
        }