# 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::V2018_06_01_preview
  module Models
    #
    # Describes the settings to be used when encoding the input video into a
    # desired output bitrate layer.
    #
    class VideoLayer < Layer

      include MsRestAzure


      def initialize
        @odatatype = "#Microsoft.Media.VideoLayer"
      end

      attr_accessor :odatatype

      # @return [Integer] The average bitrate in bits per second at which to
      # encode the input video when generating this layer. This is a required
      # field.
      attr_accessor :bitrate

      # @return [Integer] The maximum bitrate (in bits per second), at which
      # the VBV buffer should be assumed to refill. If not specified, defaults
      # to the same value as bitrate.
      attr_accessor :max_bitrate

      # @return [Integer] The number of B-frames to be used when encoding this
      # layer.  If not specified, the encoder chooses an appropriate number
      # based on the video profile and level.
      attr_accessor :b_frames

      # @return [String] The frame rate (in frames per second) at which to
      # encode this layer. The value can be in the form of M/N where M and N
      # are integers (For example, 30000/1001), or in the form of a number (For
      # example, 30, or 29.97). The encoder enforces constraints on allowed
      # frame rates based on the profile and level. If it is not specified, the
      # encoder will use the same frame rate as the input video.
      attr_accessor :frame_rate

      # @return [Integer] The number of slices to be used when encoding this
      # layer. If not specified, default is zero, which means that encoder will
      # use a single slice for each frame.
      attr_accessor :slices

      # @return [Boolean] Whether or not adaptive B-frames are to be used when
      # encoding this layer. If not specified, the encoder will turn it on
      # whenever the video profile permits its use.
      attr_accessor :adaptive_bframe


      #
      # Mapper for VideoLayer class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: '#Microsoft.Media.VideoLayer',
          type: {
            name: 'Composite',
            class_name: 'VideoLayer',
            model_properties: {
              width: {
                client_side_validation: true,
                required: false,
                serialized_name: 'width',
                type: {
                  name: 'String'
                }
              },
              height: {
                client_side_validation: true,
                required: false,
                serialized_name: 'height',
                type: {
                  name: 'String'
                }
              },
              label: {
                client_side_validation: true,
                required: false,
                serialized_name: 'label',
                type: {
                  name: 'String'
                }
              },
              odatatype: {
                client_side_validation: true,
                required: true,
                serialized_name: '@odata\\.type',
                type: {
                  name: 'String'
                }
              },
              bitrate: {
                client_side_validation: true,
                required: false,
                serialized_name: 'bitrate',
                type: {
                  name: 'Number'
                }
              },
              max_bitrate: {
                client_side_validation: true,
                required: false,
                serialized_name: 'maxBitrate',
                type: {
                  name: 'Number'
                }
              },
              b_frames: {
                client_side_validation: true,
                required: false,
                serialized_name: 'bFrames',
                type: {
                  name: 'Number'
                }
              },
              frame_rate: {
                client_side_validation: true,
                required: false,
                serialized_name: 'frameRate',
                type: {
                  name: 'String'
                }
              },
              slices: {
                client_side_validation: true,
                required: false,
                serialized_name: 'slices',
                type: {
                  name: 'Number'
                }
              },
              adaptive_bframe: {
                client_side_validation: true,
                required: false,
                serialized_name: 'adaptiveBFrame',
                type: {
                  name: 'Boolean'
                }
              }
            }
          }
        }
      end
    end
  end
end
