-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ContentKeyPolicyPlayReadyLicense.cs
94 lines (87 loc) · 6.11 KB
/
ContentKeyPolicyPlayReadyLicense.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using Azure.Core;
namespace Azure.ResourceManager.Media.Models
{
/// <summary> The PlayReady license. </summary>
public partial class ContentKeyPolicyPlayReadyLicense
{
/// <summary> Initializes a new instance of ContentKeyPolicyPlayReadyLicense. </summary>
/// <param name="allowTestDevices"> A flag indicating whether test devices can use the license. </param>
/// <param name="licenseType"> The license type. </param>
/// <param name="contentKeyLocation">
/// The content key location.
/// Please note <see cref="ContentKeyPolicyPlayReadyContentKeyLocation"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader"/> and <see cref="ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier"/>.
/// </param>
/// <param name="contentType"> The PlayReady content type. </param>
/// <exception cref="ArgumentNullException"> <paramref name="contentKeyLocation"/> is null. </exception>
public ContentKeyPolicyPlayReadyLicense(bool allowTestDevices, ContentKeyPolicyPlayReadyLicenseType licenseType, ContentKeyPolicyPlayReadyContentKeyLocation contentKeyLocation, ContentKeyPolicyPlayReadyContentType contentType)
{
Argument.AssertNotNull(contentKeyLocation, nameof(contentKeyLocation));
AllowTestDevices = allowTestDevices;
LicenseType = licenseType;
ContentKeyLocation = contentKeyLocation;
ContentType = contentType;
}
/// <summary> Initializes a new instance of ContentKeyPolicyPlayReadyLicense. </summary>
/// <param name="allowTestDevices"> A flag indicating whether test devices can use the license. </param>
/// <param name="securityLevel"> The security level. </param>
/// <param name="beginOn"> The begin date of license. </param>
/// <param name="expireOn"> The expiration date of license. </param>
/// <param name="relativeBeginDate"> The relative begin date of license. </param>
/// <param name="relativeExpirationDate"> The relative expiration date of license. </param>
/// <param name="gracePeriod"> The grace period of license. </param>
/// <param name="playRight"> The license PlayRight. </param>
/// <param name="licenseType"> The license type. </param>
/// <param name="contentKeyLocation">
/// The content key location.
/// Please note <see cref="ContentKeyPolicyPlayReadyContentKeyLocation"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader"/> and <see cref="ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier"/>.
/// </param>
/// <param name="contentType"> The PlayReady content type. </param>
internal ContentKeyPolicyPlayReadyLicense(bool allowTestDevices, PlayReadySecurityLevel? securityLevel, DateTimeOffset? beginOn, DateTimeOffset? expireOn, TimeSpan? relativeBeginDate, TimeSpan? relativeExpirationDate, TimeSpan? gracePeriod, ContentKeyPolicyPlayReadyPlayRight playRight, ContentKeyPolicyPlayReadyLicenseType licenseType, ContentKeyPolicyPlayReadyContentKeyLocation contentKeyLocation, ContentKeyPolicyPlayReadyContentType contentType)
{
AllowTestDevices = allowTestDevices;
SecurityLevel = securityLevel;
BeginOn = beginOn;
ExpireOn = expireOn;
RelativeBeginDate = relativeBeginDate;
RelativeExpirationDate = relativeExpirationDate;
GracePeriod = gracePeriod;
PlayRight = playRight;
LicenseType = licenseType;
ContentKeyLocation = contentKeyLocation;
ContentType = contentType;
}
/// <summary> A flag indicating whether test devices can use the license. </summary>
public bool AllowTestDevices { get; set; }
/// <summary> The security level. </summary>
public PlayReadySecurityLevel? SecurityLevel { get; set; }
/// <summary> The begin date of license. </summary>
public DateTimeOffset? BeginOn { get; set; }
/// <summary> The expiration date of license. </summary>
public DateTimeOffset? ExpireOn { get; set; }
/// <summary> The relative begin date of license. </summary>
public TimeSpan? RelativeBeginDate { get; set; }
/// <summary> The relative expiration date of license. </summary>
public TimeSpan? RelativeExpirationDate { get; set; }
/// <summary> The grace period of license. </summary>
public TimeSpan? GracePeriod { get; set; }
/// <summary> The license PlayRight. </summary>
public ContentKeyPolicyPlayReadyPlayRight PlayRight { get; set; }
/// <summary> The license type. </summary>
public ContentKeyPolicyPlayReadyLicenseType LicenseType { get; set; }
/// <summary>
/// The content key location.
/// Please note <see cref="ContentKeyPolicyPlayReadyContentKeyLocation"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader"/> and <see cref="ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier"/>.
/// </summary>
public ContentKeyPolicyPlayReadyContentKeyLocation ContentKeyLocation { get; set; }
/// <summary> The PlayReady content type. </summary>
public ContentKeyPolicyPlayReadyContentType ContentType { get; set; }
}
}