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

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

            // populate Spec
            var requestSpecIsNull = true;

            request.Spec = new Amazon.AppMesh.Model.VirtualNodeSpec();
            List <Amazon.AppMesh.Model.Backend> requestSpec_spec_Backend = null;

            if (cmdletContext.Spec_Backend != null)
            {
                requestSpec_spec_Backend = cmdletContext.Spec_Backend;
            }
            if (requestSpec_spec_Backend != null)
            {
                request.Spec.Backends = requestSpec_spec_Backend;
                requestSpecIsNull     = false;
            }
            List <Amazon.AppMesh.Model.Listener> requestSpec_spec_Listener = null;

            if (cmdletContext.Spec_Listener != null)
            {
                requestSpec_spec_Listener = cmdletContext.Spec_Listener;
            }
            if (requestSpec_spec_Listener != null)
            {
                request.Spec.Listeners = requestSpec_spec_Listener;
                requestSpecIsNull      = false;
            }
            Amazon.AppMesh.Model.Logging requestSpec_spec_Logging = null;

            // populate Logging
            var requestSpec_spec_LoggingIsNull = true;

            requestSpec_spec_Logging = new Amazon.AppMesh.Model.Logging();
            Amazon.AppMesh.Model.AccessLog requestSpec_spec_Logging_spec_Logging_AccessLog = null;

            // populate AccessLog
            var requestSpec_spec_Logging_spec_Logging_AccessLogIsNull = true;

            requestSpec_spec_Logging_spec_Logging_AccessLog = new Amazon.AppMesh.Model.AccessLog();
            Amazon.AppMesh.Model.FileAccessLog requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File = null;

            // populate File
            var requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_FileIsNull = true;

            requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File = new Amazon.AppMesh.Model.FileAccessLog();
            System.String requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File_file_Path = null;
            if (cmdletContext.File_Path != null)
            {
                requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File_file_Path = cmdletContext.File_Path;
            }
            if (requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File_file_Path != null)
            {
                requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File.Path  = requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File_file_Path;
                requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_FileIsNull = false;
            }
            // determine if requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File should be set to null
            if (requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_FileIsNull)
            {
                requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File = null;
            }
            if (requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File != null)
            {
                requestSpec_spec_Logging_spec_Logging_AccessLog.File  = requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File;
                requestSpec_spec_Logging_spec_Logging_AccessLogIsNull = false;
            }
            // determine if requestSpec_spec_Logging_spec_Logging_AccessLog should be set to null
            if (requestSpec_spec_Logging_spec_Logging_AccessLogIsNull)
            {
                requestSpec_spec_Logging_spec_Logging_AccessLog = null;
            }
            if (requestSpec_spec_Logging_spec_Logging_AccessLog != null)
            {
                requestSpec_spec_Logging.AccessLog = requestSpec_spec_Logging_spec_Logging_AccessLog;
                requestSpec_spec_LoggingIsNull     = false;
            }
            // determine if requestSpec_spec_Logging should be set to null
            if (requestSpec_spec_LoggingIsNull)
            {
                requestSpec_spec_Logging = null;
            }
            if (requestSpec_spec_Logging != null)
            {
                request.Spec.Logging = requestSpec_spec_Logging;
                requestSpecIsNull    = false;
            }
            Amazon.AppMesh.Model.ServiceDiscovery requestSpec_spec_ServiceDiscovery = null;

            // populate ServiceDiscovery
            var requestSpec_spec_ServiceDiscoveryIsNull = true;

            requestSpec_spec_ServiceDiscovery = new Amazon.AppMesh.Model.ServiceDiscovery();
            Amazon.AppMesh.Model.DnsServiceDiscovery requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns = null;

            // populate Dns
            var requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_DnsIsNull = true;

            requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns = new Amazon.AppMesh.Model.DnsServiceDiscovery();
            System.String requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns_dns_Hostname = null;
            if (cmdletContext.Dns_Hostname != null)
            {
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns_dns_Hostname = cmdletContext.Dns_Hostname;
            }
            if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns_dns_Hostname != null)
            {
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns.Hostname = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns_dns_Hostname;
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_DnsIsNull    = false;
            }
            // determine if requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns should be set to null
            if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_DnsIsNull)
            {
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns = null;
            }
            if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns != null)
            {
                requestSpec_spec_ServiceDiscovery.Dns   = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns;
                requestSpec_spec_ServiceDiscoveryIsNull = false;
            }
            Amazon.AppMesh.Model.AwsCloudMapServiceDiscovery requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap = null;

            // populate AwsCloudMap
            var requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMapIsNull = true;

            requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap = new Amazon.AppMesh.Model.AwsCloudMapServiceDiscovery();
            List <Amazon.AppMesh.Model.AwsCloudMapInstanceAttribute> requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_Attribute = null;

            if (cmdletContext.AwsCloudMap_Attribute != null)
            {
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_Attribute = cmdletContext.AwsCloudMap_Attribute;
            }
            if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_Attribute != null)
            {
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap.Attributes = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_Attribute;
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMapIsNull      = false;
            }
            System.String requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_NamespaceName = null;
            if (cmdletContext.AwsCloudMap_NamespaceName != null)
            {
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_NamespaceName = cmdletContext.AwsCloudMap_NamespaceName;
            }
            if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_NamespaceName != null)
            {
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap.NamespaceName = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_NamespaceName;
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMapIsNull         = false;
            }
            System.String requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_ServiceName = null;
            if (cmdletContext.AwsCloudMap_ServiceName != null)
            {
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_ServiceName = cmdletContext.AwsCloudMap_ServiceName;
            }
            if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_ServiceName != null)
            {
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap.ServiceName = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_ServiceName;
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMapIsNull       = false;
            }
            // determine if requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap should be set to null
            if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMapIsNull)
            {
                requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap = null;
            }
            if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap != null)
            {
                requestSpec_spec_ServiceDiscovery.AwsCloudMap = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap;
                requestSpec_spec_ServiceDiscoveryIsNull       = false;
            }
            // determine if requestSpec_spec_ServiceDiscovery should be set to null
            if (requestSpec_spec_ServiceDiscoveryIsNull)
            {
                requestSpec_spec_ServiceDiscovery = null;
            }
            if (requestSpec_spec_ServiceDiscovery != null)
            {
                request.Spec.ServiceDiscovery = requestSpec_spec_ServiceDiscovery;
                requestSpecIsNull             = false;
            }
            // determine if request.Spec should be set to null
            if (requestSpecIsNull)
            {
                request.Spec = null;
            }
            if (cmdletContext.Tag != null)
            {
                request.Tags = cmdletContext.Tag;
            }
            if (cmdletContext.VirtualNodeName != null)
            {
                request.VirtualNodeName = cmdletContext.VirtualNodeName;
            }

            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.AppMesh.Model.UpdateVirtualNodeRequest();
     
     if (cmdletContext.ClientToken != null)
     {
         request.ClientToken = cmdletContext.ClientToken;
     }
     if (cmdletContext.MeshName != null)
     {
         request.MeshName = cmdletContext.MeshName;
     }
     if (cmdletContext.MeshOwner != null)
     {
         request.MeshOwner = cmdletContext.MeshOwner;
     }
     
      // populate Spec
     var requestSpecIsNull = true;
     request.Spec = new Amazon.AppMesh.Model.VirtualNodeSpec();
     List<Amazon.AppMesh.Model.Backend> requestSpec_spec_Backend = null;
     if (cmdletContext.Spec_Backend != null)
     {
         requestSpec_spec_Backend = cmdletContext.Spec_Backend;
     }
     if (requestSpec_spec_Backend != null)
     {
         request.Spec.Backends = requestSpec_spec_Backend;
         requestSpecIsNull = false;
     }
     List<Amazon.AppMesh.Model.Listener> requestSpec_spec_Listener = null;
     if (cmdletContext.Spec_Listener != null)
     {
         requestSpec_spec_Listener = cmdletContext.Spec_Listener;
     }
     if (requestSpec_spec_Listener != null)
     {
         request.Spec.Listeners = requestSpec_spec_Listener;
         requestSpecIsNull = false;
     }
     Amazon.AppMesh.Model.BackendDefaults requestSpec_spec_BackendDefaults = null;
     
      // populate BackendDefaults
     var requestSpec_spec_BackendDefaultsIsNull = true;
     requestSpec_spec_BackendDefaults = new Amazon.AppMesh.Model.BackendDefaults();
     Amazon.AppMesh.Model.ClientPolicy requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy = null;
     
      // populate ClientPolicy
     var requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicyIsNull = true;
     requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy = new Amazon.AppMesh.Model.ClientPolicy();
     Amazon.AppMesh.Model.ClientPolicyTls requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls = null;
     
      // populate Tls
     var requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_TlsIsNull = true;
     requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls = new Amazon.AppMesh.Model.ClientPolicyTls();
     System.Boolean? requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_tls_Enforce = null;
     if (cmdletContext.Tls_Enforce != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_tls_Enforce = cmdletContext.Tls_Enforce.Value;
     }
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_tls_Enforce != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls.Enforce = requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_tls_Enforce.Value;
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_TlsIsNull = false;
     }
     List<System.Int32> requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_tls_Port = null;
     if (cmdletContext.Tls_Port != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_tls_Port = cmdletContext.Tls_Port;
     }
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_tls_Port != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls.Ports = requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_tls_Port;
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_TlsIsNull = false;
     }
     Amazon.AppMesh.Model.TlsValidationContext requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation = null;
     
      // populate Validation
     var requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_ValidationIsNull = true;
     requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation = new Amazon.AppMesh.Model.TlsValidationContext();
     Amazon.AppMesh.Model.TlsValidationContextTrust requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust = null;
     
      // populate Trust
     var requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_TrustIsNull = true;
     requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust = new Amazon.AppMesh.Model.TlsValidationContextTrust();
     Amazon.AppMesh.Model.TlsValidationContextAcmTrust requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_Acm = null;
     
      // populate Acm
     var requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_AcmIsNull = true;
     requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_Acm = new Amazon.AppMesh.Model.TlsValidationContextAcmTrust();
     List<System.String> requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_Acm_acm_CertificateAuthorityArn = null;
     if (cmdletContext.Acm_CertificateAuthorityArn != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_Acm_acm_CertificateAuthorityArn = cmdletContext.Acm_CertificateAuthorityArn;
     }
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_Acm_acm_CertificateAuthorityArn != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_Acm.CertificateAuthorityArns = requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_Acm_acm_CertificateAuthorityArn;
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_AcmIsNull = false;
     }
      // determine if requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_Acm should be set to null
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_AcmIsNull)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_Acm = null;
     }
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_Acm != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust.Acm = requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_Acm;
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_TrustIsNull = false;
     }
     Amazon.AppMesh.Model.TlsValidationContextFileTrust requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_File = null;
     
      // populate File
     var requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_FileIsNull = true;
     requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_File = new Amazon.AppMesh.Model.TlsValidationContextFileTrust();
     System.String requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_File_file_CertificateChain = null;
     if (cmdletContext.File_CertificateChain != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_File_file_CertificateChain = cmdletContext.File_CertificateChain;
     }
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_File_file_CertificateChain != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_File.CertificateChain = requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_File_file_CertificateChain;
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_FileIsNull = false;
     }
      // determine if requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_File should be set to null
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_FileIsNull)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_File = null;
     }
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_File != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust.File = requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust_File;
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_TrustIsNull = false;
     }
      // determine if requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust should be set to null
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_TrustIsNull)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust = null;
     }
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation.Trust = requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation_spec_BackendDefaults_ClientPolicy_Tls_Validation_Trust;
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_ValidationIsNull = false;
     }
      // determine if requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation should be set to null
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_ValidationIsNull)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation = null;
     }
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls.Validation = requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls_spec_BackendDefaults_ClientPolicy_Tls_Validation;
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_TlsIsNull = false;
     }
      // determine if requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls should be set to null
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_TlsIsNull)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls = null;
     }
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls != null)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy.Tls = requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy_spec_BackendDefaults_ClientPolicy_Tls;
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicyIsNull = false;
     }
      // determine if requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy should be set to null
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicyIsNull)
     {
         requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy = null;
     }
     if (requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy != null)
     {
         requestSpec_spec_BackendDefaults.ClientPolicy = requestSpec_spec_BackendDefaults_spec_BackendDefaults_ClientPolicy;
         requestSpec_spec_BackendDefaultsIsNull = false;
     }
      // determine if requestSpec_spec_BackendDefaults should be set to null
     if (requestSpec_spec_BackendDefaultsIsNull)
     {
         requestSpec_spec_BackendDefaults = null;
     }
     if (requestSpec_spec_BackendDefaults != null)
     {
         request.Spec.BackendDefaults = requestSpec_spec_BackendDefaults;
         requestSpecIsNull = false;
     }
     Amazon.AppMesh.Model.Logging requestSpec_spec_Logging = null;
     
      // populate Logging
     var requestSpec_spec_LoggingIsNull = true;
     requestSpec_spec_Logging = new Amazon.AppMesh.Model.Logging();
     Amazon.AppMesh.Model.AccessLog requestSpec_spec_Logging_spec_Logging_AccessLog = null;
     
      // populate AccessLog
     var requestSpec_spec_Logging_spec_Logging_AccessLogIsNull = true;
     requestSpec_spec_Logging_spec_Logging_AccessLog = new Amazon.AppMesh.Model.AccessLog();
     Amazon.AppMesh.Model.FileAccessLog requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File = null;
     
      // populate File
     var requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_FileIsNull = true;
     requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File = new Amazon.AppMesh.Model.FileAccessLog();
     System.String requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File_file_Path = null;
     if (cmdletContext.File_Path != null)
     {
         requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File_file_Path = cmdletContext.File_Path;
     }
     if (requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File_file_Path != null)
     {
         requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File.Path = requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File_file_Path;
         requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_FileIsNull = false;
     }
      // determine if requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File should be set to null
     if (requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_FileIsNull)
     {
         requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File = null;
     }
     if (requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File != null)
     {
         requestSpec_spec_Logging_spec_Logging_AccessLog.File = requestSpec_spec_Logging_spec_Logging_AccessLog_spec_Logging_AccessLog_File;
         requestSpec_spec_Logging_spec_Logging_AccessLogIsNull = false;
     }
      // determine if requestSpec_spec_Logging_spec_Logging_AccessLog should be set to null
     if (requestSpec_spec_Logging_spec_Logging_AccessLogIsNull)
     {
         requestSpec_spec_Logging_spec_Logging_AccessLog = null;
     }
     if (requestSpec_spec_Logging_spec_Logging_AccessLog != null)
     {
         requestSpec_spec_Logging.AccessLog = requestSpec_spec_Logging_spec_Logging_AccessLog;
         requestSpec_spec_LoggingIsNull = false;
     }
      // determine if requestSpec_spec_Logging should be set to null
     if (requestSpec_spec_LoggingIsNull)
     {
         requestSpec_spec_Logging = null;
     }
     if (requestSpec_spec_Logging != null)
     {
         request.Spec.Logging = requestSpec_spec_Logging;
         requestSpecIsNull = false;
     }
     Amazon.AppMesh.Model.ServiceDiscovery requestSpec_spec_ServiceDiscovery = null;
     
      // populate ServiceDiscovery
     var requestSpec_spec_ServiceDiscoveryIsNull = true;
     requestSpec_spec_ServiceDiscovery = new Amazon.AppMesh.Model.ServiceDiscovery();
     Amazon.AppMesh.Model.DnsServiceDiscovery requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns = null;
     
      // populate Dns
     var requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_DnsIsNull = true;
     requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns = new Amazon.AppMesh.Model.DnsServiceDiscovery();
     System.String requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns_dns_Hostname = null;
     if (cmdletContext.Dns_Hostname != null)
     {
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns_dns_Hostname = cmdletContext.Dns_Hostname;
     }
     if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns_dns_Hostname != null)
     {
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns.Hostname = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns_dns_Hostname;
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_DnsIsNull = false;
     }
      // determine if requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns should be set to null
     if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_DnsIsNull)
     {
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns = null;
     }
     if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns != null)
     {
         requestSpec_spec_ServiceDiscovery.Dns = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_Dns;
         requestSpec_spec_ServiceDiscoveryIsNull = false;
     }
     Amazon.AppMesh.Model.AwsCloudMapServiceDiscovery requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap = null;
     
      // populate AwsCloudMap
     var requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMapIsNull = true;
     requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap = new Amazon.AppMesh.Model.AwsCloudMapServiceDiscovery();
     List<Amazon.AppMesh.Model.AwsCloudMapInstanceAttribute> requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_Attribute = null;
     if (cmdletContext.AwsCloudMap_Attribute != null)
     {
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_Attribute = cmdletContext.AwsCloudMap_Attribute;
     }
     if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_Attribute != null)
     {
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap.Attributes = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_Attribute;
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMapIsNull = false;
     }
     System.String requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_NamespaceName = null;
     if (cmdletContext.AwsCloudMap_NamespaceName != null)
     {
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_NamespaceName = cmdletContext.AwsCloudMap_NamespaceName;
     }
     if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_NamespaceName != null)
     {
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap.NamespaceName = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_NamespaceName;
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMapIsNull = false;
     }
     System.String requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_ServiceName = null;
     if (cmdletContext.AwsCloudMap_ServiceName != null)
     {
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_ServiceName = cmdletContext.AwsCloudMap_ServiceName;
     }
     if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_ServiceName != null)
     {
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap.ServiceName = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap_awsCloudMap_ServiceName;
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMapIsNull = false;
     }
      // determine if requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap should be set to null
     if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMapIsNull)
     {
         requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap = null;
     }
     if (requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap != null)
     {
         requestSpec_spec_ServiceDiscovery.AwsCloudMap = requestSpec_spec_ServiceDiscovery_spec_ServiceDiscovery_AwsCloudMap;
         requestSpec_spec_ServiceDiscoveryIsNull = false;
     }
      // determine if requestSpec_spec_ServiceDiscovery should be set to null
     if (requestSpec_spec_ServiceDiscoveryIsNull)
     {
         requestSpec_spec_ServiceDiscovery = null;
     }
     if (requestSpec_spec_ServiceDiscovery != null)
     {
         request.Spec.ServiceDiscovery = requestSpec_spec_ServiceDiscovery;
         requestSpecIsNull = false;
     }
      // determine if request.Spec should be set to null
     if (requestSpecIsNull)
     {
         request.Spec = null;
     }
     if (cmdletContext.VirtualNodeName != null)
     {
         request.VirtualNodeName = cmdletContext.VirtualNodeName;
     }
     
     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;
 }