Model/MicrosoftODataEdmIEdmEntityContainer.ps1
# # Portal Api # Portal Api HTTP API V1 # Version: v1 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER SchemaElementKind No description available. .OUTPUTS MicrosoftODataEdmIEdmEntityContainer<PSCustomObject> #> function Initialize-ElementsMicrosoftODataEdmIEdmEntityContainer { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("0", "1", "2", "3", "4", "5")] [PSCustomObject] ${SchemaElementKind} ) Process { 'Creating PSCustomObject: Elements.Client => ElementsMicrosoftODataEdmIEdmEntityContainer' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "schemaElementKind" = ${SchemaElementKind} } return $PSO } } <# .SYNOPSIS Convert from JSON to MicrosoftODataEdmIEdmEntityContainer<PSCustomObject> .DESCRIPTION Convert from JSON to MicrosoftODataEdmIEdmEntityContainer<PSCustomObject> .PARAMETER Json Json object .OUTPUTS MicrosoftODataEdmIEdmEntityContainer<PSCustomObject> #> function ConvertFrom-ElementsJsonToMicrosoftODataEdmIEdmEntityContainer { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Elements.Client => ElementsMicrosoftODataEdmIEdmEntityContainer' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in ElementsMicrosoftODataEdmIEdmEntityContainer $AllProperties = ("elements", "schemaElementKind", "namespace", "name") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } if (!([bool]($JsonParameters.PSobject.Properties.name -match "elements"))) { #optional property not found $Elements = $null } else { $Elements = $JsonParameters.PSobject.Properties["elements"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "schemaElementKind"))) { #optional property not found $SchemaElementKind = $null } else { $SchemaElementKind = $JsonParameters.PSobject.Properties["schemaElementKind"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "namespace"))) { #optional property not found $Namespace = $null } else { $Namespace = $JsonParameters.PSobject.Properties["namespace"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } $PSO = [PSCustomObject]@{ "elements" = ${Elements} "schemaElementKind" = ${SchemaElementKind} "namespace" = ${Namespace} "name" = ${Name} } return $PSO } } |