private Amazon.ManagedBlockchain.Model.CreateMemberResponse CallAWSServiceOperation(IAmazonManagedBlockchain client, Amazon.ManagedBlockchain.Model.CreateMemberRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Managed Blockchain", "CreateMember");
     try
     {
         #if DESKTOP
         return(client.CreateMember(request));
         #elif CORECLR
         return(client.CreateMemberAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.ManagedBlockchain.Model.CreateMemberRequest();

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

            // populate MemberConfiguration
            var requestMemberConfigurationIsNull = true;

            request.MemberConfiguration = new Amazon.ManagedBlockchain.Model.MemberConfiguration();
            System.String requestMemberConfiguration_memberConfiguration_Description = null;
            if (cmdletContext.MemberConfiguration_Description != null)
            {
                requestMemberConfiguration_memberConfiguration_Description = cmdletContext.MemberConfiguration_Description;
            }
            if (requestMemberConfiguration_memberConfiguration_Description != null)
            {
                request.MemberConfiguration.Description = requestMemberConfiguration_memberConfiguration_Description;
                requestMemberConfigurationIsNull        = false;
            }
            System.String requestMemberConfiguration_memberConfiguration_Name = null;
            if (cmdletContext.MemberConfiguration_Name != null)
            {
                requestMemberConfiguration_memberConfiguration_Name = cmdletContext.MemberConfiguration_Name;
            }
            if (requestMemberConfiguration_memberConfiguration_Name != null)
            {
                request.MemberConfiguration.Name = requestMemberConfiguration_memberConfiguration_Name;
                requestMemberConfigurationIsNull = false;
            }
            Dictionary <System.String, System.String> requestMemberConfiguration_memberConfiguration_Tag = null;

            if (cmdletContext.MemberConfiguration_Tag != null)
            {
                requestMemberConfiguration_memberConfiguration_Tag = cmdletContext.MemberConfiguration_Tag;
            }
            if (requestMemberConfiguration_memberConfiguration_Tag != null)
            {
                request.MemberConfiguration.Tags = requestMemberConfiguration_memberConfiguration_Tag;
                requestMemberConfigurationIsNull = false;
            }
            Amazon.ManagedBlockchain.Model.MemberFrameworkConfiguration requestMemberConfiguration_memberConfiguration_FrameworkConfiguration = null;

            // populate FrameworkConfiguration
            var requestMemberConfiguration_memberConfiguration_FrameworkConfigurationIsNull = true;

            requestMemberConfiguration_memberConfiguration_FrameworkConfiguration = new Amazon.ManagedBlockchain.Model.MemberFrameworkConfiguration();
            Amazon.ManagedBlockchain.Model.MemberFabricConfiguration requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric = null;

            // populate Fabric
            var requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_FabricIsNull = true;

            requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric = new Amazon.ManagedBlockchain.Model.MemberFabricConfiguration();
            System.String requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric_fabric_AdminPassword = null;
            if (cmdletContext.Fabric_AdminPassword != null)
            {
                requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric_fabric_AdminPassword = cmdletContext.Fabric_AdminPassword;
            }
            if (requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric_fabric_AdminPassword != null)
            {
                requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric.AdminPassword = requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric_fabric_AdminPassword;
                requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_FabricIsNull         = false;
            }
            System.String requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric_fabric_AdminUsername = null;
            if (cmdletContext.Fabric_AdminUsername != null)
            {
                requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric_fabric_AdminUsername = cmdletContext.Fabric_AdminUsername;
            }
            if (requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric_fabric_AdminUsername != null)
            {
                requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric.AdminUsername = requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric_fabric_AdminUsername;
                requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_FabricIsNull         = false;
            }
            // determine if requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric should be set to null
            if (requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_FabricIsNull)
            {
                requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric = null;
            }
            if (requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric != null)
            {
                requestMemberConfiguration_memberConfiguration_FrameworkConfiguration.Fabric = requestMemberConfiguration_memberConfiguration_FrameworkConfiguration_memberConfiguration_FrameworkConfiguration_Fabric;
                requestMemberConfiguration_memberConfiguration_FrameworkConfigurationIsNull  = false;
            }
            // determine if requestMemberConfiguration_memberConfiguration_FrameworkConfiguration should be set to null
            if (requestMemberConfiguration_memberConfiguration_FrameworkConfigurationIsNull)
            {
                requestMemberConfiguration_memberConfiguration_FrameworkConfiguration = null;
            }
            if (requestMemberConfiguration_memberConfiguration_FrameworkConfiguration != null)
            {
                request.MemberConfiguration.FrameworkConfiguration = requestMemberConfiguration_memberConfiguration_FrameworkConfiguration;
                requestMemberConfigurationIsNull = false;
            }
            Amazon.ManagedBlockchain.Model.MemberLogPublishingConfiguration requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration = null;

            // populate LogPublishingConfiguration
            var requestMemberConfiguration_memberConfiguration_LogPublishingConfigurationIsNull = true;

            requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration = new Amazon.ManagedBlockchain.Model.MemberLogPublishingConfiguration();
            Amazon.ManagedBlockchain.Model.MemberFabricLogPublishingConfiguration requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric = null;

            // populate Fabric
            var requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_FabricIsNull = true;

            requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric = new Amazon.ManagedBlockchain.Model.MemberFabricLogPublishingConfiguration();
            Amazon.ManagedBlockchain.Model.LogConfigurations requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs = null;

            // populate CaLogs
            var requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogsIsNull = true;

            requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs = new Amazon.ManagedBlockchain.Model.LogConfigurations();
            Amazon.ManagedBlockchain.Model.LogConfiguration requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_Cloudwatch = null;

            // populate Cloudwatch
            var requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_CloudwatchIsNull = true;

            requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_Cloudwatch = new Amazon.ManagedBlockchain.Model.LogConfiguration();
            System.Boolean?requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_Cloudwatch_cloudwatch_Enabled = null;
            if (cmdletContext.Cloudwatch_Enabled != null)
            {
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_Cloudwatch_cloudwatch_Enabled = cmdletContext.Cloudwatch_Enabled.Value;
            }
            if (requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_Cloudwatch_cloudwatch_Enabled != null)
            {
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_Cloudwatch.Enabled = requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_Cloudwatch_cloudwatch_Enabled.Value;
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_CloudwatchIsNull   = false;
            }
            // determine if requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_Cloudwatch should be set to null
            if (requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_CloudwatchIsNull)
            {
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_Cloudwatch = null;
            }
            if (requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_Cloudwatch != null)
            {
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs.Cloudwatch = requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs_Cloudwatch;
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogsIsNull      = false;
            }
            // determine if requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs should be set to null
            if (requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogsIsNull)
            {
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs = null;
            }
            if (requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs != null)
            {
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric.CaLogs = requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric_memberConfiguration_LogPublishingConfiguration_Fabric_CaLogs;
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_FabricIsNull  = false;
            }
            // determine if requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric should be set to null
            if (requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_FabricIsNull)
            {
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric = null;
            }
            if (requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric != null)
            {
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration.Fabric = requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration_memberConfiguration_LogPublishingConfiguration_Fabric;
                requestMemberConfiguration_memberConfiguration_LogPublishingConfigurationIsNull  = false;
            }
            // determine if requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration should be set to null
            if (requestMemberConfiguration_memberConfiguration_LogPublishingConfigurationIsNull)
            {
                requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration = null;
            }
            if (requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration != null)
            {
                request.MemberConfiguration.LogPublishingConfiguration = requestMemberConfiguration_memberConfiguration_LogPublishingConfiguration;
                requestMemberConfigurationIsNull = false;
            }
            // determine if request.MemberConfiguration should be set to null
            if (requestMemberConfigurationIsNull)
            {
                request.MemberConfiguration = null;
            }
            if (cmdletContext.NetworkId != null)
            {
                request.NetworkId = cmdletContext.NetworkId;
            }

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