Example #1
0
 private Amazon.Chime.Model.CreateMediaCapturePipelineResponse CallAWSServiceOperation(IAmazonChime client, Amazon.Chime.Model.CreateMediaCapturePipelineRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Chime", "CreateMediaCapturePipeline");
     try
     {
         #if DESKTOP
         return(client.CreateMediaCapturePipeline(request));
         #elif CORECLR
         return(client.CreateMediaCapturePipelineAsync(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;
     }
 }
Example #2
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.Chime.Model.CreateMediaCapturePipelineRequest();


            // populate ChimeSdkMeetingConfiguration
            var requestChimeSdkMeetingConfigurationIsNull = true;

            request.ChimeSdkMeetingConfiguration = new Amazon.Chime.Model.ChimeSdkMeetingConfiguration();
            Amazon.Chime.Model.SourceConfiguration requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration = null;

            // populate SourceConfiguration
            var requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfigurationIsNull = true;

            requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration = new Amazon.Chime.Model.SourceConfiguration();
            Amazon.Chime.Model.SelectedVideoStreams requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams = null;

            // populate SelectedVideoStreams
            var requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreamsIsNull = true;

            requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams = new Amazon.Chime.Model.SelectedVideoStreams();
            List <System.String> requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams_selectedVideoStreams_AttendeeId = null;

            if (cmdletContext.SelectedVideoStreams_AttendeeId != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams_selectedVideoStreams_AttendeeId = cmdletContext.SelectedVideoStreams_AttendeeId;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams_selectedVideoStreams_AttendeeId != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams.AttendeeIds = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams_selectedVideoStreams_AttendeeId;
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreamsIsNull       = false;
            }
            List <System.String> requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams_selectedVideoStreams_ExternalUserId = null;

            if (cmdletContext.SelectedVideoStreams_ExternalUserId != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams_selectedVideoStreams_ExternalUserId = cmdletContext.SelectedVideoStreams_ExternalUserId;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams_selectedVideoStreams_ExternalUserId != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams.ExternalUserIds = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams_selectedVideoStreams_ExternalUserId;
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreamsIsNull           = false;
            }
            // determine if requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams should be set to null
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreamsIsNull)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams = null;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration.SelectedVideoStreams = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration_SelectedVideoStreams;
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfigurationIsNull = false;
            }
            // determine if requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration should be set to null
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfigurationIsNull)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration = null;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration != null)
            {
                request.ChimeSdkMeetingConfiguration.SourceConfiguration = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_SourceConfiguration;
                requestChimeSdkMeetingConfigurationIsNull = false;
            }
            Amazon.Chime.Model.ArtifactsConfiguration requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration = null;

            // populate ArtifactsConfiguration
            var requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfigurationIsNull = true;

            requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration = new Amazon.Chime.Model.ArtifactsConfiguration();
            Amazon.Chime.Model.AudioArtifactsConfiguration requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Audio = null;

            // populate Audio
            var requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_AudioIsNull = true;

            requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Audio = new Amazon.Chime.Model.AudioArtifactsConfiguration();
            Amazon.Chime.AudioMuxType requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Audio_audio_MuxType = null;
            if (cmdletContext.Audio_MuxType != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Audio_audio_MuxType = cmdletContext.Audio_MuxType;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Audio_audio_MuxType != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Audio.MuxType = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Audio_audio_MuxType;
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_AudioIsNull   = false;
            }
            // determine if requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Audio should be set to null
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_AudioIsNull)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Audio = null;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Audio != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration.Audio = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Audio;
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfigurationIsNull = false;
            }
            Amazon.Chime.Model.ContentArtifactsConfiguration requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content = null;

            // populate Content
            var requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_ContentIsNull = true;

            requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content = new Amazon.Chime.Model.ContentArtifactsConfiguration();
            Amazon.Chime.ContentMuxType requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content_content_MuxType = null;
            if (cmdletContext.Content_MuxType != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content_content_MuxType = cmdletContext.Content_MuxType;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content_content_MuxType != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content.MuxType = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content_content_MuxType;
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_ContentIsNull   = false;
            }
            Amazon.Chime.ArtifactsState requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content_content_State = null;
            if (cmdletContext.Content_State != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content_content_State = cmdletContext.Content_State;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content_content_State != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content.State = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content_content_State;
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_ContentIsNull = false;
            }
            // determine if requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content should be set to null
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_ContentIsNull)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content = null;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration.Content = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Content;
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfigurationIsNull   = false;
            }
            Amazon.Chime.Model.VideoArtifactsConfiguration requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video = null;

            // populate Video
            var requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_VideoIsNull = true;

            requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video = new Amazon.Chime.Model.VideoArtifactsConfiguration();
            Amazon.Chime.VideoMuxType requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video_video_MuxType = null;
            if (cmdletContext.Video_MuxType != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video_video_MuxType = cmdletContext.Video_MuxType;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video_video_MuxType != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video.MuxType = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video_video_MuxType;
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_VideoIsNull   = false;
            }
            Amazon.Chime.ArtifactsState requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video_video_State = null;
            if (cmdletContext.Video_State != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video_video_State = cmdletContext.Video_State;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video_video_State != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video.State = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video_video_State;
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_VideoIsNull = false;
            }
            // determine if requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video should be set to null
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_VideoIsNull)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video = null;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video != null)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration.Video = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration_Video;
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfigurationIsNull = false;
            }
            // determine if requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration should be set to null
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfigurationIsNull)
            {
                requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration = null;
            }
            if (requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration != null)
            {
                request.ChimeSdkMeetingConfiguration.ArtifactsConfiguration = requestChimeSdkMeetingConfiguration_chimeSdkMeetingConfiguration_ArtifactsConfiguration;
                requestChimeSdkMeetingConfigurationIsNull = false;
            }
            // determine if request.ChimeSdkMeetingConfiguration should be set to null
            if (requestChimeSdkMeetingConfigurationIsNull)
            {
                request.ChimeSdkMeetingConfiguration = null;
            }
            if (cmdletContext.ClientRequestToken != null)
            {
                request.ClientRequestToken = cmdletContext.ClientRequestToken;
            }
            if (cmdletContext.SinkArn != null)
            {
                request.SinkArn = cmdletContext.SinkArn;
            }
            if (cmdletContext.SinkType != null)
            {
                request.SinkType = cmdletContext.SinkType;
            }
            if (cmdletContext.SourceArn != null)
            {
                request.SourceArn = cmdletContext.SourceArn;
            }
            if (cmdletContext.SourceType != null)
            {
                request.SourceType = cmdletContext.SourceType;
            }

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