Model/TrustedInfrastructureTrustAuthorityClustersConsumerPrincipalsCreateSpec.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 ConsumerPrincipals.CreateSpec structure contains the information necessary to establish trust between a workload vCenter and a Trust Authority Host.
 
.PARAMETER Certificates
The certificates used by the vCenter STS to sign tokens.
.PARAMETER IssuerAlias
A user-friendly alias of the service which created and signed the security token. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.esx.authentication.trust.security-token-issuer. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.esx.authentication.trust.security-token-issuer.
.PARAMETER Issuer
The service which created and signed the security token.
.PARAMETER Principal
No description available.
.OUTPUTS
 
TrustedInfrastructureTrustAuthorityClustersConsumerPrincipalsCreateSpec<PSCustomObject>
 
.LINK
 
Online Version: https://developer.vmware.com/docs/vsphere-automation/latest/vcenter/data-structures/TrustedInfrastructure/TrustAuthorityClusters/ConsumerPrincipals/CreateSpec/
#>


function Initialize-TrustedInfrastructureTrustAuthorityClustersConsumerPrincipalsCreateSpec {
    [CmdletBinding(HelpURI = "https://developer.vmware.com/docs/vsphere-automation/latest/vcenter/data-structures/TrustedInfrastructure/TrustAuthorityClusters/ConsumerPrincipals/CreateSpec/")]
    Param (
        [Parameter(Mandatory = $true)]
        [PSCustomObject[]]
        ${Certificates},
        [Parameter(Mandatory = $true)]
        [ValidateScript({ $_ -is [string] })]
        ${IssuerAlias},
        [Parameter(Mandatory = $true)]
        [ValidateScript({ $_ -is [string] })]
        ${Issuer},
        [Parameter(Mandatory = $true)]
        [PSTypeName("TrustedInfrastructureStsPrincipal")]
        [PSCustomObject]
        ${Principal}
    )

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

        if ($Certificates -eq $null) {
            throw "invalid value for 'Certificates', 'Certificates' cannot be null."
        }

        if ($Principal -eq $null) {
            throw "invalid value for 'Principal', 'Principal' cannot be null."
        }


        $PSO = [PSCustomObject]@{
            "PSTypeName" = "TrustedInfrastructureTrustAuthorityClustersConsumerPrincipalsCreateSpec"
            "certificates" = ${Certificates}
            "issuer_alias" = ${IssuerAlias}
            "issuer" = ${Issuer}
            "principal" = ${Principal}
        }


        return $PSO
    }
}