#pragma autorecover
#pragma classflags(64)
#pragma namespace("\\\\.\\Root\\CIMV2")

Instance of __Win32Provider as $OSppProvider
{
  Name = "OSppProvider";
  ClsId = "{9E390D9E-7641-4819-BF38-8EEE08964681}";
  HostingModel = "NetworkServiceHost";
};

Instance of __InstanceProviderRegistration
{
  Provider = $OSppProvider;
  SupportsGet = TRUE;
  SupportsPut = FALSE;
  SupportsDelete = FALSE;
  SupportsEnumeration = TRUE;
  QuerySupportLevels = {"WQL:UnarySelect"};
};

Instance of __MethodProviderRegistration
{
  Provider = $OSppProvider;
};

[dynamic,provider("OSppProvider")] 
class OfficeSoftwareProtectionService
{
  [key,read] string Version;
  [read] string KeyManagementServiceMachine;
  [read] uint32 KeyManagementServicePort;
  [read] uint32 IsKeyManagementServiceMachine;
  [read] uint32 VLActivationInterval;
  [read] uint32 VLRenewalInterval;
  [read] uint32 KeyManagementServiceCurrentCount;
  [read] uint32 RequiredClientCount;
  [read] uint32 PolicyCacheRefreshRequired;
  [read] string ClientMachineID;
  [read] uint32 KeyManagementServiceListeningPort;
  [read] boolean KeyManagementServiceDnsPublishing;
  [read] boolean KeyManagementServiceLowPriority;
  [read] boolean KeyManagementServiceHostCaching;
  [read] uint32 KeyManagementServiceUnlicensedRequests;
  [read] uint32 KeyManagementServiceLicensedRequests;
  [read] uint32 KeyManagementServiceOOBGraceRequests;
  [read] uint32 KeyManagementServiceOOTGraceRequests;
  [read] uint32 KeyManagementServiceNonGenuineGraceRequests;
  [read] uint32 KeyManagementServiceTotalRequests;
  [read] uint32 KeyManagementServiceFailedRequests;
  [read] uint32 KeyManagementServiceNotificationRequests;
  [read] boolean KeyManagementServiceActivationDisabled;
  [Implemented] unit32 InstallProductKey([in] string ProductKey);
  [implemented] uint32 InstallLicense([in] string License);
  [implemented] uint32 InstallLicensePackage([in] string LicensePackage);
  [implemented] uint32 SetKeyManagementServiceMachine([in] string MachineName);
  [implemented] uint32 ClearKeyManagementServiceMachine();
  [implemented] uint32 SetKeyManagementServicePort([in] uint32 PortNumber);
  [implemented] uint32 ClearKeyManagementServicePort();
  [implemented] uint32 SetVLActivationInterval([in] uint32 ActivationInterval);
  [implemented] uint32 SetVLRenewalInterval([in] uint32 RenewalInterval);
  [implemented] uint32 ClearProductKeyFromRegistry();
  [implemented] uint32 AcquireGenuineTicket([in] string TemplateId,[in] string ServerUrl);
  [implemented] uint32 SetKeyManagementServiceListeningPort([in] uint32 PortNumber);
  [implemented] uint32 ClearKeyManagementServiceListeningPort();
  [implemented] uint32 DisableKeyManagementServiceDnsPublishing([in] boolean DisablePublishing);
  [implemented] uint32 EnableKeyManagementServiceLowPriority([in] boolean EnableLowPriority);
  [implemented] uint32 DisableKeyManagementServiceHostCaching([in] boolean DisableCaching);
  [implemented] uint32 DisableKeyManagementServiceActivation([in] boolean DisableActivation);
};

