#pragma autorecover
#pragma classflags(64)
#pragma namespace("\\\\.\\root\\Microsoft\\Windows\\Hgs")
instance of __namespace{ name="MS_809";};
#pragma namespace("\\\\.\\root\\Microsoft\\Windows\\Hgs\\MS_809")

[ClassVersion("1.0") : Amended,Description("Configuration of the Host Guardian Service Client.") : Amended ToSubclass,AMENDMENT, LOCALE("MS_809")] 
class MSFT_HgsClientConfiguration
{
  [Values{"Unknown", "Local Mode", "Secure Hosting Service Mode"} : Amended ToSubclass,Description("The current operational mode of the Host Guardian Service Client.") : Amended ToSubclass] uint16 Mode;
  [Description("Flag indicating whether the host passed attestaion from the attestation server.") : Amended ToSubclass] boolean IsHostGuarded;
  [Description("The URL to the Key Protection Service.") : Amended ToSubclass] string KeyProtectionServerUrl;
  [Description("The URL to the Attestation Service.") : Amended ToSubclass] string AttestationServerUrl;
  [Description("The current Attestation operational mode of the Host Guardian Service Client.") : Amended ToSubclass] uint16 AttestationOperationMode;
  [Description("The Attestation status of the Host Guardian Service Client.") : Amended ToSubclass] uint16 AttestationStatus;
  [Description("The Attestation substatus of the Host Guardian Service Client.") : Amended ToSubclass] uint64 AttestationSubstatus;
  [Description("The URL to fallback Key Protection Services.") : Amended ToSubclass] string FallbackKeyProtectionServerUrl[];
  [Description("The URL to fallback Attestation Services.") : Amended ToSubclass] string FallbackAttestationServerUrl[];
  [Description("The URL to the Key Protection Service used to satisfy a request.") : Amended ToSubclass] string LastKeyProtectionServerUrl;
  [Description("The URL to the Attestation Service used to satisfy a request.") : Amended ToSubclass] string LastAttestationServerUrl;
  [Description("Retrieves the local Host Guardian Service Client configuration.") : Amended ToSubclass] uint32 Get([Out,Description("The configuration of the Host Guardian Service client.") : Amended ToSubclass] MSFT_HgsClientConfiguration cmdletOutput);
  [Description("Tests if the host is trusted by attestation using the provided service URL's.") : Amended ToSubclass] uint32 IsHostTrusted([In,Description("URL of the Attestation Server.") : Amended ToSubclass] string AttestationServerUrl,[Out,Description("Flag indicating whether the host passed attestaion from the attestation server.") : Amended ToSubclass] boolean IsHostGuarded,[Out,Description("The current Attestation operational mode of the Host Guardian Service Client.") : Amended ToSubclass] uint16 AttestationOperationMode,[Out,Description("The Attestation status of the Host Guardian Service Client.") : Amended ToSubclass] uint16 AttestationStatus,[Out,Description("The Attestation substatus of the Host Guardian Service Client.") : Amended ToSubclass] uint64 AttestationSubstatus);
  [Description("Modifies the configuration of the Host Guardian Service Client.") : Amended ToSubclass] uint32 SetByChangeToLocalMode([In,Description("Changes the Mode of Host Guardian Service client from 'Host Guardian Service' to 'Local' mode.") : Amended ToSubclass] boolean EnableLocalMode,[Out,Description("The configuration of the Host Guardian Service client.") : Amended ToSubclass] MSFT_HgsClientConfiguration cmdletOutput);
  [Description("Modifies the configuration of the Host Guardian Service Client.") : Amended ToSubclass] uint32 SetBySecureHostingServiceMode([In,Description("URL of the Key Protection Server to be used by the Host Guardian Service Client in Secure Hosting Service mode.") : Amended ToSubclass] string KeyProtectionServerUrl,[In,Description("URL of the Attestation Server to be used by the Host Guardian Service Client in Secure Hosting Service mode.") : Amended ToSubclass] string AttestationServerUrl,[Out,Description("The configuration of the Host Guardian Service client.") : Amended ToSubclass] MSFT_HgsClientConfiguration cmdletOutput,[In,Description("URL of the fallback Key Protection Server to be used by the Host Guardian Service Client in Secure Hosting Service mode.  Setting this value to null will leave fallback settings unmodified, while setting this value to an empty array will cause the fallback settings to be cleared entirely.") : Amended ToSubclass] string FallbackKeyProtectionServerUrl[],[In,Description("URL of the fallback Attestation Server to be used by the Host Guardian Service Client in Secure Hosting Service mode.  Setting this value to null will leave fallback settings unmodified, while setting this value to an empty array will cause the fallback settings to be cleared entirely.") : Amended ToSubclass] string FallbackAttestationServerUrl[]);
};

