Functions/New-IAWidgetConfigurationDonutObject.ps1

Function New-IAWidgetConfigurationDonutObject{
    Param(
        [String]$CenterLabelDataFieldName,
        [Bool]$ShowCenterSubTitle,
        [Bool]$ShowCenterPercentage,
        [Bool]$CalcSelectedFieldsOnly,
        [Bool]$ShowLegend,
        [String]$ReportUrl
    )

    $IAWidgetConfigurationDonutObject = New-Object -TypeName PSObject
    $IAWidgetConfigurationDonutObject | Add-Member -MemberType NoteProperty -Name 'CenterLabelDataFieldName' -Value $CenterLabelDataFieldName
    $IAWidgetConfigurationDonutObject | Add-Member -MemberType NoteProperty -Name 'ShowCenterSubTitle' -Value $ShowCenterSubTitle
    $IAWidgetConfigurationDonutObject | Add-Member -MemberType NoteProperty -Name 'ShowCenterPercentage' -Value $ShowCenterPercentage
    $IAWidgetConfigurationDonutObject | Add-Member -MemberType NoteProperty -Name 'CalcSelectedFieldsOnly' -Value $CalcSelectedFieldsOnly
    $IAWidgetConfigurationDonutObject | Add-Member -MemberType NoteProperty -Name 'ShowLegend' -Value $ShowLegend
    $IAWidgetConfigurationDonutObject | Add-Member -MemberType NoteProperty -Name 'ReportUrl' -Value $ReportUrl

    return $IAWidgetConfigurationDonutObject
}