# 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
    #
    # The PlayReady license
    #
    class ContentKeyPolicyPlayReadyLicense

      include MsRestAzure

      # @return [Boolean] A flag indicating whether test devices can use the
      # license.
      attr_accessor :allow_test_devices

      # @return [DateTime] The begin date of license
      attr_accessor :begin_date

      # @return [DateTime] The expiration date of license.
      attr_accessor :expiration_date

      # @return [Duration] The relative begin date of license.
      attr_accessor :relative_begin_date

      # @return [Duration] The relative expiration date of license.
      attr_accessor :relative_expiration_date

      # @return [Duration] The grace period of license.
      attr_accessor :grace_period

      # @return [ContentKeyPolicyPlayReadyPlayRight] The license PlayRight
      attr_accessor :play_right

      # @return [ContentKeyPolicyPlayReadyLicenseType] The license type.
      # Possible values include: 'Unknown', 'NonPersistent', 'Persistent'
      attr_accessor :license_type

      # @return [ContentKeyPolicyPlayReadyContentKeyLocation] The content key
      # location.
      attr_accessor :content_key_location

      # @return [ContentKeyPolicyPlayReadyContentType] The PlayReady content
      # type. Possible values include: 'Unknown', 'Unspecified',
      # 'UltraVioletDownload', 'UltraVioletStreaming'
      attr_accessor :content_type


      #
      # Mapper for ContentKeyPolicyPlayReadyLicense class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ContentKeyPolicyPlayReadyLicense',
          type: {
            name: 'Composite',
            class_name: 'ContentKeyPolicyPlayReadyLicense',
            model_properties: {
              allow_test_devices: {
                client_side_validation: true,
                required: true,
                serialized_name: 'allowTestDevices',
                type: {
                  name: 'Boolean'
                }
              },
              begin_date: {
                client_side_validation: true,
                required: false,
                serialized_name: 'beginDate',
                type: {
                  name: 'DateTime'
                }
              },
              expiration_date: {
                client_side_validation: true,
                required: false,
                serialized_name: 'expirationDate',
                type: {
                  name: 'DateTime'
                }
              },
              relative_begin_date: {
                client_side_validation: true,
                required: false,
                serialized_name: 'relativeBeginDate',
                type: {
                  name: 'TimeSpan'
                }
              },
              relative_expiration_date: {
                client_side_validation: true,
                required: false,
                serialized_name: 'relativeExpirationDate',
                type: {
                  name: 'TimeSpan'
                }
              },
              grace_period: {
                client_side_validation: true,
                required: false,
                serialized_name: 'gracePeriod',
                type: {
                  name: 'TimeSpan'
                }
              },
              play_right: {
                client_side_validation: true,
                required: false,
                serialized_name: 'playRight',
                type: {
                  name: 'Composite',
                  class_name: 'ContentKeyPolicyPlayReadyPlayRight'
                }
              },
              license_type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'licenseType',
                type: {
                  name: 'String'
                }
              },
              content_key_location: {
                client_side_validation: true,
                required: true,
                serialized_name: 'contentKeyLocation',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: '@odata.type',
                  uber_parent: 'ContentKeyPolicyPlayReadyContentKeyLocation',
                  class_name: 'ContentKeyPolicyPlayReadyContentKeyLocation'
                }
              },
              content_type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'contentType',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
