-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcLicenseCheckResult.py
81 lines (77 loc) · 3.25 KB
/
cLicenseCheckResult.py
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
from mDateTime import cDate;
try:
from mNotProvided import fAssertTypes as f0AssertTypes;
except ModuleNotFoundError as oException:
if oException.args[0] != "No module named 'mNotProvided'":
raise;
f0AssertTypes = None;
from .cVersion import cVersion;
from .iObjectWithInheritingDataStructure import iObjectWithInheritingDataStructure;
from .cDataStructure import cDataStructure;
class cLicenseCheckResult(iObjectWithInheritingDataStructure):
sRequestStructureVersion = "2021-07-02 11:16"; # Which structure version to ask the server to provide.
dxInheritingValues = {
"sStructureVersion": "2021-07-02 11:16",
};
def __init__(oSelf,
s0LicensesIsInvalidForReason,
oNextCheckWithServerDate,
bLicenseMayNeedToBeUpdated,
b0InLicensePeriod,
s0LicenseIsRevokedForReason,
b0DeactivatedOnSystem,
b0LicenseInstancesExceeded,
):
if f0AssertTypes: f0AssertTypes({
"s0LicensesIsInvalidForReason": (s0LicensesIsInvalidForReason, str, None),
"bLicenseMayNeedToBeUpdated": (bLicenseMayNeedToBeUpdated, bool),
"b0InLicensePeriod": (b0InLicensePeriod, bool, None),
"s0LicenseIsRevokedForReason": (s0LicenseIsRevokedForReason, str, None),
"b0DeactivatedOnSystem": (b0DeactivatedOnSystem, bool, None),
"b0LicenseInstancesExceeded": (b0LicenseInstancesExceeded, bool, None),
"oNextCheckWithServerDate": (oNextCheckWithServerDate, cDate),
});
oSelf.s0LicensesIsInvalidForReason = s0LicensesIsInvalidForReason;
oSelf.bLicenseMayNeedToBeUpdated = bLicenseMayNeedToBeUpdated;
oSelf.b0InLicensePeriod = b0InLicensePeriod;
oSelf.s0LicenseIsRevokedForReason = s0LicenseIsRevokedForReason;
oSelf.b0DeactivatedOnSystem = b0DeactivatedOnSystem;
oSelf.b0LicenseInstancesExceeded = b0LicenseInstancesExceeded;
oSelf.oNextCheckWithServerDate = oNextCheckWithServerDate;
cLicenseCheckResult.oDataStructure = cDataStructure(
{
"sStructureVersion": "string:2021-07-02 11:16",
# required
"s0LicensesIsInvalidForReason": ("string", None),
"oNextCheckWithServerDate": ("date"),
"bLicenseMayNeedToBeUpdated": ("boolean", None),
"b0InLicensePeriod": ("boolean", None),
"s0LicenseIsRevokedForReason": ("string", None),
"b0DeactivatedOnSystem": ("boolean", None),
"b0LicenseInstancesExceeded": ("boolean", None),
# optional
"?sError": None, # Automatically added by server; ignored.
},
f0oConstructor = (
lambda
sStructureVersion, # not used
s0LicensesIsInvalidForReason,
oNextCheckWithServerDate,
bLicenseMayNeedToBeUpdated,
b0InLicensePeriod,
s0LicenseIsRevokedForReason,
b0DeactivatedOnSystem,
b0LicenseInstancesExceeded,
sError = None: # optional, ignored
cLicenseCheckResult(
s0LicensesIsInvalidForReason = s0LicensesIsInvalidForReason,
oNextCheckWithServerDate = oNextCheckWithServerDate,
bLicenseMayNeedToBeUpdated = bLicenseMayNeedToBeUpdated,
b0InLicensePeriod = b0InLicensePeriod,
s0LicenseIsRevokedForReason = s0LicenseIsRevokedForReason,
b0DeactivatedOnSystem = b0DeactivatedOnSystem,
b0LicenseInstancesExceeded = b0LicenseInstancesExceeded,
)
),
);
cLicenseCheckResult.toCompatibleDataStructures = tuple(); # No older datastructures are supported at this time.;