text:
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")]
[CmdletBinding()]
param()

function Get-TargetResource
{
    [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")]
    [CmdletBinding()]
    [OutputType([System.Collections.Hashtable])]
    param
    (
        [parameter(Mandatory = $true)]
        [System.String]
        $Identity,

        [parameter(Mandatory = $true)]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.Credential()]
        $Credential,

        [System.Boolean]
        $AllowServiceRestart = $false,

        [System.String]
        $ActiveUserStatisticsLogMaxAge,

        [System.String]
        $ActiveUserStatisticsLogMaxDirectorySize,

        [System.String]
        $ActiveUserStatisticsLogMaxFileSize,

        [System.String]
        $ActiveUserStatisticsLogPath,

        [System.Boolean]
        $AgentLogEnabled,

        [System.String]
        $AgentLogMaxAge,

        [System.String]
        $AgentLogMaxDirectorySize,

        [System.String]
        $AgentLogMaxFileSize,

        [System.String]
        $AgentLogPath,

        [System.Boolean]
        $ConnectivityLogEnabled,

        [System.String]
        $ConnectivityLogMaxAge,

        [System.String]
        $ConnectivityLogMaxDirectorySize,

        [System.String]
        $ConnectivityLogMaxFileSize,

        [System.String]
        $ConnectivityLogPath,

        [System.Boolean]
        $ContentConversionTracingEnabled,

        [System.String]
        $DelayNotificationTimeout,

        [System.Boolean]
        $DnsLogEnabled,

        [System.String]
        $DnsLogMaxAge,

        [System.String]
        $DnsLogMaxDirectorySize,

        [System.String]
        $DnsLogMaxFileSize,

        [System.String]
        $DnsLogPath,

        [System.Boolean]
        $ExternalDNSAdapterEnabled,

        [System.String]
        $ExternalDNSAdapterGuid,

        [ValidateSet("Any","UseTcpOnly","UseUdpOnly")]
        [System.String]
        $ExternalDNSProtocolOption,

        [System.String[]]
        $ExternalDNSServers,

        [System.String]
        $ExternalIPAddress,

        [System.Boolean]
        $InternalDNSAdapterEnabled,

        [System.String]
        $InternalDNSAdapterGuid,

        [ValidateSet("Any","UseTcpOnly","UseUdpOnly")]
        [System.String]
        $InternalDNSProtocolOption,

        [System.String[]]
        $InternalDNSServers,

        [ValidateSet("None","Verbose")]
        [System.String]
        $IntraOrgConnectorProtocolLoggingLevel,

        [System.Int32]
        $IntraOrgConnectorSmtpMaxMessagesPerConnection,

        [System.Boolean]
        $IrmLogEnabled,

        [System.String]
        $IrmLogMaxAge,

        [System.String]
        $IrmLogMaxDirectorySize,

        [System.String]
        $IrmLogMaxFileSize,

        [System.String]
        $IrmLogPath,

        [System.Int32]
        $MaxConcurrentMailboxDeliveries,

        [System.Int32]
        $MaxConcurrentMailboxSubmissions,

        [System.Int32]
        $MaxConnectionRatePerMinute,

        [ValidateRange(1,2147483647)]
        [System.String]
        $MaxOutboundConnections,

        [ValidateRange(1,2147483647)]
        [System.String]
        $MaxPerDomainOutboundConnections,

        [System.String]
        $MessageExpirationTimeout,

        [System.String]
        $MessageRetryInterval,

        [System.Boolean]
        $MessageTrackingLogEnabled,

        [System.String]
        $MessageTrackingLogMaxAge,

        [System.String]
        $MessageTrackingLogMaxDirectorySize,

        [System.String]
        $MessageTrackingLogMaxFileSize,

        [System.String]
        $MessageTrackingLogPath,

        [System.Boolean]
        $MessageTrackingLogSubjectLoggingEnabled,

        [System.String]
        $OutboundConnectionFailureRetryInterval,

        [System.String]
        $PickupDirectoryMaxHeaderSize,

        [ValidateRange(1,20000)]
        [System.Int32]
        $PickupDirectoryMaxMessagesPerMinute,

        [ValidateRange(1,10000)]
        [System.Int32]
        $PickupDirectoryMaxRecipientsPerMessage,

        [System.String]
        $PickupDirectoryPath,

        [System.Boolean]
        $PipelineTracingEnabled,

        [System.String]
        $PipelineTracingPath,

        [System.String]
        $PipelineTracingSenderAddress,

        [System.Boolean]
        $PoisonMessageDetectionEnabled,

        [ValidateRange(1,10)]
        [System.Int32]
        $PoisonThreshold,

        [System.String]
        $QueueLogMaxAge,

        [System.String]
        $QueueLogMaxDirectorySize,

        [System.String]
        $QueueLogMaxFileSize,

        [System.String]
        $QueueLogPath,

        [System.String]
        $QueueMaxIdleTime,

        [System.String]
        $ReceiveProtocolLogMaxAge,

        [System.String]
        $ReceiveProtocolLogMaxDirectorySize,

        [System.String]
        $ReceiveProtocolLogMaxFileSize,

        [System.String]
        $ReceiveProtocolLogPath,

        [System.Boolean]
        $RecipientValidationCacheEnabled,

        [System.String]
        $ReplayDirectoryPath,

        [System.String]
        $RootDropDirectoryPath,

        [System.String]
        $RoutingTableLogMaxAge,

        [System.String]
        $RoutingTableLogMaxDirectorySize,

        [System.String]
        $RoutingTableLogPath,

        [System.String]
        $SendProtocolLogMaxAge,

        [System.String]
        $SendProtocolLogMaxDirectorySize,

        [System.String]
        $SendProtocolLogMaxFileSize,

        [System.String]
        $SendProtocolLogPath,

        [System.String]
        $ServerStatisticsLogMaxAge,

        [System.String]
        $ServerStatisticsLogMaxDirectorySize,

        [System.String]
        $ServerStatisticsLogMaxFileSize,

        [System.String]
        $ServerStatisticsLogPath,

        [ValidateRange(1,15)]
        [System.Int32]
        $TransientFailureRetryCount,

        [System.String]
        $TransientFailureRetryInterval,

        [System.Boolean]
        $UseDowngradedExchangeServerAuth
    )

    #Load helper module
    Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0

    LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference

    #Establish remote Powershell session
    GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-TransportService" -VerbosePreference $VerbosePreference

    #Remove Credential and Ensure so we don't pass it into the next command
    RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart"

    $TransportService = Get-TransportService $Identity -ErrorAction SilentlyContinue
    if ($null -ne $TransportService)
    {
        $returnValue = @{
            Identity                                        = $Identity
            ActiveUserStatisticsLogMaxAge                   = $TransportService.ActiveUserStatisticsLogMaxAge
            ActiveUserStatisticsLogMaxDirectorySize         = $TransportService.ActiveUserStatisticsLogMaxDirectorySize
            ActiveUserStatisticsLogMaxFileSize              = $TransportService.ActiveUserStatisticsLogMaxFileSize
            ActiveUserStatisticsLogPath                     = $TransportService.ActiveUserStatisticsLogPath
            AgentLogEnabled                                 = $TransportService.AgentLogEnabled
            AgentLogMaxAge                                  = $TransportService.AgentLogMaxAge
            AgentLogMaxDirectorySize                        = $TransportService.AgentLogMaxDirectorySize
            AgentLogMaxFileSize                             = $TransportService.AgentLogMaxFileSize
            AgentLogPath                                    = $TransportService.AgentLogPath
            ConnectivityLogEnabled                          = $TransportService.ConnectivityLogEnabled
            ConnectivityLogMaxAge                           = $TransportService.ConnectivityLogMaxAge
            ConnectivityLogMaxDirectorySize                 = $TransportService.ConnectivityLogMaxDirectorySize
            ConnectivityLogMaxFileSize                      = $TransportService.ConnectivityLogMaxFileSize
            ConnectivityLogPath                             = $TransportService.ConnectivityLogPath
            ContentConversionTracingEnabled                 = $TransportService.ContentConversionTracingEnabled
            DelayNotificationTimeout                        = $TransportService.DelayNotificationTimeout
            DnsLogEnabled                                   = $TransportService.DnsLogEnabled
            DnsLogMaxAge                                    = $TransportService.DnsLogMaxAge
            DnsLogMaxDirectorySize                          = $TransportService.DnsLogMaxDirectorySize
            DnsLogMaxFileSize                               = $TransportService.DnsLogMaxFileSize
            DnsLogPath                                      = $TransportService.DnsLogPath
            ExternalDNSAdapterEnabled                       = $TransportService.ExternalDNSAdapterEnabled
            ExternalDNSAdapterGuid                          = $TransportService.ExternalDNSAdapterGuid
            ExternalDNSProtocolOption                       = $TransportService.ExternalDNSProtocolOption
            ExternalDNSServers                              = $TransportService.ExternalDNSServers.IPAddressToString
            ExternalIPAddress                               = $TransportService.ExternalIPAddress
            InternalDNSAdapterEnabled                       = $TransportService.InternalDNSAdapterEnabled
            InternalDNSAdapterGuid                          = $TransportService.InternalDNSAdapterGuid
            InternalDNSProtocolOption                       = $TransportService.InternalDNSProtocolOption
            InternalDNSServers                              = $TransportService.InternalDNSServers.IPAddressToString
            IntraOrgConnectorProtocolLoggingLevel           = $TransportService.IntraOrgConnectorProtocolLoggingLevel
            IntraOrgConnectorSmtpMaxMessagesPerConnection   = $TransportService.IntraOrgConnectorSmtpMaxMessagesPerConnection
            IrmLogEnabled                                   = $TransportService.IrmLogEnabled
            IrmLogMaxAge                                    = $TransportService.IrmLogMaxAge
            IrmLogMaxDirectorySize                          = $TransportService.IrmLogMaxDirectorySize
            IrmLogMaxFileSize                               = $TransportService.IrmLogMaxFileSize
            IrmLogPath                                      = $TransportService.IrmLogPath
            MaxConcurrentMailboxDeliveries                  = $TransportService.MaxConcurrentMailboxDeliveries
            MaxConcurrentMailboxSubmissions                 = $TransportService.MaxConcurrentMailboxSubmissions
            MaxConnectionRatePerMinute                      = $TransportService.MaxConnectionRatePerMinute
            MaxOutboundConnections                          = $TransportService.MaxOutboundConnections
            MaxPerDomainOutboundConnections                 = $TransportService.MaxPerDomainOutboundConnections
            MessageExpirationTimeout                        = $TransportService.MessageExpirationTimeout
            MessageRetryInterval                            = $TransportService.MessageRetryInterval
            MessageTrackingLogEnabled                       = $TransportService.MessageTrackingLogEnabled
            MessageTrackingLogMaxAge                        = $TransportService.MessageTrackingLogMaxAge
            MessageTrackingLogMaxDirectorySize              = $TransportService.MessageTrackingLogMaxDirectorySize
            MessageTrackingLogMaxFileSize                   = $TransportService.MessageTrackingLogMaxFileSize
            MessageTrackingLogPath                          = $TransportService.MessageTrackingLogPath
            MessageTrackingLogSubjectLoggingEnabled         = $TransportService.MessageTrackingLogSubjectLoggingEnabled
            OutboundConnectionFailureRetryInterval          = $TransportService.OutboundConnectionFailureRetryInterval
            PickupDirectoryMaxHeaderSize                    = $TransportService.PickupDirectoryMaxHeaderSize
            PickupDirectoryMaxMessagesPerMinute             = $TransportService.PickupDirectoryMaxMessagesPerMinute
            PickupDirectoryMaxRecipientsPerMessage          = $TransportService.PickupDirectoryMaxRecipientsPerMessage
            PickupDirectoryPath                             = $TransportService.PickupDirectoryPath
            PipelineTracingEnabled                          = $TransportService.PipelineTracingEnabled
            PipelineTracingPath                             = $TransportService.PipelineTracingPath
            PipelineTracingSenderAddress                    = $TransportService.PipelineTracingSenderAddress
            PoisonMessageDetectionEnabled                   = $TransportService.PoisonMessageDetectionEnabled
            PoisonThreshold                                 = $TransportService.PoisonThreshold
            QueueLogMaxAge                                  = $TransportService.QueueLogMaxAge
            QueueLogMaxDirectorySize                        = $TransportService.QueueLogMaxDirectorySize
            QueueLogMaxFileSize                             = $TransportService.QueueLogMaxFileSize
            QueueLogPath                                    = $TransportService.QueueLogPath
            QueueMaxIdleTime                                = $TransportService.QueueMaxIdleTime
            ReceiveProtocolLogMaxAge                        = $TransportService.ReceiveProtocolLogMaxAge
            ReceiveProtocolLogMaxDirectorySize              = $TransportService.ReceiveProtocolLogMaxDirectorySize
            ReceiveProtocolLogMaxFileSize                   = $TransportService.ReceiveProtocolLogMaxFileSize
            ReceiveProtocolLogPath                          = $TransportService.ReceiveProtocolLogPath
            RecipientValidationCacheEnabled                 = $TransportService.RecipientValidationCacheEnabled
            ReplayDirectoryPath                             = $TransportService.ReplayDirectoryPath
            RootDropDirectoryPath                           = $TransportService.RootDropDirectoryPath
            RoutingTableLogMaxAge                           = $TransportService.RoutingTableLogMaxAge
            RoutingTableLogMaxDirectorySize                 = $TransportService.RoutingTableLogMaxDirectorySize
            RoutingTableLogPath                             = $TransportService.RoutingTableLogPath
            SendProtocolLogMaxAge                           = $TransportService.SendProtocolLogMaxAge
            SendProtocolLogMaxDirectorySize                 = $TransportService.SendProtocolLogMaxDirectorySize
            SendProtocolLogMaxFileSize                      = $TransportService.SendProtocolLogMaxFileSize
            SendProtocolLogPath                             = $TransportService.SendProtocolLogPath
            ServerStatisticsLogMaxAge                       = $TransportService.ServerStatisticsLogMaxAge
            ServerStatisticsLogMaxDirectorySize             = $TransportService.ServerStatisticsLogMaxDirectorySize
            ServerStatisticsLogMaxFileSize                  = $TransportService.ServerStatisticsLogMaxFileSize
            ServerStatisticsLogPath                         = $TransportService.ServerStatisticsLogPath
            TransientFailureRetryCount                      = $TransportService.TransientFailureRetryCount
            TransientFailureRetryInterval                   = $TransportService.TransientFailureRetryInterval.ToString()
            UseDowngradedExchangeServerAuth                 = $TransportService.UseDowngradedExchangeServerAuth
        }
    }
    $returnValue
}

