public/api-v1-objects/New-ConfluenceContentBody.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function New-ConfluenceContentBody {
    [CmdletBinding()]
    param (
        # String body content in a Confluence format
        [Parameter(Mandatory,Position=0,ValueFromPipeline,ValueFromPipelineByPropertyName)]
        [AllowEmptyString()]
        [string]
        $Body,

        # The format of the body
        [Parameter(Position=1,ValueFromPipelineByPropertyName)]
        [ValidateSet("view","export_view","styled_view","storage")]
        [string]
        $Format="storage"
    )
    begin {
        $results = @()
    }
    process {
        $results += [PSCustomObject]@{
            $Format = [PSCustomObject]@{
                representation = $Format
                value = $Body
            }
        }
    }
    end {
        $results
    }
}