[ClassVersion("1.0") : Amended,Description("The principal to whom key rights can be assigned.") : Amended ToSubclass,AMENDMENT, LOCALE("MS_809")] 
class MSFT_HgsGuardian
{
  [key,Description("The unique name of the Guardian.") : Amended ToSubclass] string Name;
  [Description("Signing Certificate of the Guardian.") : Amended ToSubclass] uint8 SigningCertificate[];
  [Description("Encryption Certificate of the Guardian.") : Amended ToSubclass] uint8 EncryptionCertificate[];
  [Description("Signature of the Encryption Certificate of the Guardian.") : Amended ToSubclass] string EncryptionCertificateSignature;
  [Description("Signature algorithm of the Encryption Certificate of the Guardian.") : Amended ToSubclass] string EncryptionCertificateSignatureAlgorithm;
  [Description("Determines if this Guardian can be used as an Owner for a Key Protector.") : Amended ToSubclass] boolean HasPrivateSigningKey;
  [Description("Version of the Guardian metadata.") : Amended ToSubclass] uint32 GuardianMetadataVersion;
  [Description("Creates a new Guardian by using the specified certificates.") : Amended ToSubclass] uint32 NewByAcceptCertificates([In,Description("A name to associate with this guardian when it is persisted to the Guardian store.") : Amended ToSubclass] string Name,[In,Description("Password protected encryption certificate PFX file, for the Guardian, containing the public & private keys.") : Amended ToSubclass] string EncryptionCertificate,[In,Description("Password protected signing certificate PFX file, for the Guardian, containing the public & private keys.") : Amended ToSubclass] string SigningCertificate,[In,Description("Password to decrypt the signing certificate PFX file.") : Amended ToSubclass] string SigningCertificatePassword,[In,Description("Password to decrypt the encryption certificate PFX file.") : Amended ToSubclass] string EncryptionCertificatePassword,[In,Description("When specified allows new guardian creation with certificates that are expired.") : Amended ToSubclass] boolean AllowExpired,[In,Description("When specified allows new guardian to be created using self-signed certificates.") : Amended ToSubclass] boolean AllowUntrustedRoot,[Out,Description("The new Guardian object.") : Amended ToSubclass] MSFT_HgsGuardian cmdletOutput);
  [Description("Creates a new Guardian by using the certificates identified by the specified thumbprints.") : Amended ToSubclass] uint32 NewByCertificateThumbprints([In,Description("A name to associate with this guardian when it is persisted to the Guardian store.") : Amended ToSubclass] string Name,[In,Description("The Thumbprint of the Signing certificate, for the Guardian, containing the public & private keys.") : Amended ToSubclass] string SigningCertificateThumbprint,[In,Description("The Thumbprint of the Encryption certificate, for the Guardian, containing the public & private keys.") : Amended ToSubclass] string EncryptionCertificateThumbprint,[In,Description("When specified allows new guardian creation with certificates that are expired.") : Amended ToSubclass] boolean AllowExpired,[In,Description("When specified allows new guardian to be created using self-signed certificates.") : Amended ToSubclass] boolean AllowUntrustedRoot,[Out,Description("The new Guardian object.") : Amended ToSubclass] MSFT_HgsGuardian cmdletOutput);
  [Description("Creates a Guardian by generating new self-signed certificates.") : Amended ToSubclass] uint32 NewByGenerateCertificates([In,Description("A name to associate with this guardian when it is persisted to the Guardian store.") : Amended ToSubclass] string Name,[In,Description("Generates self-signed Signing &amp;amp; Encryption certificates, for the Guardian, containing the public &amp;amp; private keys.") : Amended ToSubclass] boolean GenerateCertificates,[Out,Description("The new Guardian object.") : Amended ToSubclass] MSFT_HgsGuardian cmdletOutput);
  [Description("Imports a Guardian from an XML file.") : Amended ToSubclass] uint32 Import([In,Description("A path to an XML file containing the Guardian information.") : Amended ToSubclass] string Path,[In,Description("A name to associate with this Guardian when it is persisted to the local Guardian store.") : Amended ToSubclass] string Name,[In,Description("When specified allows new guardian creation with certificates that are expired.") : Amended ToSubclass] boolean AllowExpired,[In,Description("When specified allows new guardian to be created using self-signed certificates.") : Amended ToSubclass] boolean AllowUntrustedRoot,[Out,Description("A Guardian object constructed from the XML data.") : Amended ToSubclass] MSFT_HgsGuardian cmdletOutput);
  [Description("Exports a guardian containing public keys to an XML file.") : Amended ToSubclass] uint32 Export([In,Description("The path to the file to write an XML representation of the guardian.") : Amended ToSubclass] string Path,[In,Description("The Guardian object that will be exported to the file.") : Amended ToSubclass] MSFT_HgsGuardian InputObject);
  [Description("Removes a Guardian from the Guardian store.") : Amended ToSubclass] uint32 Remove([In,Description("The name of the guardian to remove.") : Amended ToSubclass] string Name);
};