function Set-TargetResource
{
    [CmdletBinding()]
    param
    (
        [parameter(Mandatory = $true)]
        [System.String]
        $Identity,

        [parameter(Mandatory = $true)]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.Credential()]
        $Credential,

        [System.Boolean]
        $AllowServiceRestart = $false,

        [System.String]
        $ActiveUserStatisticsLogMaxAge,

        [System.String]
        $ActiveUserStatisticsLogMaxDirectorySize,

        [System.String]
        $ActiveUserStatisticsLogMaxFileSize,

        [System.String]
        $ActiveUserStatisticsLogPath,

        [System.Boolean]
        $AgentLogEnabled,

        [System.String]
        $AgentLogMaxAge,

        [System.String]
        $AgentLogMaxDirectorySize,

        [System.String]
        $AgentLogMaxFileSize,

        [System.String]
        $AgentLogPath,

        [System.Boolean]
        $ConnectivityLogEnabled,

        [System.String]
        $ConnectivityLogMaxAge,

        [System.String]
        $ConnectivityLogMaxDirectorySize,

        [System.String]
        $ConnectivityLogMaxFileSize,

        [System.String]
        $ConnectivityLogPath,

        [System.Boolean]
        $ContentConversionTracingEnabled,

        [System.String]
        $DelayNotificationTimeout,

        [System.Boolean]
        $DnsLogEnabled,

        [System.String]
        $DnsLogMaxAge,

        [System.String]
        $DnsLogMaxDirectorySize,

        [System.String]
        $DnsLogMaxFileSize,

        [System.String]
        $DnsLogPath,

        [System.Boolean]
        $ExternalDNSAdapterEnabled,

        [System.String]
        $ExternalDNSAdapterGuid,

        [ValidateSet("Any","UseTcpOnly","UseUdpOnly")]
        [System.String]
        $ExternalDNSProtocolOption,

        [System.String[]]
        $ExternalDNSServers,

        [System.String]
        $ExternalIPAddress,

        [System.Boolean]
        $InternalDNSAdapterEnabled,

        [System.String]
        $InternalDNSAdapterGuid,

        [ValidateSet("Any","UseTcpOnly","UseUdpOnly")]
        [System.String]
        $InternalDNSProtocolOption,

        [System.String[]]
        $InternalDNSServers,

        [ValidateSet("None","Verbose")]
        [System.String]
        $IntraOrgConnectorProtocolLoggingLevel,

        [System.Int32]
        $IntraOrgConnectorSmtpMaxMessagesPerConnection,

        [System.Boolean]
        $IrmLogEnabled,

        [System.String]
        $IrmLogMaxAge,

        [System.String]
        $IrmLogMaxDirectorySize,

        [System.String]
        $IrmLogMaxFileSize,

        [System.String]
        $IrmLogPath,

        [System.Int32]
        $MaxConcurrentMailboxDeliveries,

        [System.Int32]
        $MaxConcurrentMailboxSubmissions,

        [System.Int32]
        $MaxConnectionRatePerMinute,

        [ValidateRange(1,2147483647)]
        [System.String]
        $MaxOutboundConnections,

        [ValidateRange(1,2147483647)]
        [System.String]
        $MaxPerDomainOutboundConnections,

        [System.String]
        $MessageExpirationTimeout,

        [System.String]
        $MessageRetryInterval,

        [System.Boolean]
        $MessageTrackingLogEnabled,

        [System.String]
        $MessageTrackingLogMaxAge,

        [System.String]
        $MessageTrackingLogMaxDirectorySize,

        [System.String]
        $MessageTrackingLogMaxFileSize,

        [System.String]
        $MessageTrackingLogPath,

        [System.Boolean]
        $MessageTrackingLogSubjectLoggingEnabled,

        [System.String]
        $OutboundConnectionFailureRetryInterval,

        [System.String]
        $PickupDirectoryMaxHeaderSize,

        [ValidateRange(1,20000)]
        [System.Int32]
        $PickupDirectoryMaxMessagesPerMinute,

        [ValidateRange(1,10000)]
        [System.Int32]
        $PickupDirectoryMaxRecipientsPerMessage,

        [System.String]
        $PickupDirectoryPath,

        [System.Boolean]
        $PipelineTracingEnabled,

        [System.String]
        $PipelineTracingPath,

        [System.String]
        $PipelineTracingSenderAddress,

        [System.Boolean]
        $PoisonMessageDetectionEnabled,

        [ValidateRange(1,10)]
        [System.Int32]
        $PoisonThreshold,

        [System.String]
        $QueueLogMaxAge,

        [System.String]
        $QueueLogMaxDirectorySize,

        [System.String]
        $QueueLogMaxFileSize,

        [System.String]
        $QueueLogPath,

        [System.String]
        $QueueMaxIdleTime,

        [System.String]
        $ReceiveProtocolLogMaxAge,

        [System.String]
        $ReceiveProtocolLogMaxDirectorySize,

        [System.String]
        $ReceiveProtocolLogMaxFileSize,

        [System.String]
        $ReceiveProtocolLogPath,

        [System.Boolean]
        $RecipientValidationCacheEnabled,

        [System.String]
        $ReplayDirectoryPath,

        [System.String]
        $RootDropDirectoryPath,

        [System.String]
        $RoutingTableLogMaxAge,

        [System.String]
        $RoutingTableLogMaxDirectorySize,

        [System.String]
        $RoutingTableLogPath,

        [System.String]
        $SendProtocolLogMaxAge,

        [System.String]
        $SendProtocolLogMaxDirectorySize,

        [System.String]
        $SendProtocolLogMaxFileSize,

        [System.String]
        $SendProtocolLogPath,

        [System.String]
        $ServerStatisticsLogMaxAge,

        [System.String]
        $ServerStatisticsLogMaxDirectorySize,

        [System.String]
        $ServerStatisticsLogMaxFileSize,

        [System.String]
        $ServerStatisticsLogPath,

        [ValidateRange(1,15)]
        [System.Int32]
        $TransientFailureRetryCount,

        [System.String]
        $TransientFailureRetryInterval,

        [System.Boolean]
        $UseDowngradedExchangeServerAuth
    )

    #Load helper module
    Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0

    #Establish remote Powershell session
    GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Set-TransportService" -VerbosePreference $VerbosePreference

    #Remove Credential and Ensure so we don't pass it into the next command
    RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart"

    try
    {

        #if PipelineTracingSenderAddress exists and is $null remove it from $PSBoundParameters and add argument
        if ($PSBoundParameters.ContainsKey('PipelineTracingSenderAddress'))
        {
            if ([string]::IsNullOrEmpty($PipelineTracingSenderAddress))
            {
                Write-Verbose "PipelineTracingSenderAddress is NULL"
                RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "PipelineTracingSenderAddress"
                $Arguments += '-PipelineTracingSenderAddress $null '
            }
        }

        #if ExternalIPAddress exists and is $null remove it from $PSBoundParameters and add argument
        if ($PSBoundParameters.ContainsKey('ExternalIPAddress'))
        {
            if ([string]::IsNullOrEmpty($ExternalIPAddress))
            {
                Write-Verbose "ExternalIPAddress is NULL"
                RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "ExternalIPAddress"
                $Arguments += '-ExternalIPAddress $null '
            }
        }

        #if InternalDNSServers exists and is $null remove it from $PSBoundParameters and add argument
        if ($PSBoundParameters.ContainsKey('InternalDNSServers'))
        {
            if ([string]::IsNullOrEmpty($InternalDNSServers))
            {
                Write-Verbose "InternalDNSServers is NULL"
                RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "InternalDNSServers"
                $Arguments += '-InternalDNSServers $null '
            }
        }

        #if ExternalDNSServers exists and is $null remove it from $PSBoundParameters and add argument
        if ($PSBoundParameters.ContainsKey('ExternalDNSServers'))
        {
            if ([string]::IsNullOrEmpty($ExternalDNSServers))
            {
                Write-Verbose "ExternalDNSServers is NULL"
                RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "ExternalDNSServers"
                $Arguments += '-ExternalDNSServers $null '
            }
        }

        if ($arguments)
        {
            $expression = 'Set-TransportService @PSBoundParameters '+$Arguments
            Invoke-Expression $expression
        }
        else
        {
            Set-TransportService @PSBoundParameters
        }
    }
    catch
    {
        Write-Verbose "The following exception was thrown:$($_.Exception.Message)"
    }

    if ($AllowServiceRestart -eq $true)
    {
        Write-Verbose "Restart service MSExchangeTransport"
        Restart-Service -Name MSExchangeTransport -WarningAction SilentlyContinue
    }
    Else
    {
        Write-Warning "The configuration will not take effect until the MSExchangeTransport service is manually restarted."
    }

}