[dynamic,provider("OSppProvider")] 
class OfficeSoftwareProtectionProduct
{
  [key,read] string ID;
  [read] string Name;
  [read] string Description;
  [read] string ApplicationID;
  [read] string ProcessorURL;
  [read] string MachineURL;
  [read] string ProductKeyURL;
  [read] string UseLicenseURL;
  [read] uint32 LicenseStatus;
  [read] uint32 LicenseStatusReason;
  [read] uint32 GracePeriodRemaining;
  [read] datetime EvaluationEndDate;
  [read] string OfflineInstallationId;
  [read] string PartialProductKey;
  [read] string ProductKeyID;
  [read] string ProductKeyID2;
  [read] string LicenseFamily;
  [read] string LicenseDependsOn;
  [read] boolean LicenseIsAddon;
  [read] uint32 VLActivationInterval;
  [read] uint32 VLRenewalInterval;
  [read] string KeyManagementServiceProductKeyID;
  [read] string KeyManagementServiceMachine;
  [read] uint32 KeyManagementServicePort;
  [read] string DiscoveredKeyManagementServiceMachineName;
  [read] uint32 DiscoveredKeyManagementServiceMachinePort;
  [read] uint32 IsKeyManagementServiceMachine;
  [read] uint32 KeyManagementServiceCurrentCount;
  [read] uint32 RequiredClientCount;
  [read] uint32 KeyManagementServiceUnlicensedRequests;
  [read] uint32 KeyManagementServiceLicensedRequests;
  [read] uint32 KeyManagementServiceOOBGraceRequests;
  [read] uint32 KeyManagementServiceOOTGraceRequests;
  [read] uint32 KeyManagementServiceNonGenuineGraceRequests;
  [read] uint32 KeyManagementServiceTotalRequests;
  [read] uint32 KeyManagementServiceFailedRequests;
  [read] uint32 KeyManagementServiceNotificationRequests;
  [read] uint32 GenuineStatus;
  [read] uint32 ExtendedGrace;
  [read] string TokenActivationILID;
  [read] uint32 TokenActivationILVID;
  [read] uint32 TokenActivationGrantNumber;
  [read] string TokenActivationCertificateThumbprint;
  [read] string TokenActivationAdditionalInfo;
  [read] datetime TrustedTime;
  [Implemented] uint32 UninstallProductKey();
  [implemented] uint32 Activate();
  [implemented] uint32 DepositOfflineConfirmationId([in] string InstallationId,[in] string ConfirmationId);
  [implemented] uint32 GetPolicyInformationDWord([in] string PolicyName,[out] uint32 PolicyValue);
  [implemented] uint32 GetPolicyInformationString([in] string PolicyName,[out] string PolicyValue);
  [implemented] uint32 SetKeyManagementServiceMachine([in] string MachineName);
  [implemented] uint32 ClearKeyManagementServiceMachine();
  [implemented] uint32 SetKeyManagementServicePort([in] uint32 PortNumber);
  [implemented] uint32 ClearKeyManagementServicePort();
  [implemented] uint32 GetTokenActivationGrants([out] string Grants[]);
  [implemented] uint32 GenerateTokenActivationChallenge([out] string Challenge);
  [implemented] uint32 DepositTokenActivationResponse([in] string Challenge,[in] string Response,[in] string CertChain);
};

[dynamic,provider("OSppProvider")] 
class OfficeSoftwareProtectionTokenActivationLicense
{
  [key,read] string ID;
  [read] string ILID;
  [read] uint32 ILVID;
  [read] uint32 AuthorizationStatus;
  [read] datetime ExpirationDate;
  [read] string Description;
  [read] string AdditionalInfo;
  [implemented] uint32 Uninstall();
};
#pragma autorecover
#pragma classflags(64)
#pragma namespace("\\\\.\\Root\\CIMV2")
instance of __namespace{ name="ms_409";};
#pragma namespace("\\\\.\\Root\\CIMV2\\ms_409")

