/// <summary>
        /// Creates an IngestInputStream and adds it to an encoding.
        /// The IngestInputStream is used to define where a file to read a stream from is located. <para />
        ///
        /// API endpoint:
        /// https://bitmovin.com/docs/encoding/api-reference/sections/encodings#/Encoding/PostEncodingEncodingsInputStreamsIngestByEncodingId
        /// </summary>
        /// <param name="encoding">The encoding to add the stream onto</param>
        /// <param name="input">The input resource providing the input file</param>
        /// <param name="inputPath">The path to the input file.</param>
        /// <param name="streamSelectionMode">The algorithm how the stream in the input file will be selected.</param>
        private Task <IngestInputStream> CreateIngestInputStream(Models.Encoding encoding, Input input, String inputPath,
                                                                 StreamSelectionMode streamSelectionMode)
        {
            var ingestInputStream = new IngestInputStream()
            {
                InputId       = input.Id,
                InputPath     = inputPath,
                SelectionMode = streamSelectionMode
            };

            return(_bitmovinApi.Encoding.Encodings.InputStreams.Ingest.CreateAsync(encoding.Id, ingestInputStream));
        }
        /// <summary>
        /// Creates a stream which binds an input file to a codec configuration.
        /// The stream is used for muxings later on.<para />
        ///
        /// API endpoint:
        /// https://bitmovin.com/docs/encoding/api-reference/sections/encodings#/Encoding/PostEncodingEncodingsStreamsByEncodingId
        /// </summary>
        /// <param name="encoding">The encoding to add the stream onto</param>
        /// <param name="input">The input that should be used</param>
        /// <param name="inputPath">The path to the input file</param>
        /// <param name="configuration">The codec configuration to be applied to the stream</param>
        /// <param name="streamSelectionMode">The path to the input file</param>
        /// <param name="position">The codec configuration to be applied to the stream</param>
        private Task <Stream> CreateStream(Models.Encoding encoding, Input input, string inputPath,
                                           CodecConfiguration configuration, StreamSelectionMode streamSelectionMode, int position)
        {
            var streamInput = new StreamInput()
            {
                InputId       = input.Id,
                InputPath     = inputPath,
                SelectionMode = streamSelectionMode,
                Position      = position
            };

            var stream = new Stream()
            {
                InputStreams = new List <StreamInput>()
                {
                    streamInput
                },
                CodecConfigId = configuration.Id,
                Mode          = StreamMode.STANDARD
            };

            return(_bitmovinApi.Encoding.Encodings.Streams.CreateAsync(encoding.Id, stream));
        }