function Test-TargetResource
{
    [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")]
    [CmdletBinding()]
    [OutputType([System.Boolean])]
    param
    (
        [parameter(Mandatory = $true)]
        [System.String]
        $Identity,

        [parameter(Mandatory = $true)]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.Credential()]
        $Credential,

        [System.Boolean]
        $AllowServiceRestart = $false,

        [System.String]
        $ActiveUserStatisticsLogMaxAge,

        [System.String]
        $ActiveUserStatisticsLogMaxDirectorySize,

        [System.String]
        $ActiveUserStatisticsLogMaxFileSize,

        [System.String]
        $ActiveUserStatisticsLogPath,

        [System.Boolean]
        $AgentLogEnabled,

        [System.String]
        $AgentLogMaxAge,

        [System.String]
        $AgentLogMaxDirectorySize,

        [System.String]
        $AgentLogMaxFileSize,

        [System.String]
        $AgentLogPath,

        [System.Boolean]
        $ConnectivityLogEnabled,

        [System.String]
        $ConnectivityLogMaxAge,

        [System.String]
        $ConnectivityLogMaxDirectorySize,

        [System.String]
        $ConnectivityLogMaxFileSize,

        [System.String]
        $ConnectivityLogPath,

        [System.Boolean]
        $ContentConversionTracingEnabled,

        [System.String]
        $DelayNotificationTimeout,

        [System.Boolean]
        $DnsLogEnabled,

        [System.String]
        $DnsLogMaxAge,

        [System.String]
        $DnsLogMaxDirectorySize,

        [System.String]
        $DnsLogMaxFileSize,

        [System.String]
        $DnsLogPath,

        [System.Boolean]
        $ExternalDNSAdapterEnabled,

        [System.String]
        $ExternalDNSAdapterGuid,

        [ValidateSet("Any","UseTcpOnly","UseUdpOnly")]
        [System.String]
        $ExternalDNSProtocolOption,

        [System.String[]]
        $ExternalDNSServers,

        [System.String]
        $ExternalIPAddress,

        [System.Boolean]
        $InternalDNSAdapterEnabled,

        [System.String]
        $InternalDNSAdapterGuid,

        [ValidateSet("Any","UseTcpOnly","UseUdpOnly")]
        [System.String]
        $InternalDNSProtocolOption,

        [System.String[]]
        $InternalDNSServers,

        [ValidateSet("None","Verbose")]
        [System.String]
        $IntraOrgConnectorProtocolLoggingLevel,

        [System.Int32]
        $IntraOrgConnectorSmtpMaxMessagesPerConnection,

        [System.Boolean]
        $IrmLogEnabled,

        [System.String]
        $IrmLogMaxAge,

        [System.String]
        $IrmLogMaxDirectorySize,

        [System.String]
        $IrmLogMaxFileSize,

        [System.String]
        $IrmLogPath,

        [System.Int32]
        $MaxConcurrentMailboxDeliveries,

        [System.Int32]
        $MaxConcurrentMailboxSubmissions,

        [System.Int32]
        $MaxConnectionRatePerMinute,

        [ValidateRange(1,2147483647)]
        [System.String]
        $MaxOutboundConnections,

        [ValidateRange(1,2147483647)]
        [System.String]
        $MaxPerDomainOutboundConnections,

        [System.String]
        $MessageExpirationTimeout,

        [System.String]
        $MessageRetryInterval,

        [System.Boolean]
        $MessageTrackingLogEnabled,

        [System.String]
        $MessageTrackingLogMaxAge,

        [System.String]
        $MessageTrackingLogMaxDirectorySize,

        [System.String]
        $MessageTrackingLogMaxFileSize,

        [System.String]
        $MessageTrackingLogPath,

        [System.Boolean]
        $MessageTrackingLogSubjectLoggingEnabled,

        [System.String]
        $OutboundConnectionFailureRetryInterval,

        [System.String]
        $PickupDirectoryMaxHeaderSize,

        [ValidateRange(1,20000)]
        [System.Int32]
        $PickupDirectoryMaxMessagesPerMinute,

        [ValidateRange(1,10000)]
        [System.Int32]
        $PickupDirectoryMaxRecipientsPerMessage,

        [System.String]
        $PickupDirectoryPath,

        [System.Boolean]
        $PipelineTracingEnabled,

        [System.String]
        $PipelineTracingPath,

        [System.String]
        $PipelineTracingSenderAddress,

        [System.Boolean]
        $PoisonMessageDetectionEnabled,

        [ValidateRange(1,10)]
        [System.Int32]
        $PoisonThreshold,

        [System.String]
        $QueueLogMaxAge,

        [System.String]
        $QueueLogMaxDirectorySize,

        [System.String]
        $QueueLogMaxFileSize,

        [System.String]
        $QueueLogPath,

        [System.String]
        $QueueMaxIdleTime,

        [System.String]
        $ReceiveProtocolLogMaxAge,

        [System.String]
        $ReceiveProtocolLogMaxDirectorySize,

        [System.String]
        $ReceiveProtocolLogMaxFileSize,

        [System.String]
        $ReceiveProtocolLogPath,

        [System.Boolean]
        $RecipientValidationCacheEnabled,

        [System.String]
        $ReplayDirectoryPath,

        [System.String]
        $RootDropDirectoryPath,

        [System.String]
        $RoutingTableLogMaxAge,

        [System.String]
        $RoutingTableLogMaxDirectorySize,

        [System.String]
        $RoutingTableLogPath,

        [System.String]
        $SendProtocolLogMaxAge,

        [System.String]
        $SendProtocolLogMaxDirectorySize,

        [System.String]
        $SendProtocolLogMaxFileSize,

        [System.String]
        $SendProtocolLogPath,

        [System.String]
        $ServerStatisticsLogMaxAge,

        [System.String]
        $ServerStatisticsLogMaxDirectorySize,

        [System.String]
        $ServerStatisticsLogMaxFileSize,

        [System.String]
        $ServerStatisticsLogPath,

        [ValidateRange(1,15)]
        [System.Int32]
        $TransientFailureRetryCount,

        [System.String]
        $TransientFailureRetryInterval,

        [System.Boolean]
        $UseDowngradedExchangeServerAuth
    )

    #Load helper module
    Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0

    LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference

    #Establish remote Powershell session
    GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-TransportService" -VerbosePreference $VerbosePreference

    $TransportService = Get-TransportService $Identity -ErrorAction SilentlyContinue

    if ($null -ne $TransportService)
    {

        if (!(VerifySetting -Name "ActiveUserStatisticsLogMaxAge" -Type "Timespan" -ExpectedValue $ActiveUserStatisticsLogMaxAge -ActualValue $TransportService.ActiveUserStatisticsLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ActiveUserStatisticsLogMaxDirectorySize" -Type "ByteQuantifiedSize" -ExpectedValue $ActiveUserStatisticsLogMaxDirectorySize -ActualValue $TransportService.ActiveUserStatisticsLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ActiveUserStatisticsLogMaxFileSize" -Type "ByteQuantifiedSize" -ExpectedValue $ActiveUserStatisticsLogMaxFileSize -ActualValue $TransportService.ActiveUserStatisticsLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ActiveUserStatisticsLogPath" -Type "String" -ExpectedValue $ActiveUserStatisticsLogPath -ActualValue $TransportService.ActiveUserStatisticsLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "AgentLogEnabled" -Type "Boolean" -ExpectedValue $AgentLogEnabled -ActualValue $TransportService.AgentLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "AgentLogMaxAge" -Type "Timespan" -ExpectedValue $AgentLogMaxAge -ActualValue $TransportService.AgentLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "AgentLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $AgentLogMaxDirectorySize -ActualValue $TransportService.AgentLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "AgentLogMaxFileSize" -Type "Unlimited" -ExpectedValue $AgentLogMaxFileSize -ActualValue $TransportService.AgentLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "AgentLogPath" -Type "String" -ExpectedValue $AgentLogPath -ActualValue $TransportService.AgentLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ConnectivityLogEnabled" -Type "Boolean" -ExpectedValue $ConnectivityLogEnabled -ActualValue $TransportService.ConnectivityLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ConnectivityLogMaxAge" -Type "Timespan" -ExpectedValue $ConnectivityLogMaxAge -ActualValue $TransportService.ConnectivityLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ConnectivityLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $ConnectivityLogMaxDirectorySize -ActualValue $TransportService.ConnectivityLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ConnectivityLogMaxFileSize" -Type "Unlimited" -ExpectedValue $ConnectivityLogMaxFileSize -ActualValue $TransportService.ConnectivityLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ConnectivityLogPath" -Type "String" -ExpectedValue $ConnectivityLogPath -ActualValue $TransportService.ConnectivityLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ContentConversionTracingEnabled" -Type "Boolean" -ExpectedValue $ContentConversionTracingEnabled -ActualValue $TransportService.ContentConversionTracingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "DelayNotificationTimeout" -Type "TimeSpan" -ExpectedValue $DelayNotificationTimeout -ActualValue $TransportService.DelayNotificationTimeout -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "DnsLogEnabled" -Type "Boolean" -ExpectedValue $DnsLogEnabled -ActualValue $TransportService.DnsLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "DnsLogMaxAge" -Type "TimeSpan" -ExpectedValue $DnsLogMaxAge -ActualValue $TransportService.DnsLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "DnsLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $DnsLogMaxDirectorySize -ActualValue $TransportService.DnsLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "DnsLogMaxFileSize" -Type "Unlimited" -ExpectedValue $DnsLogMaxFileSize -ActualValue $TransportService.DnsLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "DnsLogPath" -Type "String" -ExpectedValue $DnsLogPath -ActualValue $TransportService.DnsLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ExternalDNSAdapterEnabled" -Type "Boolean" -ExpectedValue $ExternalDNSAdapterEnabled -ActualValue $TransportService.ExternalDNSAdapterEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ExternalDNSAdapterGuid" -Type "String" -ExpectedValue $ExternalDNSAdapterGuid -ActualValue $TransportService.ExternalDNSAdapterGuid -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ExternalDNSProtocolOption" -Type "String" -ExpectedValue $ExternalDNSProtocolOption -ActualValue $TransportService.ExternalDNSProtocolOption -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ExternalDNSServers" -Type "IPAddresses" -ExpectedValue $ExternalDNSServers -ActualValue $TransportService.ExternalDNSServers.IPAddressToString -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ExternalIPAddress" -Type "IPAddress" -ExpectedValue $ExternalIPAddress -ActualValue $TransportService.ExternalIPAddress -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "InternalDNSAdapterEnabled" -Type "Boolean" -ExpectedValue $InternalDNSAdapterEnabled -ActualValue $TransportService.InternalDNSAdapterEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "InternalDNSAdapterGuid" -Type "String" -ExpectedValue $InternalDNSAdapterGuid -ActualValue $TransportService.InternalDNSAdapterGuid -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "InternalDNSProtocolOption" -Type "String" -ExpectedValue $InternalDNSProtocolOption -ActualValue $TransportService.InternalDNSProtocolOption -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "InternalDNSServers" -Type "IPAddresses" -ExpectedValue $InternalDNSServers -ActualValue $TransportService.InternalDNSServers.IPAddressToString -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "IntraOrgConnectorProtocolLoggingLevel" -Type "String" -ExpectedValue $IntraOrgConnectorProtocolLoggingLevel -ActualValue $TransportService.IntraOrgConnectorProtocolLoggingLevel -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "IntraOrgConnectorSmtpMaxMessagesPerConnection" -Type "Int" -ExpectedValue $IntraOrgConnectorSmtpMaxMessagesPerConnection -ActualValue $TransportService.IntraOrgConnectorSmtpMaxMessagesPerConnection -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "IrmLogEnabled" -Type "Boolean" -ExpectedValue $IrmLogEnabled -ActualValue $TransportService.IrmLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "IrmLogMaxAge" -Type "TimeSpan" -ExpectedValue $IrmLogMaxAge -ActualValue $TransportService.IrmLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "IrmLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $IrmLogMaxDirectorySize -ActualValue $TransportService.IrmLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "IrmLogMaxFileSize" -Type "ByteQuantifiedSize" -ExpectedValue $IrmLogMaxFileSize -ActualValue $TransportService.IrmLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "IrmLogPath" -Type "String" -ExpectedValue $IrmLogPath -ActualValue $TransportService.IrmLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MaxConcurrentMailboxDeliveries" -Type "Int" -ExpectedValue $MaxConcurrentMailboxDeliveries -ActualValue $TransportService.MaxConcurrentMailboxDeliveries -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MaxConcurrentMailboxSubmissions" -Type "Int" -ExpectedValue $MaxConcurrentMailboxSubmissions -ActualValue $TransportService.MaxConcurrentMailboxSubmissions -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MaxConnectionRatePerMinute" -Type "Int" -ExpectedValue $MaxConnectionRatePerMinute -ActualValue $TransportService.MaxConnectionRatePerMinute -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MaxOutboundConnections" -Type "Unlimited" -ExpectedValue $MaxOutboundConnections -ActualValue $TransportService.MaxOutboundConnections -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MaxPerDomainOutboundConnections" -Type "Unlimited" -ExpectedValue $MaxPerDomainOutboundConnections -ActualValue $TransportService.MaxPerDomainOutboundConnections -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MessageExpirationTimeout" -Type "TimeSpan" -ExpectedValue $MessageExpirationTimeout -ActualValue $TransportService.MessageExpirationTimeout -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MessageRetryInterval" -Type "TimeSpan" -ExpectedValue $MessageRetryInterval -ActualValue $TransportService.MessageRetryInterval -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MessageTrackingLogEnabled" -Type "Boolean" -ExpectedValue $MessageTrackingLogEnabled -ActualValue $TransportService.MessageTrackingLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MessageTrackingLogMaxAge" -Type "TimeSpan" -ExpectedValue $MessageTrackingLogMaxAge -ActualValue $TransportService.MessageTrackingLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MessageTrackingLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $MessageTrackingLogMaxDirectorySize -ActualValue $TransportService.MessageTrackingLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MessageTrackingLogMaxFileSize" -Type "ByteQuantifiedSize" -ExpectedValue $MessageTrackingLogMaxFileSize -ActualValue $TransportService.MessageTrackingLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MessageTrackingLogPath" -Type "String" -ExpectedValue $MessageTrackingLogPath -ActualValue $TransportService.MessageTrackingLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "MessageTrackingLogSubjectLoggingEnabled" -Type "Boolean" -ExpectedValue $MessageTrackingLogSubjectLoggingEnabled -ActualValue $TransportService.MessageTrackingLogSubjectLoggingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "OutboundConnectionFailureRetryInterval" -Type "TimeSpan" -ExpectedValue $OutboundConnectionFailureRetryInterval -ActualValue $TransportService.OutboundConnectionFailureRetryInterval -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "PickupDirectoryMaxHeaderSize" -Type "ByteQuantifiedSize" -ExpectedValue $PickupDirectoryMaxHeaderSize -ActualValue $TransportService.PickupDirectoryMaxHeaderSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "PickupDirectoryMaxMessagesPerMinute" -Type "Int" -ExpectedValue $PickupDirectoryMaxMessagesPerMinute -ActualValue $TransportService.PickupDirectoryMaxMessagesPerMinute -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "PickupDirectoryMaxRecipientsPerMessage" -Type "Int" -ExpectedValue $PickupDirectoryMaxRecipientsPerMessage -ActualValue $TransportService.PickupDirectoryMaxRecipientsPerMessage -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "PickupDirectoryPath" -Type "String" -ExpectedValue $PickupDirectoryPath -ActualValue $TransportService.PickupDirectoryPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "PipelineTracingEnabled" -Type "Boolean" -ExpectedValue $PipelineTracingEnabled -ActualValue $TransportService.PipelineTracingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "PipelineTracingPath" -Type "String" -ExpectedValue $PipelineTracingPath -ActualValue $TransportService.PipelineTracingPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "PipelineTracingSenderAddress" -Type "SMTPAddress" -ExpectedValue $PipelineTracingSenderAddress -ActualValue $TransportService.PipelineTracingSenderAddress -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "PoisonMessageDetectionEnabled" -Type "Boolean" -ExpectedValue $PoisonMessageDetectionEnabled -ActualValue $TransportService.PoisonMessageDetectionEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "PoisonThreshold" -Type "Int" -ExpectedValue $PoisonThreshold -ActualValue $TransportService.PoisonThreshold -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "QueueLogMaxAge" -Type "TimeSpan" -ExpectedValue $QueueLogMaxAge -ActualValue $TransportService.QueueLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "QueueLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $QueueLogMaxDirectorySize -ActualValue $TransportService.QueueLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "QueueLogMaxFileSize" -Type "Unlimited" -ExpectedValue $QueueLogMaxFileSize -ActualValue $TransportService.QueueLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "QueueLogPath" -Type "String" -ExpectedValue $QueueLogPath -ActualValue $TransportService.QueueLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "QueueMaxIdleTime" -Type "TimeSpan" -ExpectedValue $QueueMaxIdleTime -ActualValue $TransportService.QueueMaxIdleTime -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ReceiveProtocolLogMaxAge" -Type "TimeSpan" -ExpectedValue $ReceiveProtocolLogMaxAge -ActualValue $TransportService.ReceiveProtocolLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ReceiveProtocolLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $ReceiveProtocolLogMaxDirectorySize -ActualValue $TransportService.ReceiveProtocolLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ReceiveProtocolLogMaxFileSize" -Type "Unlimited" -ExpectedValue $ReceiveProtocolLogMaxFileSize -ActualValue $TransportService.ReceiveProtocolLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ReceiveProtocolLogPath" -Type "String" -ExpectedValue $ReceiveProtocolLogPath -ActualValue $TransportService.ReceiveProtocolLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "RecipientValidationCacheEnabled" -Type "Boolean" -ExpectedValue $RecipientValidationCacheEnabled -ActualValue $TransportService.RecipientValidationCacheEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }
        if (!(VerifySetting -Name "ReplayDirectoryPath" -Type "String" -ExpectedValue $ReplayDirectoryPath -ActualValue $TransportService.ReplayDirectoryPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "RootDropDirectoryPath" -Type "String" -ExpectedValue $RootDropDirectoryPath -ActualValue $TransportService.RootDropDirectoryPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "RoutingTableLogMaxAge" -Type "TimeSpan" -ExpectedValue $RoutingTableLogMaxAge -ActualValue $TransportService.RoutingTableLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "RoutingTableLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $RoutingTableLogMaxDirectorySize -ActualValue $TransportService.RoutingTableLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "RoutingTableLogPath" -Type "String" -ExpectedValue $RoutingTableLogPath -ActualValue $TransportService.RoutingTableLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "SendProtocolLogMaxAge" -Type "TimeSpan" -ExpectedValue $SendProtocolLogMaxAge -ActualValue $TransportService.SendProtocolLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "SendProtocolLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $SendProtocolLogMaxDirectorySize -ActualValue $TransportService.SendProtocolLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "SendProtocolLogMaxFileSize" -Type "Unlimited" -ExpectedValue $SendProtocolLogMaxFileSize -ActualValue $TransportService.SendProtocolLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "SendProtocolLogPath" -Type "String" -ExpectedValue $SendProtocolLogPath -ActualValue $TransportService.SendProtocolLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ServerStatisticsLogMaxAge" -Type "TimeSpan" -ExpectedValue $ServerStatisticsLogMaxAge -ActualValue $TransportService.ServerStatisticsLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ServerStatisticsLogMaxDirectorySize" -Type "ByteQuantifiedSize" -ExpectedValue $ServerStatisticsLogMaxDirectorySize -ActualValue $TransportService.ServerStatisticsLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ServerStatisticsLogMaxFileSize" -Type "ByteQuantifiedSize" -ExpectedValue $ServerStatisticsLogMaxFileSize -ActualValue $TransportService.ServerStatisticsLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "ServerStatisticsLogPath" -Type "String" -ExpectedValue $ServerStatisticsLogPath -ActualValue $TransportService.ServerStatisticsLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "TransientFailureRetryCount" -Type "Int" -ExpectedValue $TransientFailureRetryCount -ActualValue $TransportService.TransientFailureRetryCount -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "TransientFailureRetryInterval" -Type "TimeSpan" -ExpectedValue $TransientFailureRetryInterval -ActualValue $TransportService.TransientFailureRetryInterval -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

        if (!(VerifySetting -Name "UseDowngradedExchangeServerAuth" -Type "Boolean" -ExpectedValue $UseDowngradedExchangeServerAuth -ActualValue $TransportService.UseDowngradedExchangeServerAuth -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference))
        {
            return $false
        }

    }
    else
    {
        return $false
    }
    return $true
}

function CompareIPAddressewithString
{
    [CmdletBinding()]
    [OutputType([System.Boolean])]
    param([System.Net.IPAddress]$IPAddress, [String]$String)
    if (($null -eq $IPAddress -and !([string]::IsNullOrEmpty($String))) -or ($null -ne $IPAddress -and [string]::IsNullOrEmpty($String)))
    {
        $returnValue = $false
    }
    elseif ($null -eq $IPAddress -and [string]::IsNullOrEmpty($String))
    {
        $returnValue = $true
    }
    else
    {
        $returnValue =($IPAddress.Equals([System.Net.IPAddress]::Parse($string)))
    }

    if ($returnValue -eq $false)
    {
        ReportBadSetting -SettingName $IPAddress -ExpectedValue $ExpectedValue -ActualValue $IPAddress -VerbosePreference $VerbosePreference
    }
    return $returnValue
}

function CompareSmtpAdresswithString
{
    [CmdletBinding()]
    [OutputType([System.Boolean])]
    param($SmtpAddress,[String]$String)
    if (($null -eq $SmtpAddress) -and ([string]::IsNullOrEmpty($String)))
    {
        Write-Verbose "Expected and actual value is empty, therefore equal!"
        return $true
    }
    elseif (($null -eq $SmtpAddress) -and -not ([string]::IsNullOrEmpty($String)))
    {
        return $false
    }
    elseif ($SmtpAddress.Gettype() -eq [Microsoft.Exchange.Data.SmtpAddress])
    {
        if ([string]::IsNullOrEmpty($String))
        {
            return $false
        }
        else
        {
            return($SmtpAddress.Equals([Microsoft.Exchange.Data.SmtpAddress]::Parse($string)))
        }
    }
    else
    {
        Write-Verbose "No type of [Microsoft.Exchange.Data.SmtpAddress]!"
        return $false
    }
}

Export-ModuleMember -Function *-TargetResource


text: {{+partials.standard_extensions_api api:apis.extensions.document_scan intro:intros.documentScan/}}

redpajama_set_name: RedPajamaGithub


text:
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/rel-2.0-xr-osx64-bld/build/dom/interfaces/events/nsIDOMEventListener.idl
 */

#ifndef __gen_nsIDOMEventListener_h__
#define __gen_nsIDOMEventListener_h__

#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    nsIDOMEventListener */
#define NS_IDOMEVENTLISTENER_IID_STR "df31c120-ded6-11d1-bd85-00805f8ae3f4"

#define NS_IDOMEVENTLISTENER_IID \
  {0xdf31c120, 0xded6, 0x11d1, \
    { 0xbd, 0x85, 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0xf4 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMEventListener : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMEVENTLISTENER_IID)

  /**
 * The nsIDOMEventListener interface is a callback interface for
 * listening to events in the Document Object Model.
 *
 * For more information on this interface please see
 * http://www.w3.org/TR/DOM-Level-2-Events/
 */
/**
   * This method is called whenever an event occurs of the type for which
   * the EventListener interface was registered.
   *
   * @param   evt The Event contains contextual information about the
   *              event. It also contains the stopPropagation and
   *              preventDefault methods which are used in determining the
   *              event's flow and default action.
   */
  /* void handleEvent (in nsIDOMEvent event); */
  NS_SCRIPTABLE NS_IMETHOD HandleEvent(nsIDOMEvent *event) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMEventListener, NS_IDOMEVENTLISTENER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOMEVENTLISTENER \
  NS_SCRIPTABLE NS_IMETHOD HandleEvent(nsIDOMEvent *event);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOMEVENTLISTENER(_to) \
  NS_SCRIPTABLE NS_IMETHOD HandleEvent(nsIDOMEvent *event) { return _to HandleEvent(event); }

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOMEVENTLISTENER(_to) \
  NS_SCRIPTABLE NS_IMETHOD HandleEvent(nsIDOMEvent *event) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleEvent(event); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsDOMEventListener : public nsIDOMEventListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIDOMEVENTLISTENER

  nsDOMEventListener();

private:
  ~nsDOMEventListener();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsDOMEventListener, nsIDOMEventListener)

nsDOMEventListener::nsDOMEventListener()
{
  /* member initializers and constructor code */
}

nsDOMEventListener::~nsDOMEventListener()
{
  /* destructor code */
}

/* void handleEvent (in nsIDOMEvent event); */
NS_IMETHODIMP nsDOMEventListener::HandleEvent(nsIDOMEvent *event)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#endif /* __gen_nsIDOMEventListener_h__ */


text:
<?xml version="1.0"?>
<tool id="easysvm" name="Train and Test SVMs">
<description>Train SVMs and predict for given hyper-parameters</description>
  <command interpreter="python">easysvm.py
	#if $protocol.expt_type=="1"
		cv $protocol.crossval
	#elif $protocol.expt_type=="2"
		modelsel $protocol.crossval
	#elif $protocol.expt_type=="3"
		pred
	#end if
        $C
	#if $kernel.kname == "1"
	    linear
        #elif $kernel.kname == "2"
	    poly ${kernel.degree} ${kernel.inhomogene} true
        #elif $kernel.kname == "3"
	    gauss ${kernel.width}
        #elif $kernel.kname == "4"
	    spec ${kernel.degree}
        #elif $kernel.kname == "5"
	    wd ${kernel.degree} ${kernel.shift}
        #end if
	#if $protocol.expt_type=="1"
	    #if $protocol.datatype.inputdatatype=="1"
	        fasta $protocol.datatype.dataset_pos $protocol.datatype.dataset_neg
	    #else
	        arff $protocol.datatype.dataset
            #end if
	#elif $protocol.expt_type=="2"
	    #if $protocol.datatype.inputdatatype=="1"
	        fasta $protocol.datatype.dataset_pos $protocol.datatype.dataset_neg
	    #else
	        arff $protocol.datatype.dataset
            #end if
	#else
	    #if $protocol.datatype.inputdatatype=="1"
	        fasta $protocol.datatype.dataset_pos $protocol.datatype.dataset_neg
	    #else
	        arff $protocol.datatype.dataset
            #end if
	    $protocol.datatype.dataset_test
	#end if
	$outfile
        #if $kernel.kname=="4" or $kernel.kname=="5"
            #if $kernel.seq.stype=="dna"
                dna $kernel.seq.con
            #elif $kernel.seq.stype=="protein"
                protein $kernel.seq.con
            #end if
        #end if
  </command>
  <inputs>
	  <conditional name="protocol">
	  <param name="expt_type" type="select" label="Experimental
	  Protocol" help="In 'Cross Validation' mode, the training set is
			split into N subsets. (N-1) subsets are used for training
            and the remaining subset is used for testing. This is repeated
            until every subset has been used for testing once.
            In 'Prediction' mode, one trains on a
	        training set and then predicts on a separate testing set.">
        <option value="1">Train using cross validation</option>
	<option value="3">Train and predict</option>
      </param>
      <when value="1">
	  <conditional name="datatype">
	  <param name="inputdatatype" type="select" label="Input data type" help="There are two available formats: FASTA for sequences and the more general ARFF format for sequences or numerical attributes.">
	  <option value="1">FASTA</option>
	  <option value="2">ARFF</option>
	  </param>
	  <when value="1">
		  <param name="dataset_pos" type="data" format="fasta">
		  A data file with positive sequence for training
		  </param>
		  <param name="dataset_neg" type="data" format="fasta">
		  A data file with negative sequence for training
		  </param>
	  </when>
	  <when value="2">
		  <param name="dataset" type="data" format="arff">
		  A data file with labeled examples for training
		  </param>
	  </when>
	  </conditional>
	  <param name="crossval" type="integer" size="4" value="3"
	  help="Use the cross-validation parameter to determine the
	  number of cross validation repeats. Typical values are between
	  3 and 10.">
	  Number of cross validation repeats
	  </param>
      </when>
      <when value="3">
	  <conditional name="datatype">
	  <param name="inputdatatype" type="select" label="Input data type" help="">
	  <option value="1">FASTA</option>
	  <option value="2">ARFF</option>
	  </param>
	  <when value="1">
		  <param name="dataset_pos" type="data" format="fasta">
		  A data file with positive sequence for training
		  </param>
		  <param name="dataset_neg" type="data" format="fasta">
		  A data file with negaitive sequence for training
		  </param>
		  <param name="dataset_test" type="data" format="fasta">
		  A data file with sequences for prediction
		  </param>
	  </when>
	  <when value="2">
	         <param name="dataset" type="data" format="arff">
		 A data file with labeled examples for training
		 </param>
		 <param name="dataset_test" type="data" format="arff">
		 A data file with examples for prediction
		 </param>
	  </when>
	  </conditional>
      </when>
    </conditional>
    <param name="C" type="float" size="10" value="10" help="Increase C if you trust your training set. ">
      SVM regularization parameter C

    </param>
    <conditional name="kernel">
      <param name="kname" type="select" label="Kernel" help="The kernel
	  determines how the 'similarity' between two examples is
	  computed. It has to fit to the type and properties of the data: Use the Linear,
	  Polynomial or Gaussian kernel for real-valued data and the
	  Spectrum and Weighted Degree kernel for sequences.">
	<option value="1">Linear</option>
	<option value="2">Polynomial</option>
	<option value="3">Gaussian (RBF)</option>
	<option value="4" selected="true">Spectrum</option>
	<option value="5">Weighted Degree</option>
      </param>
      <when value="1">
      </when>
      <when value="2">
        <param name="degree" type="integer" size="4" value="3" help="The
	  degree of the polynomial kernel determines the largest number of
	  input features which are combined. ">
	  The degree of the Polynomial Kernel
	</param>
        <param name="inhomogene" type="boolean" truevalue="true" falsevalue="false" checked="true" help="Inhomogenous polynomial kernels can model more complex features." />

      </when>
      <when value="3">
        <param name="width" type="float" size="10" value="1" help="The
	  kernel width controls the breadth of the Gaussian
	  around each point. ">
	  The width of the Gaussian Kernel
	</param>
      </when>
      <when value="4">
        <param name="degree" type="integer" size="10" value="6"
	  help="Degree controls the maximal length of substrings considered in the Spectrum kernel. ">
	  The degree of the Spectrum Kernel
        </param>

        <conditional name="seq">
               <param name="stype" type="select" label="Input sequence type" help="Mention about the input data file sequence type DNA/Protein.">
                     <option value="dna">DNA</option>
                     <option value="protein">Protein</option>
               </param>
               <when value="dna">
		     <param name="con" type="select" label="Non Nucleotide converter" help="If any Non Nucleotide character present in input sequence, replace with anyone of the following">
                           <option value="A">Adenine[A]</option>
                           <option value="T">Thymine[T]</option>
                           <option value="C">Cytosine[C]</option>
                           <option value="G">Guanine[G]</option>
                           <option value="R">Purine[A|G]</option>
                           <option value="Y">Pyrimidine[T|C]</option>
                           <option value="N">Nucleotide[A|T|C|G]</option>
                     </param>
               </when>
               <when value="protein">
                    <param name="con" type="select" label="Non Amino acid converter" help="If any Non Amino acid character present in input sequence, replace with anyone of the following">
                           <option value="G">Glycine</option>
                           <option value="P">Proline</option>
                           <option value="A">Alanine</option>
                           <option value="V">Valine</option>
                           <option value="L">Leucine</option>
                           <option value="I">Isoleucine</option>
                           <option value="M">Methionine</option>
                           <option value="C">Cysteine</option>
                           <option value="F">Phenylalanine</option>
                           <option value="Y">Tyrosine</option>
                           <option value="W">Tryptophan</option>
                           <option value="H">Histidine</option>
                           <option value="K">Lysine</option>
                           <option value="R">Arginine</option>
                           <option value="Q">Glutamine</option>
                           <option value="N">Asparagine</option>
                           <option value="E">Glutamic Acid</option>
                           <option value="D">Aspartic Acid</option>
                           <option value="S">Serine</option>
                           <option value="T">Threonine</option>
                           <option value="random">Random</option>
                    </param>
               </when>
        </conditional>

      </when>
      <when value="5">
        <param name="degree" type="integer" size="10" value="10"
	  help="Degree controls the maximal length of substrings considered in the WD kernel. ">
	  The degree of the WD Kernel
        </param>
        <param name="shift" type="integer" size="10" value="2"
	  help="The shift parameter controls how many nucleotides a sequence elements can vary in position. ">
          The shift parameter of the WD Kernel to allow positional variations
        </param>

        <conditional name="seq">
               <param name="stype" type="select" label="Input sequence type" help="Mention about the input data file sequence type DNA/Protein.">
                     <option value="dna">DNA</option>
                     <option value="protein">Protein</option>
               </param>
               <when value="dna">
		     <param name="con" type="select" label="Non Nucleotide converter" help="If any Non Nucleotide character present in input sequence, replace with anyone of the following">
                           <option value="A">Adenine[A]</option>
                           <option value="T">Thymine[T]</option>
                           <option value="C">Cytosine[C]</option>
                           <option value="G">Guanine[G]</option>
                           <option value="R">Purine[A|G]</option>
                           <option value="Y">Pyrimidine[T|C]</option>
                           <option value="N">Nucleotide[A|T|C|G]</option>
                     </param>
               </when>
               <when value="protein">
                    <param name="con" type="select" label="Non Amino acid converter" help="If any Non Amino acid character present in input sequence, replace with anyone of the following">
                           <option value="G">Glycine</option>
                           <option value="P">Proline</option>
                           <option value="A">Alanine</option>
                           <option value="V">Valine</option>
                           <option value="L">Leucine</option>
                           <option value="I">Isoleucine</option>
                           <option value="M">Methionine</option>
                           <option value="C">Cysteine</option>
                           <option value="F">Phenylalanine</option>
                           <option value="Y">Tyrosine</option>
                           <option value="W">Tryptophan</option>
                           <option value="H">Histidine</option>
                           <option value="K">Lysine</option>
                           <option value="R">Arginine</option>
                           <option value="Q">Glutamine</option>
                           <option value="N">Asparagine</option>
                           <option value="E">Glutamic Acid</option>
                           <option value="D">Aspartic Acid</option>
                           <option value="S">Serine</option>
                           <option value="T">Threonine</option>
                           <option value="random">Random</option>
                    </param>
               </when>
        </conditional>

      </when>
    </conditional>
  </inputs>
  <outputs>
    <data format="tabular" name="outfile" />
  </outputs>
  <help>
.. class:: infomark

    The SVM will classify examples according to their features and
    report the classes to which they belong to for every entry in the
    training set or the test set. The cross validation (CV) procedure
    splits the data in a number of (approximately) equal sized sets
    (controlled by the CV repeat parameter). Then, it holds out each
    of those sets in turn for validation (prediction with the SVM),
    while using all the other sets for training.

.. class:: warningmark

    Please note that the
    total computation time is proportional to the number of
    cross-validation rounds.

.. class:: infomark

    **TIP:** The result table with the individual classification for every
    example.  To find optimal settings for C and the kernel
    parameters, check the prediction performance with *SVM Toolbox->Evaluate Predictions*
    and adjust in either direction to find a good setting. Repeat
    several times if necessary. Alternatively, use *SVM Toolbox->Model Selection*.

-----

    This tool is part of the MLB Galaxy package, adding some machine
    learning functionality to PSU's Galaxy framework.  Copyright (C)
    2008 Sebastian J. Schultheiss (sebi@umich.edu), Gunnar Raetsch
    (raetsch@tuebingen.mpg.de) and Cheng Soon Ong (chengsoon.ong@tuebingen.mpg.de)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, see http://www.gnu.org/licenses
    or write to the Free Software Foundation, Inc., 51 Franklin Street,
    Fifth Floor, Boston, MA 02110-1301  USA
  </help>
</tool>


text:
<?php
/**
 * StarProjectForm.php File Doc
 *
 * Formulaire de création d'un StarProject
 *
 * PHP Version 5.6
 *
 * @category   File
 * @package    CentraleLille:HomepageBundle
 * @subpackage Form
 * @author     Lechaptois Martin <martin.lechaptois@gmail.com>
 * @license    http://www.gnu.org/copyleft/gpl.html GNU General Public License
 * @link       https://github.com/EBMCentraleLille/fablab
 */

namespace CentraleLille\HomepageBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;

/**
 * StarProjectForm Class Doc
 *
 * Formulaire de création d'un StarProject
 *
 * PHP Version 5.6
 *
 * @category   File
 * @package    CentraleLille:HomepageBundle
 * @subpackage Form
 * @author     Lechaptois Martin <martin.lechaptois@gmail.com>
 * @license    http://www.gnu.org/copyleft/gpl.html GNU General Public License
 * @link       https://github.com/EBMCentraleLille/fablab
 */
class StarProjectType extends AbstractType
{
    /**
     * Formulaire de création de StarProject
     *
     * @param FormBuilderInterface $builder FormBuilder
     * @param Array                $options Options
     *
     * @return void
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('Content', TextareaType::class)
            ->add(
                'project',
                EntityType::class,
                array(
                'class' => 'CustomFosUserBundle:Project',
                'choice_label' => 'name',
                )
            );
    }
}


text:
/* jshint node: true */
exports.authentication = function (email, password, next) {
	var NA = this,
		fs = NA.modules.fs,
		path = NA.modules.path,
		pathfile = path.join(NA.serverPath, NA.webconfig._data, 'data', 'users.json');

	fs.readFile(pathfile, 'utf-8', function (err, content) {
		var users = JSON.parse(content),
			found = false;

		users.forEach(function (user) {
			if (
				user.publics.email === email &&
				user.password === password
			   ) {
				found = user;
			}
		});

		if (!found) {
			return next(false);
		}

		next(found);
	});
};


text:
package test.dataprovider;

import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.testng.collections.Lists;

import java.util.Iterator;
import java.util.List;

/**
 * @author Jacek Pulut <jacek.pulut@gmail.com>
 *
 * Make sure this class can run without causing a ConcurrentModificationException.
 */
public class ParallelDataProvider2Test {
  @DataProvider(parallel = true)
  Iterator<Integer[]> provide()
  {
    final List<Integer[]> ret = Lists.newArrayList();
    for (int i = 0; i < 1000; i++)
    {
      ret.add(new Integer[] { i });
    }
    return ret.iterator();
  }

  @Test(groups = "cme", dataProvider = "provide", invocationCount = 2, threadPoolSize = 2)
  public void checkCME(final Integer i)
  {
//    Reporter.log("" + i, true);
  }
}


text:
package se.kodapan.util.geography.gausskruger;

/**
 * @author kalle
 * @since 2013-11-05 04:02
 */
public class Sweref_99_1715 extends Sweref_99 {

  @Override
  public double getCentralMeridian() {
    return 17.25d;
  }
}


text:
Firescore.PlayersController = Ember.ArrayController.extend({
});


text:
<!DOCTYPE html>

 <html lang="<?php echo LANGUAGE_CODE; ?>">

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="author" content="Rafael Ramirez Urbina (www.fundaseth.es)">
  <meta name="designer" content="Rafael Ramirez Urbina (www.fundaseth.es)">
	<title><?php if($data['title'] != ''){echo $data['title'].' | '.SITETITLE;}else{echo SITETITLE;} ?></title>
	<meta name="description" content="">

	<?php
		helpers\assets::css(array(
			'//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css',
			'//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css',
			'//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css',
			'//fonts.googleapis.com/css?family=Muli',
			'//cdn.datatables.net/plug-ins/1.10.6/integration/bootstrap/3/dataTables.bootstrap.css',
			helpers\url::template_path() . 'css/custom.css'
		))
	?>

		      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-primary-collapse">
		        Menú

		      </button>

		        <li <?php echo $data['isBienvenida'] ?>><a href="<?php echo DIR;?>">Bienvenida

		        <li <?php echo $data['isPrograma'] ?>><a href="<?php echo DIR;?>programa">Programa

		        <li <?php echo $data['isPonentes'] ?>><a href="<?php echo DIR;?>ponentes">Ponentes

		        <li <?php echo $data['isComo-llegar'] ?>><a href="<?php echo DIR;?>como-llegar">Cómo Llegar


text:
svg {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: dash 1.5s ease-in-out forwards;
  animation-delay: 1s;
  -webkit-animation-delay: 1s;
}

@keyframes dash {
  to {
    stroke-dashoffset: 0;
  }
}


text:
namespace phi {

template <typename T, typename Context>
void ClipByNormFunctor(const Context& dev_ctx,
                       const DenseTensor& in,
                       float max_norm,
                       DenseTensor* output) {
  auto input = ∈
  dev_ctx.template Alloc<T>(output);

  PADDLE_ENFORCE_NOT_NULL(input,
                          phi::errors::InvalidArgument(
                              "Input(X) of ClipByNormOp should not be null. "
                              "Please check if it is created correctly."));

  auto x = phi::EigenVector<T>::Flatten(*input);
  auto out = phi::EigenVector<T>::Flatten(*output);
  auto x_norm = x.square().sum().sqrt();
  auto* place = dev_ctx.eigen_device();

  auto temp = (x_norm <= max_norm).template cast<T>();
  auto epsilon = ((x_norm <= static_cast<T>(1e-30)).all().template cast<T>()) *
                 static_cast<T>(1e-6);

  auto scaling =
      temp + (static_cast<T>(1) - temp) * max_norm / (x_norm + epsilon);
  Eigen::array<int, 1> one_dim{{1}};
  Eigen::DSizes<int, 1> m_dsize(input->numel());
  if (dev_ctx.GetPlace() == phi::CPUPlace()) {
    out.device(*place) = x * scaling.reshape(one_dim).eval().broadcast(m_dsize);
  } else {
    out.device(*place) = x * scaling.reshape(one_dim).broadcast(m_dsize);
  }
}

}  // namespace phi


text:
PROJECT = eprinttools

VERSION = $(shell grep -m 1 'Version =' version.go | cut -d\`  -f 2)

BRANCH = $(shell git branch | grep '* ' | cut -d\  -f 2)

OS = $(shell uname)

EXT =
ifeq ($(OS), Windows)
        EXT = .exe
endif

QUICK =
ifeq ($(quick), true)
	QUICK = quick=true
endif

PROJECT_LIST = eputil epfmt doi2eprintxml eprintxml2json

build: package $(PROJECT_LIST)

package: eprinttools.go eprint3x.go
	go build

eputil: bin/eputil$(EXT)

epfmt: bin/epfmt$(EXT)

doi2eprintxml: bin/doi2eprintxml$(EXT)

eprintxml2json: bin/eprintxml2json$(EXT)

bin/eputil$(EXT): eprinttools.go eprint3x.go cmd/eputil/eputil.go
	go build -o bin/eputil$(EXT) cmd/eputil/eputil.go

bin/epfmt$(EXT): eprinttools.go eprint3x.go cmd/epfmt/epfmt.go
	go build -o bin/epfmt$(EXT) cmd/epfmt/epfmt.go

bin/doi2eprintxml$(EXT): eprinttools.go crossref.go datacite.go clsrules/clsrules.go cmd/doi2eprintxml/doi2eprintxml.go
	go build -o bin/doi2eprintxml$(EXT) cmd/doi2eprintxml/doi2eprintxml.go

bin/eprintxml2json$(EXT): eprinttools.go eprint3x.go cmd/eprintxml2json/eprintxml2json.go
	go build -o bin/eprintxml2json$(EXT) cmd/eprintxml2json/eprintxml2json.go

install:
	env GOBIN=$(GOPATH)/bin go install cmd/eputil/eputil.go
	env GOBIN=$(GOPATH)/bin go install cmd/epfmt/epfmt.go
	env GOBIN=$(GOPATH)/bin go install cmd/doi2eprintxml/doi2eprintxml.go
	env GOBIN=$(GOPATH)/bin go install cmd/eprintxml2json/eprintxml2json.go

website: page.tmpl README.md nav.md INSTALL.md LICENSE css/site.css docs/index.md docs/eputil.md
	./mk-website.bash

test: eputil epfmt doi2eprintxml eprintxml2json
	go test -timeout 45m
	./test_cmds.bash

clean:
	if [ -d htdocs ]; then rm -fR htdocs; fi
	if [ -d bin ]; then rm -fR bin; fi
	if [ -d dist ]; then rm -fR dist; fi
	if [ -d man ]; then rm -fR man; fi
	#cd py && $(MAKE) clean

man: build
	mkdir -p man/man1
	bin/ep -generate-manpage | nroff -Tutf8 -man > man/man1/ep.1
	bin/eputil -generate-manpage | nroff -Tutf8 -man > man/man1/eputil.1
	bin/epfmt -generate-manpage | nroff -Tutf8 -man > man/man1/epfmt.1
	bin/doi2eprintxml -generate-manpage | nroff -Tutf8 -man > man/man1/doi2eprintxml.1
	bin/eprintxml2json -generate-manpage | nroff -Tutf8 -man > man/man1/eprintxml2json.1

dist/linux-amd64:
	mkdir -p dist/bin
	env  GOOS=linux GOARCH=amd64 go build -o dist/bin/eputil cmd/eputil/eputil.go
	env  GOOS=linux GOARCH=amd64 go build -o dist/bin/epfmt cmd/epfmt/epfmt.go
	env  GOOS=linux GOARCH=amd64 go build -o dist/bin/doi2eprintxml cmd/doi2eprintxml/doi2eprintxml.go
	env  GOOS=linux GOARCH=amd64 go build -o dist/bin/eprintxml2json cmd/eprintxml2json/eprintxml2json.go
	cd dist && zip -r $(PROJECT)-$(VERSION)-linux-amd64.zip README.md LICENSE INSTALL.md docs/* eprinttools/* bin/*
	rm -fR dist/bin

dist/windows-amd64:
	mkdir -p dist/bin
	env  GOOS=windows GOARCH=amd64 go build -o dist/bin/eputil.exe cmd/eputil/eputil.go
	env  GOOS=windows GOARCH=amd64 go build -o dist/bin/epfmt.exe cmd/epfmt/epfmt.go
	env  GOOS=windows GOARCH=amd64 go build -o dist/bin/doi2eprintxml.exe cmd/doi2eprintxml/doi2eprintxml.go
	env  GOOS=windows GOARCH=amd64 go build -o dist/bin/eprintxml2json.exe cmd/eprintxml2json/eprintxml2json.go
	cd dist && zip -r $(PROJECT)-$(VERSION)-windows-amd64.zip README.md LICENSE INSTALL.md docs/* eprinttools/* bin/*
	rm -fR dist/bin

dist/macos-amd64:
	mkdir -p dist/bin
	env  GOOS=darwin GOARCH=amd64 go build -o dist/bin/eputil cmd/eputil/eputil.go
	env  GOOS=darwin GOARCH=amd64 go build -o dist/bin/epfmt cmd/epfmt/epfmt.go
	env  GOOS=darwin GOARCH=amd64 go build -o dist/bin/doi2eprintxml cmd/doi2eprintxml/doi2eprintxml.go
	env  GOOS=darwin GOARCH=amd64 go build -o dist/bin/eprintxml2json cmd/eprintxml2json/eprintxml2json.go
	cd dist && zip -r $(PROJECT)-$(VERSION)-macos-amd64.zip README.md LICENSE INSTALL.md docs/* eprinttools/* bin/*
	rm -fR dist/bin

dist/raspbian-arm7:
	mkdir -p dist/bin
	env  GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/eputil cmd/eputil/eputil.go
	env  GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/epfmt cmd/epfmt/epfmt.go
	env  GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/doi2eprintxml cmd/doi2eprintxml/doi2eprintxml.go
	env  GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/eprintxml2json cmd/eprintxml2json/eprintxml2json.go
	cd dist && zip -r $(PROJECT)-$(VERSION)-raspbian-arm7.zip README.md LICENSE INSTALL.md docs/* eprinttools/* bin/*
	rm -fR dist/bin

distribute_python:
	mkdir -p dist/eprinttools/eprints3x
	mkdir -p dist/eprinttools/eprintviews
	cp -v eprinttools/eprints3x/*.py dist/eprinttools/eprints3x/
	cp -vR eprinttools/eprintviews/*.py dist/eprinttools/eprintviews/
	cp -vR static dist/
	cp -vR templates dist/
	cp config.json-example dist/
	cp setup.py dist/
	cp harvester_full.py dist/
	cp harvester_recent.py dist/
	cp genviews.py dist/
	cp indexer.py dist/
	cp mk_website.py dist/
	cp publisher.py dist/
	cp invalidate_cloudfront.py dist/

distribute_docs:
	mkdir -p dist/docs
	cp -v README.md dist/
	cp -v LICENSE dist/
	cp -v INSTALL.md dist/
	cp -vR docs/* dist/docs/

release: distribute_docs distribute_python dist/linux-amd64 dist/windows-amd64 dist/macos-amd64 dist/raspbian-arm7

status:
	git status

save:
	if [ "$(msg)" != "" ]; then git commit -am "$(msg)"; else git commit -am "Quick Save"; fi
	git push origin $(BRANCH)

publish:
	./mk-website.bash
	./publish.bash


text:
from greedEvolutionary import *

loading=True #we will load a family from a file
againstSelf=False #we will test against the pr1testing strategies

test=Family(100)

if loading:
    test.load_fam('2016-10-23T09_48_33.418124.json')

test.print_fam()

while True:
    test.generation(againstSelf)


text:
package lab05;

import ratpack.guice.Guice;
import ratpack.server.BaseDir;
import ratpack.server.RatpackServer;

public class Lab05 {
  public static void main(String[] args) throws Exception {
    RatpackServer.start(ratpackServerSpec -> ratpackServerSpec
      .serverConfig(s -> s.baseDir(BaseDir.find()))
      .registry(Guice.registry(bindingsSpec -> bindingsSpec
          .bind(BookRepository.class, DefaultBookRepository.class)
          .bind(BookService.class, DefaultBookService.class)
      ))
      .handlers(chain -> {
        // TODO implement me
      })
    );
  }
}


text:
package org.cloudfoundry.servicebroker.lastoperation;

import com.fasterxml.jackson.annotation.JsonValue;

enum State {

    FAILED("failed"),

    IN_PROGRESS("in progress"),

    SUCCEEDED("succeeded");

    private final String value;

    State(String value) {
        this.value = value;
    }

    @JsonValue
    String getValue() {
        return this.value;
    }

}


text:
package net.lecousin.framework.core.tests.io.data;

import java.util.Arrays;

import net.lecousin.framework.core.test.io.data.TestBytesWritable;
import net.lecousin.framework.io.data.CompositeBytes;
import net.lecousin.framework.io.data.ByteArray;

import org.junit.Assert;
import org.junit.Test;

public class TestCompositeBytesWritable extends TestBytesWritable {

	public TestCompositeBytesWritable(int initialPos, int length, boolean useSubBuffer) {
		super(create(initialPos, length), initialPos, length, useSubBuffer);
	}

	private static CompositeBytes.Writable create(int initialPos, int length) {
		byte[] data = new byte[initialPos + length];
		CompositeBytes.Writable c = new CompositeBytes.Writable();
		for (int i = 0; i < length; i += 5) {
			int len = Math.min(5, length - i);
			ByteArray.Writable r = new ByteArray.Writable(data, initialPos + i, len, false);
			c.add(r);
		}
		return c;
	}

	@Override
	protected void check(byte[] expected, int expectedOffset, int bufferOffset, int len) {
		for (int i = 0; i < len; ++i)
			Assert.assertEquals(expected[i + expectedOffset], ((ByteArray)((CompositeBytes.Writable)buffer).getWrappedBuffers().get(0)).getArray()[initialPos + bufferOffset + i]);
	}

	@Test
	public void testConstructorArray() {
		CompositeBytes.Writable c = new CompositeBytes.Writable(
			new ByteArray.Writable(new byte[10], true),
			new ByteArray.Writable(new byte[5], false),
			new ByteArray.Writable(new byte[3], false)
		);
		Assert.assertEquals(18, c.remaining());
	}

	@Test
	public void testConstructorList() {
		CompositeBytes.Writable c = new CompositeBytes.Writable(Arrays.asList(
			new ByteArray.Writable(new byte[10], false),
			new ByteArray.Writable(new byte[5], false),
			new ByteArray.Writable(new byte[3], false)
		));
		Assert.assertEquals(18, c.remaining());
	}

}


text:
import React, { Component } from 'react';
import './Modal.css';

export default class Modal extends Component {
  static defaultProps = {
    isOpen: false
  }

  renderModal() {
    return (

            {this.props.children}

    )
  }

  render() {
    let modal = this.props.isOpen ? this.renderModal() : null;
    return (

        {modal}

    )
  }
}