public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.LexModelsV2.Model.CreateBotLocaleRequest();

            if (cmdletContext.BotId != null)
            {
                request.BotId = cmdletContext.BotId;
            }
            if (cmdletContext.BotVersion != null)
            {
                request.BotVersion = cmdletContext.BotVersion;
            }
            if (cmdletContext.Description != null)
            {
                request.Description = cmdletContext.Description;
            }
            if (cmdletContext.LocaleId != null)
            {
                request.LocaleId = cmdletContext.LocaleId;
            }
            if (cmdletContext.NluIntentConfidenceThreshold != null)
            {
                request.NluIntentConfidenceThreshold = cmdletContext.NluIntentConfidenceThreshold.Value;
            }

            // populate VoiceSettings
            var requestVoiceSettingsIsNull = true;

            request.VoiceSettings = new Amazon.LexModelsV2.Model.VoiceSettings();
            Amazon.LexModelsV2.VoiceEngine requestVoiceSettings_voiceSettings_Engine = null;
            if (cmdletContext.VoiceSettings_Engine != null)
            {
                requestVoiceSettings_voiceSettings_Engine = cmdletContext.VoiceSettings_Engine;
            }
            if (requestVoiceSettings_voiceSettings_Engine != null)
            {
                request.VoiceSettings.Engine = requestVoiceSettings_voiceSettings_Engine;
                requestVoiceSettingsIsNull   = false;
            }
            System.String requestVoiceSettings_voiceSettings_VoiceId = null;
            if (cmdletContext.VoiceSettings_VoiceId != null)
            {
                requestVoiceSettings_voiceSettings_VoiceId = cmdletContext.VoiceSettings_VoiceId;
            }
            if (requestVoiceSettings_voiceSettings_VoiceId != null)
            {
                request.VoiceSettings.VoiceId = requestVoiceSettings_voiceSettings_VoiceId;
                requestVoiceSettingsIsNull    = false;
            }
            // determine if request.VoiceSettings should be set to null
            if (requestVoiceSettingsIsNull)
            {
                request.VoiceSettings = 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.LexModelsV2.Model.StartImportRequest();

            if (cmdletContext.FilePassword != null)
            {
                request.FilePassword = cmdletContext.FilePassword;
            }
            if (cmdletContext.ImportId != null)
            {
                request.ImportId = cmdletContext.ImportId;
            }
            if (cmdletContext.MergeStrategy != null)
            {
                request.MergeStrategy = cmdletContext.MergeStrategy;
            }

            // populate ResourceSpecification
            var requestResourceSpecificationIsNull = true;

            request.ResourceSpecification = new Amazon.LexModelsV2.Model.ImportResourceSpecification();
            Amazon.LexModelsV2.Model.BotLocaleImportSpecification requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification = null;

            // populate BotLocaleImportSpecification
            var requestResourceSpecification_resourceSpecification_BotLocaleImportSpecificationIsNull = true;

            requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification = new Amazon.LexModelsV2.Model.BotLocaleImportSpecification();
            System.String requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_BotId = null;
            if (cmdletContext.BotLocaleImportSpecification_BotId != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_BotId = cmdletContext.BotLocaleImportSpecification_BotId;
            }
            if (requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_BotId != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification.BotId = requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_BotId;
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecificationIsNull = false;
            }
            System.String requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_BotVersion = null;
            if (cmdletContext.BotLocaleImportSpecification_BotVersion != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_BotVersion = cmdletContext.BotLocaleImportSpecification_BotVersion;
            }
            if (requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_BotVersion != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification.BotVersion = requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_BotVersion;
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecificationIsNull      = false;
            }
            System.String requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_LocaleId = null;
            if (cmdletContext.BotLocaleImportSpecification_LocaleId != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_LocaleId = cmdletContext.BotLocaleImportSpecification_LocaleId;
            }
            if (requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_LocaleId != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification.LocaleId = requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_LocaleId;
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecificationIsNull    = false;
            }
            System.Double?requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_NluIntentConfidenceThreshold = null;
            if (cmdletContext.BotLocaleImportSpecification_NluIntentConfidenceThreshold != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_NluIntentConfidenceThreshold = cmdletContext.BotLocaleImportSpecification_NluIntentConfidenceThreshold.Value;
            }
            if (requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_NluIntentConfidenceThreshold != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification.NluIntentConfidenceThreshold = requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_botLocaleImportSpecification_NluIntentConfidenceThreshold.Value;
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecificationIsNull = false;
            }
            Amazon.LexModelsV2.Model.VoiceSettings requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings = null;

            // populate VoiceSettings
            var requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettingsIsNull = true;

            requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings = new Amazon.LexModelsV2.Model.VoiceSettings();
            Amazon.LexModelsV2.VoiceEngine requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings_voiceSettings_Engine = null;
            if (cmdletContext.VoiceSettings_Engine != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings_voiceSettings_Engine = cmdletContext.VoiceSettings_Engine;
            }
            if (requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings_voiceSettings_Engine != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings.Engine = requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings_voiceSettings_Engine;
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettingsIsNull  = false;
            }
            System.String requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings_voiceSettings_VoiceId = null;
            if (cmdletContext.VoiceSettings_VoiceId != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings_voiceSettings_VoiceId = cmdletContext.VoiceSettings_VoiceId;
            }
            if (requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings_voiceSettings_VoiceId != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings.VoiceId = requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings_voiceSettings_VoiceId;
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettingsIsNull   = false;
            }
            // determine if requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings should be set to null
            if (requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettingsIsNull)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings = null;
            }
            if (requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings != null)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification.VoiceSettings = requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification_resourceSpecification_BotLocaleImportSpecification_VoiceSettings;
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecificationIsNull         = false;
            }
            // determine if requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification should be set to null
            if (requestResourceSpecification_resourceSpecification_BotLocaleImportSpecificationIsNull)
            {
                requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification = null;
            }
            if (requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification != null)
            {
                request.ResourceSpecification.BotLocaleImportSpecification = requestResourceSpecification_resourceSpecification_BotLocaleImportSpecification;
                requestResourceSpecificationIsNull = false;
            }
            Amazon.LexModelsV2.Model.BotImportSpecification requestResourceSpecification_resourceSpecification_BotImportSpecification = null;

            // populate BotImportSpecification
            var requestResourceSpecification_resourceSpecification_BotImportSpecificationIsNull = true;

            requestResourceSpecification_resourceSpecification_BotImportSpecification = new Amazon.LexModelsV2.Model.BotImportSpecification();
            System.String requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_BotName = null;
            if (cmdletContext.BotImportSpecification_BotName != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_BotName = cmdletContext.BotImportSpecification_BotName;
            }
            if (requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_BotName != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification.BotName = requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_BotName;
                requestResourceSpecification_resourceSpecification_BotImportSpecificationIsNull   = false;
            }
            Dictionary <System.String, System.String> requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_BotTag = null;

            if (cmdletContext.BotImportSpecification_BotTag != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_BotTag = cmdletContext.BotImportSpecification_BotTag;
            }
            if (requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_BotTag != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification.BotTags = requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_BotTag;
                requestResourceSpecification_resourceSpecification_BotImportSpecificationIsNull   = false;
            }
            System.Int32?requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_IdleSessionTTLInSecond = null;
            if (cmdletContext.BotImportSpecification_IdleSessionTTLInSecond != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_IdleSessionTTLInSecond = cmdletContext.BotImportSpecification_IdleSessionTTLInSecond.Value;
            }
            if (requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_IdleSessionTTLInSecond != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification.IdleSessionTTLInSeconds = requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_IdleSessionTTLInSecond.Value;
                requestResourceSpecification_resourceSpecification_BotImportSpecificationIsNull = false;
            }
            System.String requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_RoleArn = null;
            if (cmdletContext.BotImportSpecification_RoleArn != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_RoleArn = cmdletContext.BotImportSpecification_RoleArn;
            }
            if (requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_RoleArn != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification.RoleArn = requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_RoleArn;
                requestResourceSpecification_resourceSpecification_BotImportSpecificationIsNull   = false;
            }
            Dictionary <System.String, System.String> requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_TestBotAliasTag = null;

            if (cmdletContext.BotImportSpecification_TestBotAliasTag != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_TestBotAliasTag = cmdletContext.BotImportSpecification_TestBotAliasTag;
            }
            if (requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_TestBotAliasTag != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification.TestBotAliasTags = requestResourceSpecification_resourceSpecification_BotImportSpecification_botImportSpecification_TestBotAliasTag;
                requestResourceSpecification_resourceSpecification_BotImportSpecificationIsNull            = false;
            }
            Amazon.LexModelsV2.Model.DataPrivacy requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacy = null;

            // populate DataPrivacy
            var requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacyIsNull = true;

            requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacy = new Amazon.LexModelsV2.Model.DataPrivacy();
            System.Boolean?requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacy_dataPrivacy_ChildDirected = null;
            if (cmdletContext.DataPrivacy_ChildDirected != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacy_dataPrivacy_ChildDirected = cmdletContext.DataPrivacy_ChildDirected.Value;
            }
            if (requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacy_dataPrivacy_ChildDirected != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacy.ChildDirected = requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacy_dataPrivacy_ChildDirected.Value;
                requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacyIsNull         = false;
            }
            // determine if requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacy should be set to null
            if (requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacyIsNull)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacy = null;
            }
            if (requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacy != null)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification.DataPrivacy = requestResourceSpecification_resourceSpecification_BotImportSpecification_resourceSpecification_BotImportSpecification_DataPrivacy;
                requestResourceSpecification_resourceSpecification_BotImportSpecificationIsNull       = false;
            }
            // determine if requestResourceSpecification_resourceSpecification_BotImportSpecification should be set to null
            if (requestResourceSpecification_resourceSpecification_BotImportSpecificationIsNull)
            {
                requestResourceSpecification_resourceSpecification_BotImportSpecification = null;
            }
            if (requestResourceSpecification_resourceSpecification_BotImportSpecification != null)
            {
                request.ResourceSpecification.BotImportSpecification = requestResourceSpecification_resourceSpecification_BotImportSpecification;
                requestResourceSpecificationIsNull = false;
            }
            // determine if request.ResourceSpecification should be set to null
            if (requestResourceSpecificationIsNull)
            {
                request.ResourceSpecification = 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);
        }