[ClassVersion("1.0") : Amended,Description("A secure wrapping of a key that delegates rights to unwrap and use that key to one or more guardians.") : Amended ToSubclass,AMENDMENT, LOCALE("MS_809")] 
class MSFT_HgsKeyProtector
{
  [Description("Owner who created the Key Protector.") : Amended ToSubclass] MSFT_HgsGuardian Owner;
  [Description("Guardians granted access to the key contained in the Key Protector.") : Amended ToSubclass] MSFT_HgsGuardian Guardians[];
  [Description("Raw bytes of the Key Protector.") : Amended ToSubclass] uint8 RawData[];
  [Description("Create a new key protector.") : Amended ToSubclass] uint32 NewByGuardians([In,Description("When specified allows new Key Protector creation with one or more guardian using self-signed certificates.") : Amended ToSubclass] boolean AllowUntrustedRoot,[In,Description("When specified allows new Key Protector creation with one or more guardian using expired certificates.") : Amended ToSubclass] boolean AllowExpired,[In,Description("The Guardian who is considered the owner of this Key Protector.") : Amended ToSubclass] MSFT_HgsGuardian Owner,[In,Description("One or more Guardians who are granted access to the key protected by this Key Protector.") : Amended ToSubclass] MSFT_HgsGuardian Guardian[],[Out,Description("The new Key Protector object.") : Amended ToSubclass] MSFT_HgsKeyProtector cmdletOutput);
  [Description("Grant access to a Key Protector to a provided Guardian.") : Amended ToSubclass] uint32 Grant([In,Description("The Key Protector on which to grant access.") : Amended ToSubclass] MSFT_HgsKeyProtector KeyProtector,[In,Description("The Guardian to whom access is being granted.") : Amended ToSubclass] MSFT_HgsGuardian Guardian,[In,Description("When specified allows access to the specified Key Protector for one or more guardian using expired certificates.") : Amended ToSubclass] boolean AllowExpired,[In,Description("When specified allows access to the specified Key Protector creation with one or more guardian using self-signed certificates.") : Amended ToSubclass] boolean AllowUntrustedRoot,[Out,Description("The updated Key Protector with access granted to the provided Guardian.") : Amended ToSubclass] MSFT_HgsKeyProtector cmdletOutput);
  [Description("Revokes access to a Guardian on an existing Key Protector.") : Amended ToSubclass] uint32 Revoke([In,Description("The Key Protector from which access for the provided Guardian will be revoked.") : Amended ToSubclass] MSFT_HgsKeyProtector KeyProtector,[In,Description("The Guardian whose key access will be revoked.") : Amended ToSubclass] MSFT_HgsGuardian Guardian,[Out,Description("The updated Key Protector object.") : Amended ToSubclass] MSFT_HgsKeyProtector cmdletOutput);
  [Description("Converts a byte array of an existing key protector to a HGS Key Protector object.") : Amended ToSubclass] uint32 ConvertToByRawBytes([In,Description("A byte array of an existing key protector from which to generate a HGS Key Protector object.") : Amended ToSubclass] uint8 Bytes[],[Out,Description("The new Key Protector.") : Amended ToSubclass] MSFT_HgsKeyProtector cmdletOutput);
};

