Model/MicrosoftODataEdmIEdmEntityContainerElement.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 ContainerElementKind No description available. .PARAMETER Container No description available. .OUTPUTS MicrosoftODataEdmIEdmEntityContainerElement<PSCustomObject> #> function Initialize-ElementsMicrosoftODataEdmIEdmEntityContainerElement { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("0", "1", "2", "3", "4")] [PSCustomObject] ${ContainerElementKind}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Container} ) Process { 'Creating PSCustomObject: Elements.Client => ElementsMicrosoftODataEdmIEdmEntityContainerElement' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "containerElementKind" = ${ContainerElementKind} "container" = ${Container} } return $PSO } } <# .SYNOPSIS Convert from JSON to MicrosoftODataEdmIEdmEntityContainerElement<PSCustomObject> .DESCRIPTION Convert from JSON to MicrosoftODataEdmIEdmEntityContainerElement<PSCustomObject> .PARAMETER Json Json object .OUTPUTS MicrosoftODataEdmIEdmEntityContainerElement<PSCustomObject> #> function ConvertFrom-ElementsJsonToMicrosoftODataEdmIEdmEntityContainerElement { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Elements.Client => ElementsMicrosoftODataEdmIEdmEntityContainerElement' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in ElementsMicrosoftODataEdmIEdmEntityContainerElement $AllProperties = ("containerElementKind", "container", "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 "containerElementKind"))) { #optional property not found $ContainerElementKind = $null } else { $ContainerElementKind = $JsonParameters.PSobject.Properties["containerElementKind"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "container"))) { #optional property not found $Container = $null } else { $Container = $JsonParameters.PSobject.Properties["container"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } $PSO = [PSCustomObject]@{ "containerElementKind" = ${ContainerElementKind} "container" = ${Container} "name" = ${Name} } return $PSO } } |