private Amazon.AlexaForBusiness.Model.UpdateConferenceProviderResponse CallAWSServiceOperation(IAmazonAlexaForBusiness client, Amazon.AlexaForBusiness.Model.UpdateConferenceProviderRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Alexa For Business", "UpdateConferenceProvider");
     try
     {
         #if DESKTOP
         return(client.UpdateConferenceProvider(request));
         #elif CORECLR
         return(client.UpdateConferenceProviderAsync(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.AlexaForBusiness.Model.UpdateConferenceProviderRequest();

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

            // populate IPDialIn
            var requestIPDialInIsNull = true;

            request.IPDialIn = new Amazon.AlexaForBusiness.Model.IPDialIn();
            Amazon.AlexaForBusiness.CommsProtocol requestIPDialIn_iPDialIn_CommsProtocol = null;
            if (cmdletContext.IPDialIn_CommsProtocol != null)
            {
                requestIPDialIn_iPDialIn_CommsProtocol = cmdletContext.IPDialIn_CommsProtocol;
            }
            if (requestIPDialIn_iPDialIn_CommsProtocol != null)
            {
                request.IPDialIn.CommsProtocol = requestIPDialIn_iPDialIn_CommsProtocol;
                requestIPDialInIsNull          = false;
            }
            System.String requestIPDialIn_iPDialIn_Endpoint = null;
            if (cmdletContext.IPDialIn_Endpoint != null)
            {
                requestIPDialIn_iPDialIn_Endpoint = cmdletContext.IPDialIn_Endpoint;
            }
            if (requestIPDialIn_iPDialIn_Endpoint != null)
            {
                request.IPDialIn.Endpoint = requestIPDialIn_iPDialIn_Endpoint;
                requestIPDialInIsNull     = false;
            }
            // determine if request.IPDialIn should be set to null
            if (requestIPDialInIsNull)
            {
                request.IPDialIn = null;
            }

            // populate MeetingSetting
            var requestMeetingSettingIsNull = true;

            request.MeetingSetting = new Amazon.AlexaForBusiness.Model.MeetingSetting();
            Amazon.AlexaForBusiness.RequirePin requestMeetingSetting_meetingSetting_RequirePin = null;
            if (cmdletContext.MeetingSetting_RequirePin != null)
            {
                requestMeetingSetting_meetingSetting_RequirePin = cmdletContext.MeetingSetting_RequirePin;
            }
            if (requestMeetingSetting_meetingSetting_RequirePin != null)
            {
                request.MeetingSetting.RequirePin = requestMeetingSetting_meetingSetting_RequirePin;
                requestMeetingSettingIsNull       = false;
            }
            // determine if request.MeetingSetting should be set to null
            if (requestMeetingSettingIsNull)
            {
                request.MeetingSetting = null;
            }

            // populate PSTNDialIn
            var requestPSTNDialInIsNull = true;

            request.PSTNDialIn = new Amazon.AlexaForBusiness.Model.PSTNDialIn();
            System.String requestPSTNDialIn_pSTNDialIn_CountryCode = null;
            if (cmdletContext.PSTNDialIn_CountryCode != null)
            {
                requestPSTNDialIn_pSTNDialIn_CountryCode = cmdletContext.PSTNDialIn_CountryCode;
            }
            if (requestPSTNDialIn_pSTNDialIn_CountryCode != null)
            {
                request.PSTNDialIn.CountryCode = requestPSTNDialIn_pSTNDialIn_CountryCode;
                requestPSTNDialInIsNull        = false;
            }
            System.String requestPSTNDialIn_pSTNDialIn_OneClickIdDelay = null;
            if (cmdletContext.PSTNDialIn_OneClickIdDelay != null)
            {
                requestPSTNDialIn_pSTNDialIn_OneClickIdDelay = cmdletContext.PSTNDialIn_OneClickIdDelay;
            }
            if (requestPSTNDialIn_pSTNDialIn_OneClickIdDelay != null)
            {
                request.PSTNDialIn.OneClickIdDelay = requestPSTNDialIn_pSTNDialIn_OneClickIdDelay;
                requestPSTNDialInIsNull            = false;
            }
            System.String requestPSTNDialIn_pSTNDialIn_OneClickPinDelay = null;
            if (cmdletContext.PSTNDialIn_OneClickPinDelay != null)
            {
                requestPSTNDialIn_pSTNDialIn_OneClickPinDelay = cmdletContext.PSTNDialIn_OneClickPinDelay;
            }
            if (requestPSTNDialIn_pSTNDialIn_OneClickPinDelay != null)
            {
                request.PSTNDialIn.OneClickPinDelay = requestPSTNDialIn_pSTNDialIn_OneClickPinDelay;
                requestPSTNDialInIsNull             = false;
            }
            System.String requestPSTNDialIn_pSTNDialIn_PhoneNumber = null;
            if (cmdletContext.PSTNDialIn_PhoneNumber != null)
            {
                requestPSTNDialIn_pSTNDialIn_PhoneNumber = cmdletContext.PSTNDialIn_PhoneNumber;
            }
            if (requestPSTNDialIn_pSTNDialIn_PhoneNumber != null)
            {
                request.PSTNDialIn.PhoneNumber = requestPSTNDialIn_pSTNDialIn_PhoneNumber;
                requestPSTNDialInIsNull        = false;
            }
            // determine if request.PSTNDialIn should be set to null
            if (requestPSTNDialInIsNull)
            {
                request.PSTNDialIn = 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);
        }