Model/MicrosoftODataODataEntitySetInfo.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 TypeAnnotation No description available. .PARAMETER Url No description available. .PARAMETER Name No description available. .PARAMETER Title No description available. .OUTPUTS MicrosoftODataODataEntitySetInfo<PSCustomObject> #> function Initialize-ElementsMicrosoftODataODataEntitySetInfo { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${TypeAnnotation}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Url}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Title} ) Process { 'Creating PSCustomObject: Elements.Client => ElementsMicrosoftODataODataEntitySetInfo' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "typeAnnotation" = ${TypeAnnotation} "url" = ${Url} "name" = ${Name} "title" = ${Title} } return $PSO } } <# .SYNOPSIS Convert from JSON to MicrosoftODataODataEntitySetInfo<PSCustomObject> .DESCRIPTION Convert from JSON to MicrosoftODataODataEntitySetInfo<PSCustomObject> .PARAMETER Json Json object .OUTPUTS MicrosoftODataODataEntitySetInfo<PSCustomObject> #> function ConvertFrom-ElementsJsonToMicrosoftODataODataEntitySetInfo { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Elements.Client => ElementsMicrosoftODataODataEntitySetInfo' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in ElementsMicrosoftODataODataEntitySetInfo $AllProperties = ("typeAnnotation", "url", "name", "title") 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 "typeAnnotation"))) { #optional property not found $TypeAnnotation = $null } else { $TypeAnnotation = $JsonParameters.PSobject.Properties["typeAnnotation"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "url"))) { #optional property not found $Url = $null } else { $Url = $JsonParameters.PSobject.Properties["url"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "title"))) { #optional property not found $Title = $null } else { $Title = $JsonParameters.PSobject.Properties["title"].value } $PSO = [PSCustomObject]@{ "typeAnnotation" = ${TypeAnnotation} "url" = ${Url} "name" = ${Name} "title" = ${Title} } return $PSO } } |