# 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_07_01
  module Models
    #
    # Base class for Content Key Policy restrictions. A derived class must be
    # used to create a restriction.
    #
    class ContentKeyPolicyRestriction

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["#Microsoft.Media.ContentKeyPolicyOpenRestriction"] = "ContentKeyPolicyOpenRestriction"
      @@discriminatorMap["#Microsoft.Media.ContentKeyPolicyUnknownRestriction"] = "ContentKeyPolicyUnknownRestriction"
      @@discriminatorMap["#Microsoft.Media.ContentKeyPolicyTokenRestriction"] = "ContentKeyPolicyTokenRestriction"

      def initialize
        @odatatype = "ContentKeyPolicyRestriction"
      end

      attr_accessor :odatatype


      #
      # Mapper for ContentKeyPolicyRestriction class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ContentKeyPolicyRestriction',
          type: {
            name: 'Composite',
            polymorphic_discriminator: '@odata.type',
            uber_parent: 'ContentKeyPolicyRestriction',
            class_name: 'ContentKeyPolicyRestriction',
            model_properties: {
            }
          }
        }
      end
    end
  end
end