[description("This class exposes product-independent properties and methods of the Software Licensing service.") : Amended ToSubclass,AMENDMENT, LOCALE("ms_409")] 
class OfficeSoftwareProtectionService
{
  [key,description("Version of the Software Licensing service") : Amended ToSubclass] string Version;
  [description("The name of the KMS host. Returns null if SetKeyManagementServiceMachine has not been called.") : Amended ToSubclass] string KeyManagementServiceMachine;
  [description("The TCP port used by clients to send KMS-activation requests. Returns 0 if SetKeyManagementServicePort has not been called.") : Amended ToSubclass] uint32 KeyManagementServicePort;
  [description("Indicates whether KMS is enabled on the computer: 0 if false, 1 if true.") : Amended ToSubclass,values{0, 1} : Amended ToSubclass] uint32 IsKeyManagementServiceMachine;
  [description("The frequency, in minutes, of how often a client will contact the KMS host before the client is licensed.") : Amended ToSubclass] uint32 VLActivationInterval;
  [description("The frequency, in minutes, of how often a client will contact the KMS host after the client is licensed.") : Amended ToSubclass] uint32 VLRenewalInterval;
  [description("The count of currently active KMS clients on the KMS host. -1 indicates the computer is not enabled as a KMS, or has not received any client licensing-requests.") : Amended ToSubclass] uint32 KeyManagementServiceCurrentCount;
  [description("The minimum number of clients required to connect to a KMS host in order to enable volume licensing.") : Amended ToSubclass] uint32 RequiredClientCount;
  [description("Indicates whether the licensing policy-cache needs to be updated: 0=not required, 1=Refresh required.") : Amended ToSubclass] uint32 PolicyCacheRefreshRequired;
  [description("The GUID that identifies a KMS client to a KMS host. The client includes this in requests it sends to the KMS.") : Amended ToSubclass] string ClientMachineID;
  [description("The TCP port the KMS host uses to listen for activation requests.") : Amended ToSubclass] uint32 KeyManagementServiceListeningPort;
  [description("Indicates the DNS publishing status of a KMS host: 0=Disabled, 1=Auto publish enabled (default).") : Amended ToSubclass] boolean KeyManagementServiceDnsPublishing;
  [description("Indicates the thread priority status of KMS service: 0=Normal Priority (default), 1=Low priority.") : Amended ToSubclass] boolean KeyManagementServiceLowPriority;
  [description("Indicates the caching status of KMS host name and port: 0=Caching disabled, 1=Caching enabled (default).") : Amended ToSubclass] boolean KeyManagementServiceHostCaching;
  [description("The count of KMS requests from clients with License Status=0 (Unlicensed).") : Amended ToSubclass] uint32 KeyManagementServiceUnlicensedRequests;
  [description("The count of KMS requests from clients with License Status=1 (Licensed).") : Amended ToSubclass] uint32 KeyManagementServiceLicensedRequests;
  [description("The count of KMS requests from clients with License Status=2 (OOBGrace).") : Amended ToSubclass] uint32 KeyManagementServiceOOBGraceRequests;
  [description("The count of KMS requests from clients with License Status=3 (OOTGrace).") : Amended ToSubclass] uint32 KeyManagementServiceOOTGraceRequests;
  [description("The count of KMS requests from clients with License Status=4 (NonGenuineGrace).") : Amended ToSubclass] uint32 KeyManagementServiceNonGenuineGraceRequests;
  [description("The total count of valid KMS requests.") : Amended ToSubclass] uint32 KeyManagementServiceTotalRequests;
  [description("The count of invalid KMS requests.") : Amended ToSubclass] uint32 KeyManagementServiceFailedRequests;
  [description("The count of KMS requests from clients with License Status=5 (Notification).") : Amended ToSubclass] uint32 KeyManagementServiceNotificationRequests;
  [description("Indicates whether the volume activation through key management service is disabled.") : Amended ToSubclass] boolean KeyManagementServiceActivationDisabled;
  [description("Install a product key.") : Amended ToSubclass] unit32 InstallProductKey([in] string ProductKey);
  [description("Installs a license.") : Amended ToSubclass] uint32 InstallLicense([in] string License);
  [description("Install a license package for the current product.") : Amended ToSubclass] uint32 InstallLicensePackage([in] string LicensePackage);
  [description("Sets the KMS host name to use for volume activation.") : Amended ToSubclass] uint32 SetKeyManagementServiceMachine([in] string MachineName);
  [description("Clears any previously configured KMS host name.") : Amended ToSubclass] uint32 ClearKeyManagementServiceMachine();
  [description("Sets the TCP port used by a client to make requests of a KMS host. If not specified, port 1688 is used.") : Amended ToSubclass] uint32 SetKeyManagementServicePort([in] uint32 PortNumber);
  [description("Clears any previously specified port number.") : Amended ToSubclass] uint32 ClearKeyManagementServicePort();
  [description("The activation frequency, in minutes, of how often KMS-clients will contact the KMS host before they become licensed. The frequency must be greater than or equal to 15 and less than or equal to 43200. An error is returned if the method is called and the computer is not a KMS.") : Amended ToSubclass] uint32 SetVLActivationInterval([in] uint32 ActivationInterval);
  [description("The renewal frequency, in minutes, of how often KMS-clients will contact the KMS host after they have become licensed. The frequency must be greater than or equal to 15 and less than or equal to 43200. An error is returned if the method is called and the computer is not a KMS.") : Amended ToSubclass] uint32 SetVLRenewalInterval([in] uint32 RenewalInterval);
  [description("Clears product key from the registry.") : Amended ToSubclass] uint32 ClearProductKeyFromRegistry();
  [description("Performs online Genuine Validation. Calling this method may change the Genuine status of the computer.") : Amended ToSubclass] uint32 AcquireGenuineTicket([in] string TemplateId,[in] string ServerUrl);
  [description("Sets the TCP port used by a KMS host to listen for activation requests. Applies to KMS hosts only. If not specified, 1688 is used.") : Amended ToSubclass] uint32 SetKeyManagementServiceListeningPort([in] uint32 PortNumber);
  [description("Clears any previously specified listening port. Applies to KMS hosts only.") : Amended ToSubclass] uint32 ClearKeyManagementServiceListeningPort();
  [description("Enable/Disable the DNS Publishing on a KMS host computer: 0=Enable, 1=Disable.") : Amended ToSubclass] uint32 DisableKeyManagementServiceDnsPublishing([in] boolean DisablePublishing);
  [description("Enable/Disable KMS service running with low priority: 0=Disable, 1=Enable.") : Amended ToSubclass] uint32 EnableKeyManagementServiceLowPriority([in] boolean EnableLowPriority);
  [description("Enable/Disable the caching of the KMS hostname and port on a volume activation client computer: 0=Enable, 1=Disable.") : Amended ToSubclass] uint32 DisableKeyManagementServiceHostCaching([in] boolean DisableCaching);
  [description("Enable/Disable volume activation through KMS machine: 0=Enable, 1=Disable.") : Amended ToSubclass] uint32 DisableKeyManagementServiceActivation([in] boolean DisableActivation);
};

