private Amazon.Chime.Model.StartMeetingTranscriptionResponse CallAWSServiceOperation(IAmazonChime client, Amazon.Chime.Model.StartMeetingTranscriptionRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Chime", "StartMeetingTranscription"); try { #if DESKTOP return(client.StartMeetingTranscription(request)); #elif CORECLR return(client.StartMeetingTranscriptionAsync(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.StartMeetingTranscriptionRequest(); if (cmdletContext.MeetingId != null) { request.MeetingId = cmdletContext.MeetingId; } // populate TranscriptionConfiguration var requestTranscriptionConfigurationIsNull = true; request.TranscriptionConfiguration = new Amazon.Chime.Model.TranscriptionConfiguration(); Amazon.Chime.Model.EngineTranscribeMedicalSettings requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings = null; // populate EngineTranscribeMedicalSettings var requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettingsIsNull = true; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings = new Amazon.Chime.Model.EngineTranscribeMedicalSettings(); Amazon.Chime.TranscribeMedicalContentIdentificationType requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_ContentIdentificationType = null; if (cmdletContext.EngineTranscribeMedicalSettings_ContentIdentificationType != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_ContentIdentificationType = cmdletContext.EngineTranscribeMedicalSettings_ContentIdentificationType; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_ContentIdentificationType != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings.ContentIdentificationType = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_ContentIdentificationType; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettingsIsNull = false; } Amazon.Chime.TranscribeMedicalLanguageCode requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_LanguageCode = null; if (cmdletContext.EngineTranscribeMedicalSettings_LanguageCode != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_LanguageCode = cmdletContext.EngineTranscribeMedicalSettings_LanguageCode; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_LanguageCode != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings.LanguageCode = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_LanguageCode; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettingsIsNull = false; } Amazon.Chime.TranscribeMedicalRegion requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Region = null; if (cmdletContext.EngineTranscribeMedicalSettings_Region != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Region = cmdletContext.EngineTranscribeMedicalSettings_Region; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Region != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings.Region = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Region; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettingsIsNull = false; } Amazon.Chime.TranscribeMedicalSpecialty requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Specialty = null; if (cmdletContext.EngineTranscribeMedicalSettings_Specialty != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Specialty = cmdletContext.EngineTranscribeMedicalSettings_Specialty; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Specialty != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings.Specialty = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Specialty; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettingsIsNull = false; } Amazon.Chime.TranscribeMedicalType requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Type = null; if (cmdletContext.EngineTranscribeMedicalSettings_Type != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Type = cmdletContext.EngineTranscribeMedicalSettings_Type; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Type != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings.Type = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_Type; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettingsIsNull = false; } System.String requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_VocabularyName = null; if (cmdletContext.EngineTranscribeMedicalSettings_VocabularyName != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_VocabularyName = cmdletContext.EngineTranscribeMedicalSettings_VocabularyName; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_VocabularyName != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings.VocabularyName = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings_engineTranscribeMedicalSettings_VocabularyName; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettingsIsNull = false; } // determine if requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings should be set to null if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettingsIsNull) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings = null; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings != null) { request.TranscriptionConfiguration.EngineTranscribeMedicalSettings = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeMedicalSettings; requestTranscriptionConfigurationIsNull = false; } Amazon.Chime.Model.EngineTranscribeSettings requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings = null; // populate EngineTranscribeSettings var requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = true; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings = new Amazon.Chime.Model.EngineTranscribeSettings(); Amazon.Chime.TranscribeContentIdentificationType requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_ContentIdentificationType = null; if (cmdletContext.EngineTranscribeSettings_ContentIdentificationType != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_ContentIdentificationType = cmdletContext.EngineTranscribeSettings_ContentIdentificationType; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_ContentIdentificationType != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings.ContentIdentificationType = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_ContentIdentificationType; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = false; } Amazon.Chime.TranscribeContentRedactionType requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_ContentRedactionType = null; if (cmdletContext.EngineTranscribeSettings_ContentRedactionType != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_ContentRedactionType = cmdletContext.EngineTranscribeSettings_ContentRedactionType; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_ContentRedactionType != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings.ContentRedactionType = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_ContentRedactionType; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = false; } System.Boolean?requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_EnablePartialResultsStabilization = null; if (cmdletContext.EngineTranscribeSettings_EnablePartialResultsStabilization != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_EnablePartialResultsStabilization = cmdletContext.EngineTranscribeSettings_EnablePartialResultsStabilization.Value; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_EnablePartialResultsStabilization != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings.EnablePartialResultsStabilization = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_EnablePartialResultsStabilization.Value; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = false; } Amazon.Chime.TranscribeLanguageCode requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_LanguageCode = null; if (cmdletContext.EngineTranscribeSettings_LanguageCode != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_LanguageCode = cmdletContext.EngineTranscribeSettings_LanguageCode; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_LanguageCode != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings.LanguageCode = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_LanguageCode; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = false; } System.String requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_LanguageModelName = null; if (cmdletContext.EngineTranscribeSettings_LanguageModelName != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_LanguageModelName = cmdletContext.EngineTranscribeSettings_LanguageModelName; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_LanguageModelName != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings.LanguageModelName = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_LanguageModelName; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = false; } Amazon.Chime.TranscribePartialResultsStability requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_PartialResultsStability = null; if (cmdletContext.EngineTranscribeSettings_PartialResultsStability != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_PartialResultsStability = cmdletContext.EngineTranscribeSettings_PartialResultsStability; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_PartialResultsStability != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings.PartialResultsStability = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_PartialResultsStability; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = false; } System.String requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_PiiEntityType = null; if (cmdletContext.EngineTranscribeSettings_PiiEntityType != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_PiiEntityType = cmdletContext.EngineTranscribeSettings_PiiEntityType; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_PiiEntityType != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings.PiiEntityTypes = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_PiiEntityType; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = false; } Amazon.Chime.TranscribeRegion requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_Region = null; if (cmdletContext.EngineTranscribeSettings_Region != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_Region = cmdletContext.EngineTranscribeSettings_Region; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_Region != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings.Region = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_Region; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = false; } Amazon.Chime.TranscribeVocabularyFilterMethod requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyFilterMethod = null; if (cmdletContext.EngineTranscribeSettings_VocabularyFilterMethod != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyFilterMethod = cmdletContext.EngineTranscribeSettings_VocabularyFilterMethod; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyFilterMethod != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings.VocabularyFilterMethod = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyFilterMethod; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = false; } System.String requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyFilterName = null; if (cmdletContext.EngineTranscribeSettings_VocabularyFilterName != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyFilterName = cmdletContext.EngineTranscribeSettings_VocabularyFilterName; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyFilterName != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings.VocabularyFilterName = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyFilterName; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = false; } System.String requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyName = null; if (cmdletContext.EngineTranscribeSettings_VocabularyName != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyName = cmdletContext.EngineTranscribeSettings_VocabularyName; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyName != null) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings.VocabularyName = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings_engineTranscribeSettings_VocabularyName; requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull = false; } // determine if requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings should be set to null if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettingsIsNull) { requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings = null; } if (requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings != null) { request.TranscriptionConfiguration.EngineTranscribeSettings = requestTranscriptionConfiguration_transcriptionConfiguration_EngineTranscribeSettings; requestTranscriptionConfigurationIsNull = false; } // determine if request.TranscriptionConfiguration should be set to null if (requestTranscriptionConfigurationIsNull) { request.TranscriptionConfiguration = 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); }