[ClassVersion("1.0") : Amended,Description("Interface to perform different operations on Key Protectors.") : Amended ToSubclass,AMENDMENT, LOCALE("MS_809")] 
class MSFT_HgsKeyProtectorOperations
{
  [Description("Unwraps an existing key protector returning the ingress key along with a new egress key and egress Key Protector.") : Amended ToSubclass] uint32 UnwrapKeyProtector([In,Description("The key protector containing the desired transport key.") : Amended ToSubclass] uint8 IngressKeyProtector[],[Out,Description("The transfer key encrypted to the caller.") : Amended ToSubclass] uint8 EncryptedTransferKey[],[Out,Description("The wrapping key encrypted using the transfer key and the caller's trustlet information.") : Amended ToSubclass] uint8 EncryptedWrappingKey[],[Out,Description("The key contained with the Key Protector combined with a new export key contained in the egress Key Protector.") : Amended ToSubclass] uint8 EncryptedKeys[],[Out,Description("The new egress Key Protector describing the egress key.") : Amended ToSubclass] uint8 EgressKeyProtector[]);
  [Description("Creates a new key protector.") : Amended ToSubclass] uint32 CreateKeyProtector([Out,Description("The transfer key encrypted to the caller.") : Amended ToSubclass] uint8 EncryptedTransferKey[],[Out,Description("The wrapping key encrypted using the transfer key and the caller's trustlet information.") : Amended ToSubclass] uint8 EncryptedWrappingKey[],[Out,Description("The key contained with the KP combined with a new export key contained in the egress Key Protector.") : Amended ToSubclass] uint8 EncryptedKeys[],[Out,Description("The new egress Key Protector describing the egress key.") : Amended ToSubclass] uint8 EgressKeyProtector[]);
  [Description("Encrypts data returning the encrypted data along with an egress Key Protector based on the provided Key Protector.") : Amended ToSubclass] uint32 EncryptDataWithKeyProtector([In,Description("The Key Protector desired for the data.") : Amended ToSubclass] uint8 BaseKeyProtector[],[In,Description("A unique encryption Identifier that is used only once per key, usually based upon the message type.") : Amended ToSubclass] uint32 UniqueEncryptionIdentifier,[In,Description("The data to be encrypted.") : Amended ToSubclass] uint8 PlaintextData[],[In,Description("Determines if BaseKeyProtector is rolled to a new egress Key Protector.") : Amended ToSubclass] boolean RollKeyProtector,[Out,Description("The Key Protector derived from the BaseKeyProtector describing the key used to encrypt the data.") : Amended ToSubclass] uint8 EgressKeyProtector[],[Out,Description("The data encrypted using the key described in EgressKeyProtector.") : Amended ToSubclass] uint8 EncryptedData[]);
  [Description("Decrypts data returning the encrypted data along with an egress key protector based on the provided key protector.") : Amended ToSubclass] uint32 DecryptDataWithKeyProtector([In,Description("The key protector desired for the data.") : Amended ToSubclass] uint8 BaseKeyProtector[],[In,Description("The encrypted data.") : Amended ToSubclass] uint8 EncryptedData[],[Out,Description("The decrypted data.") : Amended ToSubclass] uint8 PlaintextData[]);
};