[description("This class exposes product-specific properties and methods of the Software Licensing service.") : Amended ToSubclass,AMENDMENT, LOCALE("ms_409")] 
class OfficeSoftwareProtectionProduct
{
  [key,description("Product Identifier") : Amended ToSubclass] string ID;
  [description("Product Name") : Amended ToSubclass] string Name;
  [description("Product Description") : Amended ToSubclass] string Description;
  [description("ID of current product's Application") : Amended ToSubclass] string ApplicationID;
  [description("Software licensing server URL for the process certificate") : Amended ToSubclass] string ProcessorURL;
  [description("Software licensing server URL for the binding certificate") : Amended ToSubclass] string MachineURL;
  [description("Software licensing server URL for the product certificate") : Amended ToSubclass] string ProductKeyURL;
  [description("Software licensing server URL for the user license") : Amended ToSubclass] string UseLicenseURL;
  [description("License status of this product's application.  0=Unlicensed, 1=Licensed, 2=OOBGrace, 3=OOTGrace, 4=NonGenuineGrace, 5=Notification.") : Amended ToSubclass,values{0, 1, 2, 3, 4, 5} : Amended ToSubclass] uint32 LicenseStatus;
  [description("A diagnostic code which indicates why a computer is in a specific licensing state.") : Amended ToSubclass] uint32 LicenseStatusReason;
  [description("Remaining time in minutes before the parent application becomes unlicensed.  For KMS clients, this is the remaining time before re-Activation is required.") : Amended ToSubclass] uint32 GracePeriodRemaining;
  [description("The expiration date of this product's application.  After this date, the LicenseStatus will be Unlicensed, and cannot be Activated.") : Amended ToSubclass] datetime EvaluationEndDate;
  [description("An identifier for this product's application that can be used for telephone or offline activation. Returns null if a product key is not installed.") : Amended ToSubclass] string OfflineInstallationId;
  [description("Last five characters of this product's key. Returns null if a product key is not installed.") : Amended ToSubclass] string PartialProductKey;
  [description("Product key ID. Returns null if a product key is not installed.") : Amended ToSubclass] string ProductKeyID;
  [description("Product key ID2, PID2, string. Returns null if a product key is not installed.") : Amended ToSubclass] string ProductKeyID2;
  [description("The family identifier for the SKU used to determine license relationships for add-ons.") : Amended ToSubclass] string LicenseFamily;
  [description("The dependency identifier for the family of SKUs used to determine license relationships for add-ons.") : Amended ToSubclass] string LicenseDependsOn;
  [description("Returns True if the product is identified as an add-on license.") : Amended ToSubclass] boolean LicenseIsAddon;
  [description("The frequency, in minutes, of how often a client will contact the KMS host before the product is licensed.") : Amended ToSubclass] uint32 VLActivationInterval;
  [description("The frequency, in minutes, of how often a client will contact the KMS host after the product is licensed.") : Amended ToSubclass] uint32 VLRenewalInterval;
  [description("KMS product key ID. Returns null if not applicable.") : Amended ToSubclass] string KeyManagementServiceProductKeyID;
  [description("The name of the KMS host. Returns null if SetKeyManagementServiceMachine has not been called.") : Amended ToSubclass] string KeyManagementServiceMachine;
  [description("The TCP port used by clients to send KMS-activation requests. Returns 0 if SetKeyManagementServicePort has not been called.") : Amended ToSubclass] uint32 KeyManagementServicePort;
  [description("Last discovered KMS host name through DNS.") : Amended ToSubclass] string DiscoveredKeyManagementServiceMachineName;
  [description("Last discovered KMS host port through DNS.") : Amended ToSubclass] uint32 DiscoveredKeyManagementServiceMachinePort;
  [description("Indicates if KMS is enabled on the computer: 1 if true, 0 if false.") : Amended ToSubclass,values{0, 1} : Amended ToSubclass] uint32 IsKeyManagementServiceMachine;
  [description("The count of currently active KMS clients on the KMS host. -1 indicates the host is not enabled as a KMS, or has not received any client licensing-requests.") : Amended ToSubclass] uint32 KeyManagementServiceCurrentCount;
  [description("The minimum number of clients required to connect to a KMS host in order to enable volume licensing.") : Amended ToSubclass] uint32 RequiredClientCount;
  [description("The count of KMS requests from clients with License Status=0 (Unlicensed).") : Amended ToSubclass] uint32 KeyManagementServiceUnlicensedRequests;
  [description("The count of KMS requests from clients with License Status=1 (Licensed).") : Amended ToSubclass] uint32 KeyManagementServiceLicensedRequests;
  [description("The count of KMS requests from clients with License Status=2 (OOBGrace).") : Amended ToSubclass] uint32 KeyManagementServiceOOBGraceRequests;
  [description("The count of KMS requests from clients with License Status=3 (OOTGrace).") : Amended ToSubclass] uint32 KeyManagementServiceOOTGraceRequests;
  [description("The count of KMS requests from clients with License Status=4 (NonGenuineGrace).") : Amended ToSubclass] uint32 KeyManagementServiceNonGenuineGraceRequests;
  [description("The total count of valid KMS requests.") : Amended ToSubclass] uint32 KeyManagementServiceTotalRequests;
  [description("The total count of failed KMS requests.") : Amended ToSubclass] uint32 KeyManagementServiceFailedRequests;
  [description("The count of KMS requests from clients with License Status=5 (Notification).") : Amended ToSubclass] uint32 KeyManagementServiceNotificationRequests;
  [description("Genuine status for this product.") : Amended ToSubclass] uint32 GenuineStatus;
  [description("Extended grace time in minutes before the parent application becomes unlicensed.") : Amended ToSubclass] uint32 ExtendedGrace;
  [description("ID of the token-based activation license that activated the product.") : Amended ToSubclass] string TokenActivationILID;
  [description("Version of the token-based activation license that activated the product.") : Amended ToSubclass] uint32 TokenActivationILVID;
  [description("Grant number in the token-based activation license that activated the product.") : Amended ToSubclass] uint32 TokenActivationGrantNumber;
  [description("Thumbprint of the certificate that activated the product.") : Amended ToSubclass] string TokenActivationCertificateThumbprint;
  [description("Additional information for token-based activation.") : Amended ToSubclass] string TokenActivationAdditionalInfo;
  [description("The trusted time for the product.") : Amended ToSubclass] datetime TrustedTime;
  [description("Uninstalls a product key for the current product.") : Amended ToSubclass] uint32 UninstallProductKey();
  [description("Activates the current product.") : Amended ToSubclass] uint32 Activate();
  [description("Activates a product by depositing an Offline Confirmation Identifier for this product when performing telephone or offline activation.") : Amended ToSubclass] uint32 DepositOfflineConfirmationId([in] string InstallationId,[in] string ConfirmationId);
  [description("Gets license policy Information of type DWORD.") : Amended ToSubclass] uint32 GetPolicyInformationDWord([in] string PolicyName,[out] uint32 PolicyValue);
  [description("Gets policy information of type string.") : Amended ToSubclass] uint32 GetPolicyInformationString([in] string PolicyName,[out] string PolicyValue);
  [description("Sets the KMS host name to use for volume activation.") : Amended ToSubclass] uint32 SetKeyManagementServiceMachine([in] string MachineName);
  [description("Clears any previously configured KMS host name.") : Amended ToSubclass] uint32 ClearKeyManagementServiceMachine();
  [description("Sets the TCP port used by a client to make requests of a KMS host. If not specified, port 1688 is used.") : Amended ToSubclass] uint32 SetKeyManagementServicePort([in] uint32 PortNumber);
  [description("Clears any previously specified port number.") : Amended ToSubclass] uint32 ClearKeyManagementServicePort();
  [description("Returns token-based activation grants.") : Amended ToSubclass] uint32 GetTokenActivationGrants([out] string Grants[]);
  [description("Returns token-based activation challenge.") : Amended ToSubclass] uint32 GenerateTokenActivationChallenge([out] string Challenge);
  [description("Deposits token-based activation response.") : Amended ToSubclass] uint32 DepositTokenActivationResponse([in] string Challenge,[in] string Response,[in] string CertChain);
};

[description("This class exposes properties of installed token-based activation licenses.") : Amended ToSubclass,AMENDMENT, LOCALE("ms_409")] 
class OfficeSoftwareProtectionTokenActivationLicense
{
  [key,description("A GUID used internally by the Software Licensing service to uniquely identify an XRML license.") : Amended ToSubclass] string ID;
  [description("A GUID used to identify the Issuance License (IL) to the customer. The ILID is not unique, unless combined with the ILVID.") : Amended ToSubclass] string ILID;
  [description("A Version number used along with the ILID to allow customers to version their licenses.") : Amended ToSubclass] uint32 ILVID;
  [description("An HRESULT returned from the Issuance License (IL) authorization. ") : Amended ToSubclass] uint32 AuthorizationStatus;
  [description("A UTC datetime after which the Issuance License (IL) cannot be used for Token Activation.") : Amended ToSubclass] datetime ExpirationDate;
  [description("Optional text provided by the customer and included in the Issuance License (IL).") : Amended ToSubclass] string Description;
  [description("Optional text used by Microsoft to provide additional metadata.") : Amended ToSubclass] string AdditionalInfo;
  [description("Uninstalls this license.") : Amended ToSubclass] uint32 Uninstall();
};
