private Amazon.Chime.Model.UpdateGlobalSettingsResponse CallAWSServiceOperation(IAmazonChime client, Amazon.Chime.Model.UpdateGlobalSettingsRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Chime", "UpdateGlobalSettings");
     try
     {
         #if DESKTOP
         return(client.UpdateGlobalSettings(request));
         #elif CORECLR
         return(client.UpdateGlobalSettingsAsync(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.Chime.Model.UpdateGlobalSettingsRequest();


            // populate BusinessCalling
            var requestBusinessCallingIsNull = true;

            request.BusinessCalling = new Amazon.Chime.Model.BusinessCallingSettings();
            System.String requestBusinessCalling_businessCalling_CdrBucket = null;
            if (cmdletContext.BusinessCalling_CdrBucket != null)
            {
                requestBusinessCalling_businessCalling_CdrBucket = cmdletContext.BusinessCalling_CdrBucket;
            }
            if (requestBusinessCalling_businessCalling_CdrBucket != null)
            {
                request.BusinessCalling.CdrBucket = requestBusinessCalling_businessCalling_CdrBucket;
                requestBusinessCallingIsNull      = false;
            }
            // determine if request.BusinessCalling should be set to null
            if (requestBusinessCallingIsNull)
            {
                request.BusinessCalling = null;
            }

            // populate VoiceConnector
            var requestVoiceConnectorIsNull = true;

            request.VoiceConnector = new Amazon.Chime.Model.VoiceConnectorSettings();
            System.String requestVoiceConnector_voiceConnector_CdrBucket = null;
            if (cmdletContext.VoiceConnector_CdrBucket != null)
            {
                requestVoiceConnector_voiceConnector_CdrBucket = cmdletContext.VoiceConnector_CdrBucket;
            }
            if (requestVoiceConnector_voiceConnector_CdrBucket != null)
            {
                request.VoiceConnector.CdrBucket = requestVoiceConnector_voiceConnector_CdrBucket;
                requestVoiceConnectorIsNull      = false;
            }
            // determine if request.VoiceConnector should be set to null
            if (requestVoiceConnectorIsNull)
            {
                request.VoiceConnector = 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);
        }