Model/TeamsChannelMappingModel.ps1
# # Fly SDK API # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # Version: 1.0 # Contact: support@avepoint.com # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER SourceType Source channel type(Standard, Private, Shared) .PARAMETER SourceName Source channel name .PARAMETER DestinationType Destination channel type(Standard, Private, Shared) .PARAMETER DestinationName Destination channel name .OUTPUTS TeamsChannelMappingModel<PSCustomObject> #> function Initialize-FlyTeamsChannelMappingModel { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${SourceType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SourceName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${DestinationType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${DestinationName} ) Process { 'Creating PSCustomObject: Fly.Client => FlyTeamsChannelMappingModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "sourceType" = ${SourceType} "sourceName" = ${SourceName} "destinationType" = ${DestinationType} "destinationName" = ${DestinationName} } return $PSO } } <# .SYNOPSIS Convert from JSON to TeamsChannelMappingModel<PSCustomObject> .DESCRIPTION Convert from JSON to TeamsChannelMappingModel<PSCustomObject> .PARAMETER Json Json object .OUTPUTS TeamsChannelMappingModel<PSCustomObject> #> function ConvertFrom-FlyJsonToTeamsChannelMappingModel { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Fly.Client => FlyTeamsChannelMappingModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in FlyTeamsChannelMappingModel $AllProperties = ("sourceType", "sourceName", "destinationType", "destinationName") 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 "sourceType"))) { #optional property not found $SourceType = $null } else { $SourceType = $JsonParameters.PSobject.Properties["sourceType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "sourceName"))) { #optional property not found $SourceName = $null } else { $SourceName = $JsonParameters.PSobject.Properties["sourceName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "destinationType"))) { #optional property not found $DestinationType = $null } else { $DestinationType = $JsonParameters.PSobject.Properties["destinationType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "destinationName"))) { #optional property not found $DestinationName = $null } else { $DestinationName = $JsonParameters.PSobject.Properties["destinationName"].value } $PSO = [PSCustomObject]@{ "sourceType" = ${SourceType} "sourceName" = ${SourceName} "destinationType" = ${DestinationType} "destinationName" = ${DestinationName} } return $PSO } } |