Model/MicrosoftODataEdmIEdmSchemaElement.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 MicrosoftODataEdmIEdmSchemaElement<PSCustomObject> #> function Initialize-ElementsMicrosoftODataEdmIEdmSchemaElement { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("0", "1", "2", "3", "4", "5")] [PSCustomObject] ${SchemaElementKind} ) Process { 'Creating PSCustomObject: Elements.Client => ElementsMicrosoftODataEdmIEdmSchemaElement' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "schemaElementKind" = ${SchemaElementKind} } return $PSO } } <# .SYNOPSIS Convert from JSON to MicrosoftODataEdmIEdmSchemaElement<PSCustomObject> .DESCRIPTION Convert from JSON to MicrosoftODataEdmIEdmSchemaElement<PSCustomObject> .PARAMETER Json Json object .OUTPUTS MicrosoftODataEdmIEdmSchemaElement<PSCustomObject> #> function ConvertFrom-ElementsJsonToMicrosoftODataEdmIEdmSchemaElement { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Elements.Client => ElementsMicrosoftODataEdmIEdmSchemaElement' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in ElementsMicrosoftODataEdmIEdmSchemaElement $AllProperties = ("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 "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]@{ "schemaElementKind" = ${SchemaElementKind} "namespace" = ${Namespace} "name" = ${Name} } return $PSO } } |