# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::MediaServices::Mgmt::V2020_05_01
  module Models
    #
    # Specifies the live event type and optional encoding settings for encoding
    # live events.
    #
    class LiveEventEncoding

      include MsRestAzure

      # @return [LiveEventEncodingType] Live event type. When encodingType is
      # set to None, the service simply passes through the incoming video and
      # audio layer(s) to the output. When encodingType is set to Standard or
      # Premium1080p, a live encoder transcodes the incoming stream into
      # multiple bitrates or layers. See
      # https://go.microsoft.com/fwlink/?linkid=2095101 for more information.
      # This property cannot be modified after the live event is created.
      # Possible values include: 'None', 'Standard', 'Premium1080p'
      attr_accessor :encoding_type

      # @return [String] The optional encoding preset name, used when
      # encodingType is not None. This value is specified at creation time and
      # cannot be updated. If the encodingType is set to Standard, then the
      # default preset name is ‘Default720p’. Else if the encodingType is set
      # to Premium1080p, the default preset is ‘Default1080p’.
      attr_accessor :preset_name

      # @return [StretchMode] Specifies how the input video will be resized to
      # fit the desired output resolution(s). Default is None. Possible values
      # include: 'None', 'AutoSize', 'AutoFit'
      attr_accessor :stretch_mode

      # @return [Duration] Use an ISO 8601 time value between 0.5 to 20 seconds
      # to specify the output fragment length for the video and audio tracks of
      # an encoding live event. For example, use PT2S to indicate 2 seconds.
      # For the video track it also defines the key frame interval, or the
      # length of a GoP (group of pictures).   If this value is not set for an
      # encoding live event, the fragment duration defaults to 2 seconds. The
      # value cannot be set for pass-through live events.
      attr_accessor :key_frame_interval


      #
      # Mapper for LiveEventEncoding class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'LiveEventEncoding',
          type: {
            name: 'Composite',
            class_name: 'LiveEventEncoding',
            model_properties: {
              encoding_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'encodingType',
                type: {
                  name: 'String'
                }
              },
              preset_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'presetName',
                type: {
                  name: 'String'
                }
              },
              stretch_mode: {
                client_side_validation: true,
                required: false,
                serialized_name: 'stretchMode',
                type: {
                  name: 'String'
                }
              },
              key_frame_interval: {
                client_side_validation: true,
                required: false,
                serialized_name: 'keyFrameInterval',
                type: {
                  name: 'TimeSpan'
                }
              }
            }
          }
        }
      end
    end
  end
end
