exports/Set-SysManDriftInformationConfiguration.ps1

<#
.Synopsis
Updates an existing configuration
.Description
Updates an existing configuration
.Link
https://docs.microsoft.com/en-us/powershell/module/sysman.webapi/set-sysmandriftinformationconfiguration
#>

function Set-SysManDriftInformationConfiguration {
[OutputType('SysMan.Powershell.Models.IDriftInformationConfiguration', 'SysMan.Powershell.Models.IApiErrorMessage')]
[CmdletBinding(DefaultParameterSetName='Put', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[SysMan.Powershell.Description('Updates an existing configuration')]
param(
    [Parameter(Mandatory, HelpMessage='The id of the configuration')]
    [SysMan.Powershell.Category('Path')]
    [System.String]
    ${Id},

    [Parameter(ParameterSetName='Put', ValueFromPipeline, HelpMessage='The configuration possibilities for the application DriftInfo. DriftInfo is often installed as a service on the end users computer and display messages and information in a small and discrete window. How this information is displayed can be configured in this class.')]
    [SysMan.Powershell.Category('Body')]
    [SysMan.Powershell.Models.IDriftInformationConfiguration]
    ${Request},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The rate (in ticks) in which the client should poll for new configuration changes')]
    [SysMan.Powershell.Category('Body')]
    [System.Double]
    ${ConfigurationRefreshRate},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The user that created the configuration')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    ${CreatedBy},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='When the configuration was created')]
    [SysMan.Powershell.Category('Body')]
    [System.DateTime]
    ${CreatedDate},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='A short description of the configuration')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    ${Description},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the feed list should be rotated in ComboBox.')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${FeedPartIsRotatingFeeds},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the feed should be visible or not.')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${FeedPartIsRssVisible},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the feeds categorized as Incidents should be kept on top in list.')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${FeedPartKeepIncidentsOnTop},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The rotating interval (in ticks) for the rss feed')]
    [SysMan.Powershell.Category('Body')]
    [System.Double]
    ${FeedPartRotatingFeedInterval},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The refresh rate (in ticks) of the rss feed in minutes')]
    [SysMan.Powershell.Category('Body')]
    [System.Double]
    ${FeedPartRssRefreshRate},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The url to the Rss feed')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    ${FeedPartRssUrl},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If feeds categorized as Incidents should be shown in Red.')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${FeedPartUseRedColorForIncidents},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The background color of the application window')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    ${GeneralPartBackgroundColor},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the use can change the background color in the application or not.')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${GeneralPartCanChangeBackgroundColor},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The link text to show.')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    ${GeneralPartLinkText},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The url that should be opened when the user click on the LinkText.')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    ${GeneralPartLinkUrl},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The text to display in the lower part.')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    ${GeneralPartLowerText},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The text to display in the upper part.')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    ${GeneralPartUpperText},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the property is visible')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${IPIsVisible},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The order of this property (controls where the property will be displayed relative others)')]
    [SysMan.Powershell.Category('Body')]
    [System.Int32]
    ${IPOrder},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The id this configuration target')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    ${Id1},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the configuration is a system configuration. A system configuration ships with SysMan and can be edited. However a system configuration cannot be deleted.')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${IsSystem},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the message will be delivered by pusing the message from the server using websockets')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${IsWebsocketEnabled},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The user that last modified the configuration')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    ${LastModifiedBy},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='When the configuration was last modified')]
    [SysMan.Powershell.Category('Body')]
    [System.DateTime]
    ${LastModifiedDate},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the property is visible')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${MacIsVisible},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The order of this property (controls where the property will be displayed relative others)')]
    [SysMan.Powershell.Category('Body')]
    [System.Int32]
    ${MacOrder},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The members of this configuration. Use the mapping endpoint to handle the members that shoulduse this configuration instead of this property.')]
    [SysMan.Powershell.Category('Body')]
    [SysMan.Powershell.Models.IAccessMember[]]
    ${Members},

    [Parameter(ParameterSetName='PutExpanded', Mandatory, HelpMessage='The name of the configuration.Used to make it easier to identify this specific configuration without id. This is helpful when mapping configurations to groups to avoid having to remember the actual id of the configuration.')]
    [SysMan.Powershell.Category('Body')]
    [System.String]
    ${Name},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the property is visible')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${OperatingSystemIsVisible},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The order of this property (controls where the property will be displayed relative others)')]
    [SysMan.Powershell.Category('Body')]
    [System.Int32]
    ${OperatingSystemOrder},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the property is visible')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${PendingRebootIsVisible},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The order of this property (controls where the property will be displayed relative others)')]
    [SysMan.Powershell.Category('Body')]
    [System.Int32]
    ${PendingRebootOrder},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The left position of the application window (in percent). Default is 75.')]
    [SysMan.Powershell.Category('Body')]
    [System.Int32]
    ${PositionLeft},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The top position of the application window (in percent). Default is 0.')]
    [SysMan.Powershell.Category('Body')]
    [System.Int32]
    ${PositionTop},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='Should this part always be expanded or require the user to manually expand the section.')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${SystemInformationPartIsAlwaysExpanded},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the extended system information should be shown at all.')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${SystemInformationPartIsExtendedInformationVisible},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The registry values that should be visible along with the other system information')]
    [SysMan.Powershell.Category('Body')]
    [SysMan.Powershell.Models.IRegistryInformationPartConfiguration[]]
    ${SystemInformationPartRegistryInformationParts},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='If the property is visible')]
    [SysMan.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    ${UpTimeIsVisible},

    [Parameter(ParameterSetName='PutExpanded', HelpMessage='The order of this property (controls where the property will be displayed relative others)')]
    [SysMan.Powershell.Category('Body')]
    [System.Int32]
    ${UpTimeOrder},

    [Parameter(DontShow, HelpMessage='Wait for .NET debugger to attach')]
    [SysMan.Powershell.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    ${Break},

    [Parameter(DontShow, HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')]
    [ValidateNotNull()]
    [SysMan.Powershell.Category('Runtime')]
    [SysMan.Powershell.Runtime.SendAsyncStep[]]
    ${HttpPipelineAppend},

    [Parameter(DontShow, HelpMessage='SendAsync Pipeline Steps to be prepended to the front of the pipeline')]
    [ValidateNotNull()]
    [SysMan.Powershell.Category('Runtime')]
    [SysMan.Powershell.Runtime.SendAsyncStep[]]
    ${HttpPipelinePrepend},

    [Parameter(DontShow, HelpMessage='The URI for the proxy server to use')]
    [SysMan.Powershell.Category('Runtime')]
    [System.Uri]
    ${Proxy},

    [Parameter(DontShow, HelpMessage='Credentials for a proxy server to use for the remote call')]
    [ValidateNotNull()]
    [SysMan.Powershell.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    ${ProxyCredential},

    [Parameter(DontShow, HelpMessage='Use the default credentials for the proxy')]
    [SysMan.Powershell.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    ${ProxyUseDefaultCredentials}
)

begin {
    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
            $PSBoundParameters['OutBuffer'] = 1
        }
        $parameterSet = $PsCmdlet.ParameterSetName
        $mapping = @{
            Put = 'SysMan.WebApi.private\Set-SysManDriftInformationConfiguration_Put';
            PutExpanded = 'SysMan.WebApi.private\Set-SysManDriftInformationConfiguration_PutExpanded';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}