Model/TrustedInfrastructureTrustAuthorityClustersAttestationTpm2EndorsementKeysCreateSpec.ps1

#
# TrustedInfrastructure Paths
# The vcenter trusted_infrastructure package provides services that enable a Trusted Infrastructure. They are responsible for ensuring that infrastructure nodes are running trusted software and for releasing encryption keys only to trusted infrastructure nodes.
# Contact: powercli@vmware.com
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.DESCRIPTION
 
The EndorsementKeys.CreateSpec structure contains information that describes a TPM endorsement key. Only one of EndorsementKeys.CreateSpec.public-key or EndorsementKeys.CreateSpec.certificate must be specified.
 
.PARAMETER Name
A unique name for the TPM endorsement key. The unique name should be something that an administrator can use to easily identify the remote system. For example, the hostname, or hardware UUID. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.trusted_infrastructure.trust_authority_clusters.attestation.tpm2.EndorsementKey. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.trusted_infrastructure.trust_authority_clusters.attestation.tpm2.EndorsementKey.
.PARAMETER PublicKey
TPM public endorsement key in PEM format. If unset EndorsementKeys.CreateSpec.certificate must be set.
.PARAMETER Certificate
TPM endorsement key certificate in PEM format. When a endorsement key certificate is provided, it will be verified against the CA certificate list. Endorsement key certificates that are not signed by one of the CA certificates will be rejected. Using this format allows for failures to be caught during configuration rather than later during attestation. If unset EndorsementKeys.CreateSpec.public-key must be set.
.OUTPUTS
 
TrustedInfrastructureTrustAuthorityClustersAttestationTpm2EndorsementKeysCreateSpec<PSCustomObject>
 
.LINK
 
Online Version: https://developer.vmware.com/docs/vsphere-automation/latest/vcenter/data-structures/TrustedInfrastructure/TrustAuthorityClusters/Attestation/Tpm2/EndorsementKeys/CreateSpec/
#>


function Initialize-TrustedInfrastructureTrustAuthorityClustersAttestationTpm2EndorsementKeysCreateSpec {
    [CmdletBinding(HelpURI = "https://developer.vmware.com/docs/vsphere-automation/latest/vcenter/data-structures/TrustedInfrastructure/TrustAuthorityClusters/Attestation/Tpm2/EndorsementKeys/CreateSpec/")]
    Param (
        [Parameter(Mandatory = $true)]
        [ValidateScript({ $_ -is [string] })]
        ${Name},
        [Parameter(Mandatory = $false)]
        [ValidateScript({ $_ -is [string] })]
        ${PublicKey},
        [Parameter(Mandatory = $false)]
        [ValidateScript({ $_ -is [string] })]
        ${Certificate}
    )

    Process {
        'Creating PSCustomObject: VMware.Sdk.vSphere.vCenter.TrustedInfrastructure => vSphereTrustedInfrastructureTrustAuthorityClustersAttestationTpm2EndorsementKeysCreateSpec' | Write-Debug


        $PSO = [PSCustomObject]@{
            "PSTypeName" = "TrustedInfrastructureTrustAuthorityClustersAttestationTpm2EndorsementKeysCreateSpec"
            "name" = ${Name}
            "public_key" = ${PublicKey}
            "certificate" = ${Certificate}
        }


        return $PSO
    }
}